]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: add wierd sleep for libmount/context
authorRuediger Meier <ruediger.meier@ga-group.nl>
Tue, 23 Jan 2018 23:20:15 +0000 (00:20 +0100)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Wed, 7 Mar 2018 17:36:17 +0000 (18:36 +0100)
I still don't understand why this helps to fix these tests on my system.
udevadm settle had no positive effect. Adding the sleeps before
"is_mounted" also didn't fixed that, that's amazing!?

Below the test log, very often seen on my system since a long time:

-------------------- util-linux regression tests --------------------

                    For development purpose only.
                 Don't execute on production system!

       kernel: 4.4.104-39-default

     libmount: context: [01] mount-by-devname                ... OK
     libmount: context: [02] umount-by-devname               ... OK
     libmount: context: [03] mount-by-label                  ... OK
     libmount: context: [04] umount-by-mountpoint            ... OK
     libmount: context: [05] mount-by-uuid                   ... FAILED (libmount/context-mount-by-uuid)
     libmount: context: [06] mount-flags                     ... FAILED (libmount/context-mount-flags)
     libmount: context: [07] mount-loopdev                   ... OK
     libmount: context: [08] x-mount.mkdir                   ... OK
     libmount: context: [09] X-mount.mkdir                   ... OK
     libmount: context                                       ... FAILED (2 from 9 sub-tests)

---------------------------------------------------------------------
  1 tests of 17 FAILED
---------------------------------------------------------------------

rudi@zappa:~/devel/util-linux/build> cat tests/diff/libmount/context-mount-by-uuid
--- /home/rudi/devel/util-linux/tests/expected/libmount/context-mount-by-uuid   2017-07-03 12:20:24.144845538 +0200
+++ /home/rudi/devel/util-linux/build/tests/output/libmount/context-mount-by-uuid       2018-01-24 00:42:18.549444408 +0100
@@ -1,2 +1,3 @@
 successfully mounted
-successfully umounted
+failed to umount
+FAILED [rc=16]/dev/sdb1 still mounted

rudi@zappa:~/devel/util-linux/build> cat tests/diff/libmount/context-mount-flags
--- /home/rudi/devel/util-linux/tests/expected/libmount/context-mount-flags     2017-07-03 12:20:24.148845497 +0200
+++ /home/rudi/devel/util-linux/build/tests/output/libmount/context-mount-flags 2018-01-24 00:42:18.725442931 +0100
@@ -1,5 +1,5 @@
+test_mount_context: failed to mount: Device or resource busy
+FAILED [rc=16]rw,relatime
 successfully mounted
-ro,nosuid,noexec
-successfully mounted
-rw,nosuid,noexec
+rw,relatime
 successfully umounted

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
tests/ts/libmount/context

index 3b49801d49cdff4123bb7f3a6339714fbd50cf93..5a4f36afa4cbf6a059554db8f936263ffac51369 100755 (executable)
@@ -111,7 +111,9 @@ ts_init_subtest "mount-by-uuid"
 mkdir -p $MOUNTPOINT &> /dev/null
 ts_run $TESTPROG --mount UUID="$UUID" $MOUNTPOINT >> $TS_OUTPUT 2>&1
 is_mounted $DEVICE  || echo "$DEVICE not mounted" >> $TS_OUTPUT 2>&1
+sleep 1
 ts_run $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1
+sleep 1
 is_mounted $DEVICE && echo "$DEVICE still mounted" >> $TS_OUTPUT 2>&1
 ts_finalize_subtest