[systemd-commits] 2 commits - test/TEST-01-BASIC test/TEST-02-CRYPTSETUP test/TEST-03-JOBS

Harald Hoyer harald at kemper.freedesktop.org
Tue Sep 17 13:19:29 PDT 2013


 test/TEST-01-BASIC/test.sh      |    6 +++---
 test/TEST-02-CRYPTSETUP/test.sh |    6 +++---
 test/TEST-03-JOBS/test.sh       |    8 ++++----
 3 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 41a5ef639b248aa3d10609d9af5d0043b909d93c
Author: Harald Hoyer <harald at redhat.com>
Date:   Mon Sep 16 18:07:43 2013 -0500

    TEST-03-JOBS/test.sh: do not output the "failed" if it does not exist

diff --git a/test/TEST-03-JOBS/test.sh b/test/TEST-03-JOBS/test.sh
index 6440d1f..02fd8b9 100755
--- a/test/TEST-03-JOBS/test.sh
+++ b/test/TEST-03-JOBS/test.sh
@@ -21,10 +21,10 @@ run_qemu() {
     mkdir -p $TESTDIR/root
     mount ${LOOPDEV}p1 $TESTDIR/root
     [[ -e $TESTDIR/root/testok ]] && ret=0
-    cp -a $TESTDIR/root/failed $TESTDIR
+    [[ -f $TESTDIR/root/failed ]] && cp -a $TESTDIR/root/failed $TESTDIR
     cp -a $TESTDIR/root/var/log/journal $TESTDIR
     umount $TESTDIR/root
-    cat $TESTDIR/failed
+    [[ -f $TESTDIR/failed ]] && cat $TESTDIR/failed
     ls -l $TESTDIR/journal/*/*.journal
     test -s $TESTDIR/failed && ret=$(($ret+1))
     return $ret
@@ -35,9 +35,9 @@ run_nspawn() {
     ../../systemd-nspawn -b -D $TESTDIR/nspawn-root /usr/lib/systemd/systemd
     ret=1
     [[ -e $TESTDIR/nspawn-root/testok ]] && ret=0
-    cp -a $TESTDIR/nspawn-root/failed $TESTDIR
+    [[ -f $TESTDIR/root/failed ]] && cp -a $TESTDIR/nspawn-root/failed $TESTDIR
     cp -a $TESTDIR/nspawn-root/var/log/journal $TESTDIR
-    cat $TESTDIR/failed
+    [[ -f $TESTDIR/failed ]] && cat $TESTDIR/failed
     ls -l $TESTDIR/journal/*/*.journal
     test -s $TESTDIR/failed && ret=$(($ret+1))
     return $ret

commit 07ba97757505ea94458ef32cdc45311fd6efc298
Author: Harald Hoyer <harald at redhat.com>
Date:   Mon Sep 16 18:06:57 2013 -0500

    TEST-01-BASIC, TEST-02-CRYPTSETUP: fixed strip
    
    also output more status about failed jobs

diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh
index e41ed9d..9b55a27 100755
--- a/test/TEST-01-BASIC/test.sh
+++ b/test/TEST-01-BASIC/test.sh
@@ -132,7 +132,7 @@ Description=Testsuite service
 After=multi-user.target
 
 [Service]
-ExecStart=/bin/bash -c 'set -x; systemctl --failed --no-legend --no-pager > /failed ; echo OK > /testok; while : ;do 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;'
+ExecStart=/bin/bash -c 'set -x; ( systemctl --failed --no-legend --no-pager; systemctl status --failed ) > /failed ; echo OK > /testok; while : ;do 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
 
@@ -190,7 +190,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##-}
@@ -213,7 +213,7 @@ EOF
         cp -a /etc/ld.so.conf* $initdir/etc
         ldconfig -r "$initdir"
         ddebug "Strip binaries"
-        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
diff --git a/test/TEST-02-CRYPTSETUP/test.sh b/test/TEST-02-CRYPTSETUP/test.sh
index ec71430..b98d238 100755
--- a/test/TEST-02-CRYPTSETUP/test.sh
+++ b/test/TEST-02-CRYPTSETUP/test.sh
@@ -131,7 +131,7 @@ Description=Testsuite service
 After=multi-user.target
 
 [Service]
-ExecStart=/bin/bash -c 'set -x; systemctl --failed --no-legend --no-pager > /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;'
+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
 
@@ -197,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##-}
@@ -220,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



More information about the systemd-commits mailing list