X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=test%2FTEST-02-CRYPTSETUP%2Ftest.sh;h=b98d23810a25e35df6edc247748fc5a0c7cac23b;hb=a281d9c7851b16c4c9195d042901540ee9ced799;hp=a0e4d6580d0cf9083d41c4b581f8c8c24af8fa1a;hpb=e8a66f4af296dc1dd4879a1401eb42bf7b7aeb01;p=elogind.git diff --git a/test/TEST-02-CRYPTSETUP/test.sh b/test/TEST-02-CRYPTSETUP/test.sh index a0e4d6580..b98d23810 100755 --- a/test/TEST-02-CRYPTSETUP/test.sh +++ b/test/TEST-02-CRYPTSETUP/test.sh @@ -3,8 +3,7 @@ # ex: ts=8 sw=4 sts=4 et filetype=sh TEST_DESCRIPTION="cryptsetup systemd setup" -KVERSION=${KVERSION-$(uname -r)} -KERNEL_VER=$(uname -r) +. $TEST_BASE_DIR/test-functions # Uncomment this to debug failures #DEBUGFAIL="systemd.unit=multi-user.target" @@ -122,15 +121,8 @@ LABEL=systemd / ext3 rw 0 1 /dev/mapper/varcrypt /var ext3 defaults 0 1 EOF - # setup the testsuite target - cat >$initdir/etc/systemd/system/testsuite.target <$initdir/etc/systemd/system/testsuite.service < /failed ; echo OK > /testok; while : ;do systemd-cat echo "testsuite service waiting for /var/log/journal" ; echo "testsuite service waiting for journal to move to /var/log/journal" > /dev/console ; for i in /var/log/journal/*;do [ -d "\$i" ] && echo "\$i" && break 2; done; sleep 1; done; sleep 1; exit 0;' -ExecStopPost=/usr/bin/systemctl poweroff --no-block +ExecStart=/bin/bash -c 'set -x; ( systemctl --failed --no-legend --no-pager; systemctl status --failed ) > /failed ; echo OK > /testok; while : ;do systemd-cat echo "testsuite service waiting for /var/log/journal" ; echo "testsuite service waiting for journal to move to /var/log/journal" > /dev/console ; for i in /var/log/journal/*;do [ -d "\$i" ] && echo "\$i" && break 2; done; sleep 1; done; sleep 1; exit 0;' Type=oneshot EOF + mkdir -p $initdir/etc/systemd/system/testsuite.target.wants ln -fs ../testsuite.service $initdir/etc/systemd/system/testsuite.target.wants/testsuite.service + ln -fs ../end.service $initdir/etc/systemd/system/testsuite.target.wants/end.service # make the testsuite the default target ln -fs testsuite.target $initdir/etc/systemd/system/default.target @@ -204,7 +197,7 @@ EOF # softlink mtab ln -fs /proc/self/mounts $initdir/etc/mtab - # install any Exec's from the service files + # install any Execs from the service files egrep -ho '^Exec[^ ]*=[^ ]+' $initdir/lib/systemd/system/*.service \ | while read i; do i=${i##Exec*=}; i=${i##-} @@ -227,7 +220,7 @@ EOF cp -a /etc/ld.so.conf* $initdir/etc ldconfig -r "$initdir" ddebug "Strip binaeries" - find "$initdir" -perm +111 -type f | xargs strip --strip-unneeded | ddebug + find "$initdir" -executable -not -path '*/lib/modules/*.ko' -type f | xargs strip --strip-unneeded | ddebug # copy depmod files inst /lib/modules/$KERNEL_VER/modules.order @@ -260,5 +253,4 @@ test_cleanup() { return 0 } -. $TEST_BASE_DIR/test-functions do_test "$@"