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