[Libguestfs] [PATCH] tests: disable UUID change on ext journal_dev

Pino Toscano ptoscano at redhat.com
Fri May 20 11:28:37 UTC 2016


Newer versions of e2fsprogs refuse modifying journal devices, causing
the test #1 of get_e2uuid to fail with:

  libguestfs: error: set_e2uuid: Cannot modify a journal device.

Since the test case just needs to verify get_e2uuid runs without
failing, run it without expecting a certain UUID set earlier.

Followup of commit da4812ab6b44c29cb3cf181c7aa896420ecb8aa6.
---
 generator/actions.ml | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/generator/actions.ml b/generator/actions.ml
index 3566371..b17808e 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -5349,14 +5349,13 @@ of a filesystem." };
     style = RString "uuid", [Device "device"], [];
     proc_nr = Some 83;
     deprecated_by = Some "vfs_uuid";
-    tests =
-      (* Regression test for RHBZ#597112. *)
-      (let uuid = uuidgen () in [
-        InitNone, Always, TestResultString (
-          [["mke2journal"; "1024"; "/dev/sdc"];
-           ["set_e2uuid"; "/dev/sdc"; uuid];
-           ["get_e2uuid"; "/dev/sdc"]], uuid), []
-      ]);
+    tests = [
+      (* We can't predict what UUID will be, so just check
+         the command run; regression test for RHBZ#597112. *)
+      InitNone, Always, TestRun (
+        [["mke2journal"; "1024"; "/dev/sdc"];
+         ["get_e2uuid"; "/dev/sdc"]]), []
+    ];
     shortdesc = "get the ext2/3/4 filesystem UUID";
     longdesc = "\
 This returns the ext2/3/4 filesystem UUID of the filesystem on
-- 
2.5.5




More information about the Libguestfs mailing list