From 817f0b604ee34ba510e68720c59bc74549820ed0 Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@lst.de>
Date: Sat, 26 Mar 2016 18:14:02 +0100
Subject: [PATCH] tests: check that the nguid is properly saved and restored

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 nvmet/test_nvmet.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/nvmet/test_nvmet.py b/nvmet/test_nvmet.py
index 7696590..b092baa 100644
--- a/nvmet/test_nvmet.py
+++ b/nvmet/test_nvmet.py
@@ -156,6 +156,8 @@ class TestNvmet(unittest.TestCase):
         n.set_attr('device', 'path', '/dev/ram0')
         n.set_enable(1)
 
+        nguid = n.get_attr('device', 'nguid')
+
         root.save_to_file('test.json')
         root.clear_existing()
         root.restore_from_file('test.json')
@@ -174,3 +176,4 @@ class TestNvmet(unittest.TestCase):
         # and check everything is still the same
         self.assertTrue(n.get_enable())
         self.assertEqual(n.get_attr('device', 'path'), '/dev/ram0')
+        self.assertEqual(n.get_attr('device', 'nguid'), nguid)
-- 
GitLab