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

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