Blame SOURCES/0425-test-TEST-04-systemd-fixup-test.patch

18971c
From 22a907b38342fc5380236b2483424bcc38de1bd0 Mon Sep 17 00:00:00 2001
18971c
From: Harald Hoyer <harald@redhat.com>
18971c
Date: Thu, 30 Jun 2016 15:25:54 +0200
18971c
Subject: [PATCH] test/TEST-04-systemd: fixup test
18971c
18971c
- fix find -perm
18971c
- add failme test cases
18971c
- remove journal output
18971c
---
18971c
 test/TEST-04-FULL-SYSTEMD/test-init.sh |  2 +-
18971c
 test/TEST-04-FULL-SYSTEMD/test.sh      | 16 +++++++++-------
18971c
 2 files changed, 10 insertions(+), 8 deletions(-)
18971c
18971c
diff --git a/test/TEST-04-FULL-SYSTEMD/test-init.sh b/test/TEST-04-FULL-SYSTEMD/test-init.sh
18971c
index dcda926a..288ae487 100755
18971c
--- a/test/TEST-04-FULL-SYSTEMD/test-init.sh
18971c
+++ b/test/TEST-04-FULL-SYSTEMD/test-init.sh
18971c
@@ -19,7 +19,7 @@ if ismounted /usr && [ ! -s /failed ]; then
18971c
     echo "dracut-root-block-success" >/dev/sdc
18971c
 fi
18971c
 
18971c
-journalctl --full --no-pager -o short-monotonic
18971c
+#journalctl --full --no-pager -o short-monotonic
18971c
 
18971c
 if [ -s /failed ]; then
18971c
     echo "**************************FAILED**************************"
18971c
diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh
18971c
index 01b406d0..93c33890 100755
18971c
--- a/test/TEST-04-FULL-SYSTEMD/test.sh
18971c
+++ b/test/TEST-04-FULL-SYSTEMD/test.sh
18971c
@@ -22,7 +22,7 @@ client_run() {
18971c
 	-hdc $TESTDIR/result \
18971c
 	-m 256M -smp 2 -nographic \
18971c
 	-net none \
18971c
-	-append "root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT $DEBUGFAIL" \
18971c
+	-append "$client_opts rd.device.timeout=20 rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT $DEBUGFAIL" \
18971c
 	-initrd $TESTDIR/initramfs.testing
18971c
 
18971c
     if (($? != 0)); then
18971c
@@ -39,9 +39,11 @@ client_run() {
18971c
 }
18971c
 
18971c
 test_run() {
18971c
-    client_run "no option specified" || return 1
18971c
-    client_run "readonly root" "ro" || return 1
18971c
-    client_run "writeable root" "rw" || return 1
18971c
+    client_run "no root specified (failme)" "failme" && return 1
18971c
+    client_run "wrong root specified (failme)" "root=LABEL=dracut1" "failme" && return 1
18971c
+    client_run "no option specified" "root=LABEL=dracut" || return 1
18971c
+    client_run "readonly root" "root=LABEL=dracut" "ro" || return 1
18971c
+    client_run "writeable root" "root=LABEL=dracut" "rw" || return 1
18971c
     return 0
18971c
 }
18971c
 
18971c
@@ -70,7 +72,7 @@ test_setup() {
18971c
         ln -sfn /run "$initdir/var/run"
18971c
         ln -sfn /run/lock "$initdir/var/lock"
18971c
 
18971c
-	inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
18971c
+	inst_multiple -o sh df free ls shutdown poweroff stty cat ps ln ip route \
18971c
 	    mount dmesg ifconfig dhclient mkdir cp ping dhclient \
18971c
 	    umount strace less setsid tree systemctl reset
18971c
 
18971c
@@ -163,7 +165,7 @@ EOF
18971c
             /etc/security \
18971c
             /lib64/security \
18971c
             /lib/security -xtype f \
18971c
-            | while read file; do
18971c
+            2>/dev/null | while read file; do
18971c
             inst_multiple -o $file
18971c
         done
18971c
 
18971c
@@ -204,7 +206,7 @@ EOF
18971c
         cp -a /etc/ld.so.conf* $initdir/etc
18971c
         ldconfig -r "$initdir"
18971c
         ddebug "Strip binaeries"
18971c
-        find "$initdir" -perm +111 -type f | xargs -r strip --strip-unneeded | ddebug
18971c
+        find "$initdir" -perm /111 -type f | xargs -r strip --strip-unneeded | ddebug
18971c
 
18971c
         # copy depmod files
18971c
         inst /lib/modules/$kernel/modules.order