mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
test: drop || return 1 expression which is incompatible with set -e
The `set -e` option is incompatible with a subshell/compound command, which is followed by || <EXPR>. In such case, the -e option is ignored in all affected subshells/functions (see man bash(1) for command `set`).
This commit is contained in:
parent
71a0de36e5
commit
cc469c3dfc
@ -29,7 +29,7 @@ Type=oneshot
|
||||
EOF
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
setup_nspawn_root
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
|
@ -75,7 +75,7 @@ EOF
|
||||
cat >>$initdir/etc/fstab <<EOF
|
||||
/dev/mapper/varcrypt /var ext4 defaults 0 1
|
||||
EOF
|
||||
) || return 1
|
||||
)
|
||||
|
||||
ddebug "umount $TESTDIR/root/var"
|
||||
umount $TESTDIR/root/var
|
||||
|
@ -44,7 +44,7 @@ EOF
|
||||
cp test-jobs.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
setup_nspawn_root
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
|
@ -46,7 +46,7 @@ EOF
|
||||
cp test-journal.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
setup_nspawn_root
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
|
@ -42,7 +42,7 @@ EOF
|
||||
cp test-rlimits.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
setup_nspawn_root
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
|
@ -92,7 +92,7 @@ EOF
|
||||
dracut_install -o sesearch
|
||||
dracut_install runcon
|
||||
dracut_install checkmodule semodule semodule_package m4 make /usr/libexec/selinux/hll/pp load_policy sefcontext_compile
|
||||
) || return 1
|
||||
)
|
||||
|
||||
# mask some services that we do not want to run in these tests
|
||||
ln -s /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
||||
|
@ -40,7 +40,7 @@ EOF
|
||||
cp test-segfault.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
setup_nspawn_root
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
|
@ -60,7 +60,7 @@ ExecStart=/bin/systemctl reload /
|
||||
EOF
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
|
||||
ln -s /etc/systemd/system/-.mount $initdir/etc/systemd/system/root.mount
|
||||
mkdir -p $initdir/etc/systemd/system/local-fs.target.wants
|
||||
|
@ -32,7 +32,7 @@ TimeoutStopSec=270s
|
||||
EOF
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
|
||||
# mask some services that we do not want to run in these tests
|
||||
ln -s /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
||||
|
@ -45,7 +45,7 @@ ExecStart=/bin/true
|
||||
EOF
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
setup_nspawn_root
|
||||
|
||||
# mask some services that we do not want to run in these tests
|
||||
|
@ -64,7 +64,7 @@ EOF
|
||||
|
||||
chmod 0755 $initdir/test-fail-on-restart.sh
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
umount $TESTDIR/root
|
||||
|
@ -90,7 +90,7 @@ EOF
|
||||
|
||||
chmod 0755 $initdir/test-socket-group.sh
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
|
||||
setup_nspawn_root
|
||||
|
||||
|
@ -184,7 +184,7 @@ EOF
|
||||
|
||||
chmod 0755 $initdir/test-nspawn.sh
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
umount $TESTDIR/root
|
||||
|
@ -73,7 +73,7 @@ EOF
|
||||
chmod +x $initdir/test-machine-id-setup.sh
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
|
||||
# mask some services that we do not want to run in these tests
|
||||
ln -s /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
||||
|
@ -30,7 +30,7 @@ test_setup() {
|
||||
cp $BUILD_DIR/src/shared/libsystemd-shared-*.so ${initdir}/usr/lib
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
# mask some services that we do not want to run in these tests
|
||||
ln -s /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
||||
ln -s /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
||||
|
@ -38,7 +38,7 @@ EOF
|
||||
cp testsuite.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
umount $TESTDIR/root
|
||||
|
@ -30,7 +30,7 @@ EOF
|
||||
cp testsuite.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
setup_nspawn_root
|
||||
|
||||
# mask some services that we do not want to run in these tests
|
||||
|
@ -40,7 +40,7 @@ EOF
|
||||
cp testsuite.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
umount $TESTDIR/root
|
||||
|
@ -38,7 +38,7 @@ EOF
|
||||
cp testsuite.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
setup_nspawn_root
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
|
@ -38,7 +38,7 @@ EOF
|
||||
cp testsuite.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
setup_nspawn_root
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
|
@ -91,7 +91,7 @@ EOF
|
||||
cp testsuite.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
setup_nspawn_root
|
||||
|
||||
# mask some services that we do not want to run in these tests
|
||||
|
@ -31,7 +31,7 @@ EOF
|
||||
cp testsuite.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
setup_nspawn_root
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
|
@ -30,7 +30,7 @@ EOF
|
||||
cp testsuite.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
setup_nspawn_root
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
|
@ -40,7 +40,7 @@ EOF
|
||||
cp testsuite.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
setup_nspawn_root
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
|
@ -49,7 +49,7 @@ ExecStart=/bin/true
|
||||
EOF
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
setup_nspawn_root
|
||||
|
||||
# mask some services that we do not want to run in these tests
|
||||
|
@ -38,7 +38,7 @@ EOF
|
||||
cp testsuite.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
umount $TESTDIR/root
|
||||
|
@ -49,7 +49,7 @@ EOF
|
||||
cp testsuite.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
umount $TESTDIR/root
|
||||
|
@ -38,7 +38,7 @@ EOF
|
||||
cp testsuite.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
umount $TESTDIR/root
|
||||
|
@ -41,7 +41,7 @@ EOF
|
||||
cp testsuite.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
umount $TESTDIR/root
|
||||
|
@ -38,7 +38,7 @@ EOF
|
||||
cp testsuite.sh $initdir/
|
||||
|
||||
setup_testsuite
|
||||
) || return 1
|
||||
)
|
||||
setup_nspawn_root
|
||||
|
||||
ddebug "umount $TESTDIR/root"
|
||||
|
Loading…
Reference in New Issue
Block a user