summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-05-24 14:32:48 +0200
committerLennart Poettering <lennart@poettering.net>2012-05-24 14:32:48 +0200
commit32d965851d8cbb39f8ee0eeaf76a89e8f5fc174f (patch)
tree6366b9339bbb3b663846b916f43f6b021ea6479f
parentec8927ca5940e809f0b72f530582c76f1db4f065 (diff)
downloadsystemd-32d965851d8cbb39f8ee0eeaf76a89e8f5fc174f.tar.gz
systemd-32d965851d8cbb39f8ee0eeaf76a89e8f5fc174f.tar.bz2
systemd-32d965851d8cbb39f8ee0eeaf76a89e8f5fc174f.zip
test: check systemctl --failed in test VM
-rwxr-xr-xtest/TEST-01-BASIC/test.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh
index 13b731d94d..42107baa11 100755
--- a/test/TEST-01-BASIC/test.sh
+++ b/test/TEST-01-BASIC/test.sh
@@ -19,8 +19,11 @@ test_run() {
mount ${LOOPDEV}p1 $TESTDIR/root
[[ -e $TESTDIR/root/testok ]] && ret=0
cp -a $TESTDIR/root/var/log/journal $TESTDIR
+ cp -a $TESTDIR/root/failed $TESTDIR
umount $TESTDIR/root
+ cat $TESTDIR/failed
ls -l $TESTDIR/journal/*/*.journal
+ test -s $TESTDIR/failed && ret=$(($ret+1))
return $ret
}
@@ -97,7 +100,7 @@ Description=Testsuite service
After=multi-user.target
[Service]
-ExecStart=/bin/sh -c 'echo OK > /testok; /bin/sleep 5'
+ExecStart=/bin/sh -c 'systemctl --failed --no-legend --no-pager > /failed ; echo OK > /testok'
ExecStartPost=/usr/sbin/poweroff
Type=oneshot
@@ -169,7 +172,7 @@ EOF
dracut_install sh df free ls shutdown poweroff \
stty cat ps ln ip route \
mount dmesg dhclient mkdir cp ping dhclient \
- umount strace less grep
+ umount strace less grep id tty
# install ld.so.conf* and run ldconfig
cp -a /etc/ld.so.conf* $initdir/etc