chiark / gitweb /
test: some trivial fixes to test scripts
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 29 Jan 2013 21:14:07 +0000 (16:14 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 30 Jan 2013 00:01:41 +0000 (19:01 -0500)
- fix typo
- use compiled systemd-nspawn
- drop --capability=... from systemd-nspawn invocation, is is the default now
- simplify sudo make invocations

TODO
test/README.testsuite
test/TEST-01-BASIC/test.sh
test/TEST-03-JOBS/test.sh

diff --git a/TODO b/TODO
index 3e2ff8b6d153826a28ced5345c3d7f6086f51532..26e4c5acf38b7834ef86907adfc32ff19ad7a7e6 100644 (file)
--- a/TODO
+++ b/TODO
@@ -13,6 +13,9 @@ Bugfixes:
 
 * properly handle .mount unit state tracking when two mount points are stacked one on top of another on the exact same mount point.
 
 
 * properly handle .mount unit state tracking when two mount points are stacked one on top of another on the exact same mount point.
 
+* add 'set -e' to scripts in test/
+* make test in test/ work with separate output dir
+
 Fedora 19:
 
 * drop no longer needed modprobe.d udlfb file (it does not belong in /etc anyway)
 Fedora 19:
 
 * drop no longer needed modprobe.d udlfb file (it does not belong in /etc anyway)
index 0f96b984a95c434dcf28e571176fa8576e41b801..54d0eaac502239ed06140d38f97d3acd5b34c8f8 100644 (file)
@@ -28,8 +28,8 @@ $ sudo make clean setup run
 If you want to log in the testsuite virtual machine, you can specify
 additional kernel command line parameter with $DEBUGFAIL.
 
 If you want to log in the testsuite virtual machine, you can specify
 additional kernel command line parameter with $DEBUGFAIL.
 
-$ sudo sh -c 'DEBUGFAIL="systemd.unit=multi-user.target" make clean setup run'
+$ sudo make DEBUGFAIL="systemd.unit=multi-user.target" clean setup run
 
 you can even skip the "clean" and "setup" if you want to run the machine again.
 
 
 you can even skip the "clean" and "setup" if you want to run the machine again.
 
-$ sudo sh -c 'DEBUGFAIL="systemd.unit=multi-user.target" make run'
+$ sudo make DEBUGFAIL="systemd.unit=multi-user.target" run
index 7d2e3d4bd79297a07453467a04f4dd4b2036670b..90492079e4f5fa7d7300a3bc942c9f59d3bfebb8 100755 (executable)
@@ -33,7 +33,7 @@ run_qemu() {
 
 
 run_nspawn() {
 
 
 run_nspawn() {
-    systemd-nspawn -b -D $TESTDIR/nspawn-root --capability=CAP_AUDIT_CONTROL,CAP_AUDIT_WRITE /usr/lib/systemd/systemd
+    ../../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
     ret=1
     [[ -e $TESTDIR/nspawn-root/testok ]] && ret=0
     cp -a $TESTDIR/nspawn-root/failed $TESTDIR
@@ -213,7 +213,7 @@ EOF
         # install ld.so.conf* and run ldconfig
         cp -a /etc/ld.so.conf* $initdir/etc
         ldconfig -r "$initdir"
         # install ld.so.conf* and run ldconfig
         cp -a /etc/ld.so.conf* $initdir/etc
         ldconfig -r "$initdir"
-        ddebug "Strip binaeries"
+        ddebug "Strip binaries"
         find "$initdir" -perm +111 -type f | xargs strip --strip-unneeded | ddebug
 
         # copy depmod files
         find "$initdir" -perm +111 -type f | xargs strip --strip-unneeded | ddebug
 
         # copy depmod files
@@ -230,7 +230,7 @@ EOF
     ddebug "cp -ar $TESTDIR/root $TESTDIR/nspawn-root"
     cp -ar $TESTDIR/root $TESTDIR/nspawn-root
     # we don't mount in the nspawn root
     ddebug "cp -ar $TESTDIR/root $TESTDIR/nspawn-root"
     cp -ar $TESTDIR/root $TESTDIR/nspawn-root
     # we don't mount in the nspawn root
-    rm -fr $TESTDIR/nspawn-root/etc/fstab
+    rm -f $TESTDIR/nspawn-root/etc/fstab
 
     ddebug "umount $TESTDIR/root"
     umount $TESTDIR/root
 
     ddebug "umount $TESTDIR/root"
     umount $TESTDIR/root
index 4cfb2a504a31eac6ff9c91873a09b3580d34d8a4..bd211f3ad5d5d5318842d41db8ec51313f5aec09 100755 (executable)
@@ -33,7 +33,7 @@ run_qemu() {
 
 
 run_nspawn() {
 
 
 run_nspawn() {
-    systemd-nspawn -b -D $TESTDIR/nspawn-root --capability=CAP_AUDIT_CONTROL,CAP_AUDIT_WRITE /usr/lib/systemd/systemd
+    ../../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
     ret=1
     [[ -e $TESTDIR/nspawn-root/testok ]] && ret=0
     cp -a $TESTDIR/nspawn-root/failed $TESTDIR