You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
3.1 KiB

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