]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-*: use spacing before redirection operator, but not after
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 7 Apr 2021 22:09:55 +0000 (00:09 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 8 Apr 2021 18:21:50 +0000 (20:21 +0200)
<< EOF → <<EOF
> foo < bar → >foo <bar

46 files changed:
test/TEST-52-HONORFIRSTSHUTDOWN/test.sh
test/test-execute/exec-standardoutput-append.service
test/test-execute/exec-standardoutput-file.service
test/test-execute/exec-standardoutput-truncate.service
test/test-functions
test/testsuite-28.units/specifier-j-wants.service
test/testsuite-52.units/testsuite-52.sh
test/units/testsuite-03.sh
test/units/testsuite-04.sh
test/units/testsuite-12.sh
test/units/testsuite-13.sh
test/units/testsuite-15.sh
test/units/testsuite-17.01.sh
test/units/testsuite-17.02.sh
test/units/testsuite-17.03.sh
test/units/testsuite-17.04.sh
test/units/testsuite-17.05.sh
test/units/testsuite-18.sh
test/units/testsuite-19.sh
test/units/testsuite-20.sh
test/units/testsuite-23.sh
test/units/testsuite-25.sh
test/units/testsuite-26.sh
test/units/testsuite-29.sh
test/units/testsuite-30.sh
test/units/testsuite-31.sh
test/units/testsuite-33.sh
test/units/testsuite-34.sh
test/units/testsuite-36.sh
test/units/testsuite-37.sh
test/units/testsuite-38.sh
test/units/testsuite-39.sh
test/units/testsuite-40.sh
test/units/testsuite-41.sh
test/units/testsuite-42.sh
test/units/testsuite-43.sh
test/units/testsuite-44.sh
test/units/testsuite-46.sh
test/units/testsuite-47-repro.sh
test/units/testsuite-47.sh
test/units/testsuite-48.sh
test/units/testsuite-49.sh
test/units/testsuite-50.sh
test/units/testsuite-54.sh
test/units/testsuite-55.sh
test/units/testsuite-56.sh

index a0848ef6723deea89c9cf30b24424b266a797a06..28b97fadb08767de6aa85dcaffce2d4977e3ca30 100755 (executable)
@@ -16,4 +16,4 @@ NSPAWN_TIMEOUT=20
 # only found from the console during the poweroff.
 rm -f /tmp/honorfirstshutdown.log >/dev/null
 
-do_test "$@" 52 > /tmp/honorfirstshutdown.log
+do_test "$@" 52 >/tmp/honorfirstshutdown.log
index 8983bb056b23457d6ff0891ab5f44f86f1d690ac..2118bfc2a661c0f022f2489b007f9b23a740a7a1 100644 (file)
@@ -2,8 +2,8 @@
 Description=Test for StandardOutput=append:
 
 [Service]
-ExecStartPre=sh -c 'printf "hello\n" > /tmp/test-exec-standardoutput-output'
-ExecStartPre=sh -c 'printf "hello\nhello\n" > /tmp/test-exec-standardoutput-expected'
+ExecStartPre=sh -c 'printf "hello\n" >/tmp/test-exec-standardoutput-output'
+ExecStartPre=sh -c 'printf "hello\nhello\n" >/tmp/test-exec-standardoutput-expected'
 StandardInput=data
 StandardInputText=hello
 StandardOutput=append:/tmp/test-exec-standardoutput-output
index 71e2604b942ca26b8a742e7e6dd42036a9a4d140..8d484a456e6b4eec1901de9b9969b213d329d067 100644 (file)
@@ -2,8 +2,8 @@
 Description=Test for StandardOutput=file:
 
 [Service]
-ExecStartPre=sh -c 'printf "nooo\nhello\n" > /tmp/test-exec-standardoutput-output'
-ExecStartPre=sh -c 'printf "hello\nello\n" > /tmp/test-exec-standardoutput-expected'
+ExecStartPre=sh -c 'printf "nooo\nhello\n" >/tmp/test-exec-standardoutput-output'
+ExecStartPre=sh -c 'printf "hello\nello\n" >/tmp/test-exec-standardoutput-expected'
 StandardInput=data
 StandardInputText=hello
 StandardOutput=file:/tmp/test-exec-standardoutput-output
index 4b4bb87b758bb97a4ba2ba68fe58ee8c05dfe313..8d6ea2769fed3fa9e80db45a8fe04eb0a608fb9e 100644 (file)
@@ -2,8 +2,8 @@
 Description=Test for StandardOutput=truncate:
 
 [Service]
-ExecStartPre=sh -c 'printf "hello\n" > /tmp/test-exec-standardoutput-output'
-ExecStartPre=sh -c 'printf "hi\n" > /tmp/test-exec-standardoutput-expected'
+ExecStartPre=sh -c 'printf "hello\n" >/tmp/test-exec-standardoutput-output'
+ExecStartPre=sh -c 'printf "hi\n" >/tmp/test-exec-standardoutput-expected'
 StandardInput=data
 StandardInputText=hi
 StandardOutput=truncate:/tmp/test-exec-standardoutput-output
index 6b94058fd366a989544f5acf97b1406d70162389..063a6096fdcdd0df36365910088a265b4a0a7fd5 100644 (file)
@@ -503,13 +503,13 @@ install_verity_minimal() {
         ln -s ../usr/lib/os-release $initdir/etc/os-release
         touch $initdir/etc/machine-id $initdir/etc/resolv.conf
         touch $initdir/opt/some_file
-        echo MARKER=1 >> $initdir/usr/lib/os-release
-        echo -e "[Service]\nExecStartPre=cat /usr/lib/os-release\nExecStart=sleep 120" > $initdir/usr/lib/systemd/system/app0.service
+        echo MARKER=1 >>$initdir/usr/lib/os-release
+        echo -e "[Service]\nExecStartPre=cat /usr/lib/os-release\nExecStart=sleep 120" >$initdir/usr/lib/systemd/system/app0.service
         cp $initdir/usr/lib/systemd/system/app0.service $initdir/usr/lib/systemd/system/app0-foo.service
 
         mksquashfs $initdir $oldinitdir/usr/share/minimal_0.raw
         veritysetup format $oldinitdir/usr/share/minimal_0.raw $oldinitdir/usr/share/minimal_0.verity | \
-            grep '^Root hash:' | cut -f2 | tr -d '\n' > $oldinitdir/usr/share/minimal_0.roothash
+            grep '^Root hash:' | cut -f2 | tr -d '\n' >$oldinitdir/usr/share/minimal_0.roothash
 
         sed -i "s/MARKER=1/MARKER=2/g" $initdir/usr/lib/os-release
         rm $initdir/usr/lib/systemd/system/app0-foo.service
@@ -517,7 +517,7 @@ install_verity_minimal() {
 
         mksquashfs $initdir $oldinitdir/usr/share/minimal_1.raw
         veritysetup format $oldinitdir/usr/share/minimal_1.raw $oldinitdir/usr/share/minimal_1.verity | \
-            grep '^Root hash:' | cut -f2 | tr -d '\n' > $oldinitdir/usr/share/minimal_1.roothash
+            grep '^Root hash:' | cut -f2 | tr -d '\n' >$oldinitdir/usr/share/minimal_1.roothash
 
         # Rolling distros like Arch do not set VERSION_ID
         local version_id=""
@@ -527,42 +527,42 @@ install_verity_minimal() {
 
         export initdir=$TESTDIR/app0
         mkdir -p $initdir/usr/lib/extension-release.d $initdir/usr/lib/systemd/system $initdir/opt
-        grep "^ID=" $os_release > $initdir/usr/lib/extension-release.d/extension-release.app0
-        echo "${version_id}" >> $initdir/usr/lib/extension-release.d/extension-release.app0
-        cat <<EOF > $initdir/usr/lib/systemd/system/app0.service
+        grep "^ID=" $os_release >$initdir/usr/lib/extension-release.d/extension-release.app0
+        echo "${version_id}" >>$initdir/usr/lib/extension-release.d/extension-release.app0
+        cat <<EOF >$initdir/usr/lib/systemd/system/app0.service
 [Service]
 Type=oneshot
 RemainAfterExit=yes
 ExecStart=/opt/script0.sh
 EOF
-        cat <<EOF > $initdir/opt/script0.sh
+        cat <<EOF >$initdir/opt/script0.sh
 #!/bin/bash
 set -e
 test -e /usr/lib/os-release
 cat /usr/lib/extension-release.d/extension-release.app0
 EOF
         chmod +x $initdir/opt/script0.sh
-        echo MARKER=1 > $initdir/usr/lib/systemd/system/some_file
+        echo MARKER=1 >$initdir/usr/lib/systemd/system/some_file
         mksquashfs $initdir $oldinitdir/usr/share/app0.raw
 
         export initdir=$TESTDIR/app1
         mkdir -p $initdir/usr/lib/extension-release.d $initdir/usr/lib/systemd/system $initdir/opt
-        grep "^ID=" $os_release > $initdir/usr/lib/extension-release.d/extension-release.app1
-        echo "${version_id}" >> $initdir/usr/lib/extension-release.d/extension-release.app1
-        cat <<EOF > $initdir/usr/lib/systemd/system/app1.service
+        grep "^ID=" $os_release >$initdir/usr/lib/extension-release.d/extension-release.app1
+        echo "${version_id}" >>$initdir/usr/lib/extension-release.d/extension-release.app1
+        cat <<EOF >$initdir/usr/lib/systemd/system/app1.service
 [Service]
 Type=oneshot
 RemainAfterExit=yes
 ExecStart=/opt/script1.sh
 EOF
-        cat <<EOF > $initdir/opt/script1.sh
+        cat <<EOF >$initdir/opt/script1.sh
 #!/bin/bash
 set -e
 test -e /usr/lib/os-release
 cat /usr/lib/extension-release.d/extension-release.app1
 EOF
         chmod +x $initdir/opt/script1.sh
-        echo MARKER=1 > $initdir/usr/lib/systemd/system/other_file
+        echo MARKER=1 >$initdir/usr/lib/systemd/system/other_file
         mksquashfs $initdir $oldinitdir/usr/share/app1.raw
     )
 }
@@ -700,7 +700,7 @@ if [[ "$ASAN_COMPILER" == "clang" ]]; then
   # Let's add the ASan DSO's path to the dynamic linker's cache. This is pretty
   # unnecessary for gcc & libasan, however, for clang this is crucial, as its
   # runtime ASan DSO is in a non-standard (library) path.
-  echo "${ASAN_RT_PATH%/*}" > /etc/ld.so.conf.d/asan-path-override.conf
+  echo "${ASAN_RT_PATH%/*}" >/etc/ld.so.conf.d/asan-path-override.conf
   ldconfig
 fi
 echo DefaultEnvironment=\$DEFAULT_ENVIRONMENT >>/etc/systemd/system.conf
@@ -741,7 +741,7 @@ printf "[Service]\nEnvironment=ASAN_OPTIONS=leak_check_at_exit=false\n" >/etc/sy
 # they're uninstrumented (like dmsetup). Let's add a simple rule which sets
 # LD_PRELOAD to the ASan RT library to fix this.
 mkdir -p /etc/udev/rules.d
-cat > /etc/udev/rules.d/00-set-LD_PRELOAD.rules << INNER_EOF
+cat >/etc/udev/rules.d/00-set-LD_PRELOAD.rules <<INNER_EOF
 SUBSYSTEM=="block", ENV{LD_PRELOAD}="$ASAN_RT_PATH"
 INNER_EOF
 chmod 0644 /etc/udev/rules.d/00-set-LD_PRELOAD.rules
@@ -856,9 +856,9 @@ install_systemd() {
     [[ "$LOOKS_LIKE_SUSE" ]] && setup_suse
 
     # enable debug logging in PID1
-    echo LogLevel=debug >> $initdir/etc/systemd/system.conf
+    echo LogLevel=debug >>$initdir/etc/systemd/system.conf
     # store coredumps in journal
-    echo Storage=journal >> $initdir/etc/systemd/coredump.conf
+    echo Storage=journal >>$initdir/etc/systemd/coredump.conf
 }
 
 get_ldpath() {
@@ -1174,12 +1174,12 @@ install_config_files() {
     inst_any /etc/os-release /usr/lib/os-release
     inst /etc/localtime
     # we want an empty environment
-    > $initdir/etc/environment
-    > $initdir/etc/machine-id
-    > $initdir/etc/resolv.conf
+    >$initdir/etc/environment
+    >$initdir/etc/machine-id
+    >$initdir/etc/resolv.conf
 
     # set the hostname
-    echo systemd-testsuite > $initdir/etc/hostname
+    echo systemd-testsuite >$initdir/etc/hostname
 
     # let's set up just one image with the traditional verbose output
     if [ ${IMAGE_NAME} != "basic" ]; then
@@ -1202,9 +1202,9 @@ install_debug_tools() {
         # Set default TERM from vt220 to linux, so at least basic key shortcuts work
         local _getty_override="$initdir/etc/systemd/system/serial-getty@.service.d"
         mkdir -p "$_getty_override"
-        echo -e "[Service]\nEnvironment=TERM=linux" > "$_getty_override/default-TERM.conf"
+        echo -e "[Service]\nEnvironment=TERM=linux" >"$_getty_override/default-TERM.conf"
 
-        cat > "$initdir/etc/motd" << EOF
+        cat >"$initdir/etc/motd" <<EOF
 To adjust the terminal size use:
     export COLUMNS=xx
     export LINES=yy
@@ -1246,7 +1246,7 @@ install_dbus() {
 
     # setup policy for Type=dbus test
     mkdir -p $initdir/etc/dbus-1/system.d
-    cat > $initdir/etc/dbus-1/system.d/systemd.test.ExecStopPost.conf <<EOF
+    cat >$initdir/etc/dbus-1/system.d/systemd.test.ExecStopPost.conf <<EOF
 <?xml version="1.0"?>
 <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
         "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
@@ -1987,7 +1987,7 @@ install_kmod_with_fw() {
     fi
 
     [ -d "$initdir/.kernelmodseen" ] && \
-        > "$initdir/.kernelmodseen/${1##*/}"
+        >"$initdir/.kernelmodseen/${1##*/}"
 
     inst_simple "$1" "/lib/modules/$KERNEL_VER/${1##*/lib/modules/$KERNEL_VER/}" \
         || return $?
@@ -2059,11 +2059,11 @@ filter_kernel_modules_by_path () (
     for _modname in $(eval $_filtercmd); do
         case $_modname in
             *.ko) "$2" "$_modname" && echo "$_modname";;
-            *.ko.gz) gzip -dc "$_modname" > $initdir/$$.ko
+            *.ko.gz) gzip -dc "$_modname" >$initdir/$$.ko
                 $2 $initdir/$$.ko && echo "$_modname"
                 rm -f $initdir/$$.ko
                 ;;
-            *.ko.xz) xz -dc "$_modname" > $initdir/$$.ko
+            *.ko.xz) xz -dc "$_modname" >$initdir/$$.ko
                 $2 $initdir/$$.ko && echo "$_modname"
                 rm -f $initdir/$$.ko
                 ;;
@@ -2276,7 +2276,7 @@ test_setup() {
         fi
 
         local hook_defined=1
-        if declare -f -F test_append_files > /dev/null; then
+        if declare -f -F test_append_files >/dev/null; then
             hook_defined=$?
         fi
 
index facf5577be10ba31d8e5887c6b8eb1b648bf6880..766a454d6a2e66aec54c5b61b23c385243067893 100644 (file)
@@ -7,4 +7,4 @@ After=testsuite-28-pre.service
 [Service]
 Type=oneshot
 ExecStart=test -f /tmp/test-specifier-j-%j
-ExecStart=sh -c 'echo OK > /testok'
+ExecStart=sh -c 'echo OK >/testok'
index 9cccf1b6c161ec5199a69cb14f19ab13cc4997fa..e10bf561105d400d52dd90426c631048c9920aa4 100755 (executable)
@@ -3,7 +3,7 @@ set -ex
 set -o pipefail
 
 if ! test -x /usr/lib/systemd/tests/testdata/units/test-honor-first-shutdown.sh ; then
-        echo "honor-first-shutdown script not found - FAIL" > /testok
+        echo "honor-first-shutdown script not found - FAIL" >/testok
         exit 0
 fi
 
@@ -13,6 +13,6 @@ systemd-analyze log-target console
 systemctl enable test-honor-first-shutdown.service
 systemctl start test-honor-first-shutdown.service
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index ec731aa11b69ffabef0249ee59603c8493b0575a..5a2dadd6b83d73e8759f63c0253717aae2de1ecf 100755 (executable)
@@ -6,9 +6,9 @@ set -ex
 
 systemctl start --no-block hello-after-sleep.target
 
-systemctl list-jobs > /root/list-jobs.txt
+systemctl list-jobs >/root/list-jobs.txt
 while ! grep 'sleep\.service.*running' /root/list-jobs.txt; do
-    systemctl list-jobs > /root/list-jobs.txt
+    systemctl list-jobs >/root/list-jobs.txt
 done
 
 grep 'hello\.service.*waiting' /root/list-jobs.txt
@@ -22,7 +22,7 @@ ELAPSED=$(($END_SEC-$START_SEC))
 test "$ELAPSED" -lt 3
 
 # sleep should still be running, hello not.
-systemctl list-jobs > /root/list-jobs.txt
+systemctl list-jobs >/root/list-jobs.txt
 grep 'sleep\.service.*running' /root/list-jobs.txt
 grep 'hello\.service' /root/list-jobs.txt && exit 1
 systemctl stop sleep.service hello-after-sleep.target
@@ -58,13 +58,13 @@ systemctl stop --job-mode=replace-irreversibly unstoppable.service
 systemctl start unstoppable.service
 
 # Test waiting for a started unit(s) to terminate again
-cat <<EOF >  /run/systemd/system/wait2.service
+cat <<EOF >/run/systemd/system/wait2.service
 [Unit]
 Description=Wait for 2 seconds
 [Service]
 ExecStart=/bin/sh -ec 'sleep 2'
 EOF
-cat <<EOF >  /run/systemd/system/wait5fail.service
+cat <<EOF >/run/systemd/system/wait5fail.service
 [Unit]
 Description=Wait for 5 seconds and fail
 [Service]
index f464f61a36c092146b1969d7a99ea3102f06f5df..a2a1292380818f67c726472a1e325856778eed83 100755 (executable)
@@ -63,15 +63,15 @@ grep '^FOO=' /output && { echo 'unexpected success'; exit 1; }
 grep '^SYSLOG_FACILITY=' /output && { echo 'unexpected success'; exit 1; }
 
 # `-b all` negates earlier use of -b (-b and -m are otherwise exclusive)
-journalctl -b -1 -b all -m > /dev/null
+journalctl -b -1 -b all -m >/dev/null
 
 # -b always behaves like -b0
-journalctl -q -b-1 -b0 | head -1 > /expected
-journalctl -q -b-1 -b  | head -1 > /output
+journalctl -q -b-1 -b0 | head -1 >/expected
+journalctl -q -b-1 -b  | head -1 >/output
 cmp /expected /output
 # ... even when another option follows (both of these should fail due to -m)
-{ journalctl -ball -b0 -m 2>&1 || :; } | head -1 > /expected
-{ journalctl -ball -b  -m 2>&1 || :; } | head -1 > /output
+{ journalctl -ball -b0 -m 2>&1 || :; } | head -1 >/expected
+{ journalctl -ball -b  -m 2>&1 || :; } | head -1 >/output
 cmp /expected /output
 
 # https://github.com/systemd/systemd/issues/13708
index b5888a255bca165f8dd94917342987a19f2e2d3a..7e7b0ec25a0f9566989f0023204a66376c0bec17 100755 (executable)
@@ -14,7 +14,7 @@ SocketGroup=adm
 SocketMode=0660
 EOF
 
-cat <<'EOF' > /run/systemd/system/test12@.service
+cat <<'EOF' >/run/systemd/system/test12@.service
 [Unit]
 Description=Test service
 [Service]
index 1844323d2f17f40ac5e339f1190a4ef9be71fd6c..3e66aa9d547db6ad3bac36e890c6b6fcf770703c 100755 (executable)
@@ -51,9 +51,9 @@ function check_norbind {
     local _root="/var/lib/machines/testsuite-13.norbind-path"
     rm -rf "$_root"
     mkdir -p /tmp/binddir/subdir
-    echo -n "outer" > /tmp/binddir/subdir/file
+    echo -n "outer" >/tmp/binddir/subdir/file
     mount -t tmpfs tmpfs /tmp/binddir/subdir
-    echo -n "inner" > /tmp/binddir/subdir/file
+    echo -n "inner" >/tmp/binddir/subdir/file
     /usr/lib/systemd/tests/testdata/create-busybox-container "$_root"
     systemd-nspawn $SUSE_OPTS--register=no -D "$_root" --bind=/tmp/binddir:/mnt:norbind /bin/sh -c 'CONTENT=$(cat /mnt/subdir/file); if [[ $CONTENT != "outer" ]]; then echo "*** unexpected content: $CONTENT"; return 1; fi'
 }
@@ -73,7 +73,7 @@ if [ -n "${VERSION_ID:+set}" ] && [ "${VERSION_ID}" != "${container_host_version
 if [ -n "${BUILD_ID:+set}" ] && [ "${BUILD_ID}" != "${container_host_build_id}" ]; then exit 1; fi
 if [ -n "${VARIANT_ID:+set}" ] && [ "${VARIANT_ID}" != "${container_host_variant_id}" ]; then exit 1; fi
 cd /tmp; (cd /run/host; md5sum os-release) | md5sum -c
-if echo test >> /run/host/os-release; then exit 1; fi
+if echo test >>/run/host/os-release; then exit 1; fi
 '
 
     local _os_release_source="/etc/os-release"
@@ -82,7 +82,7 @@ if echo test >> /run/host/os-release; then exit 1; fi
     elif [ -L "${_os_release_source}" ] && rm /etc/os-release; then
         # Ensure that /etc always wins if available
         cp /usr/lib/os-release /etc
-        echo MARKER=1 >> /etc/os-release
+        echo MARKER=1 >>/etc/os-release
     fi
 
     systemd-nspawn $SUSE_OPTS--register=no -D /testsuite-13.nc-container --bind="${_os_release_source}":/tmp/os-release /bin/sh -x -e -c "$_cmd"
@@ -96,7 +96,7 @@ if echo test >> /run/host/os-release; then exit 1; fi
 function check_machinectl_bind {
     local _cmd='for i in $(seq 1 20); do if test -f /tmp/marker; then exit 0; fi; sleep 0.5; done; exit 1;'
 
-    cat <<EOF > /run/systemd/system/nspawn_machinectl_bind.service
+    cat <<EOF >/run/systemd/system/nspawn_machinectl_bind.service
 [Service]
 Type=notify
 ExecStart=systemd-nspawn $SUSE_OPTS -D /testsuite-13.nc-container --notify-ready=no /bin/sh -x -e -c "$_cmd"
index 23a39bf09014cd1721a25b83c88d9cda0940dce7..fc392c584dcff186f5ce90c7d51000a9e22ac857 100755 (executable)
@@ -165,7 +165,7 @@ test_hierarchical_dropins () {
         echo "
 [Service]
 ExecCondition=/bin/echo $dropin
-        " > /usr/lib/systemd/system/$dropin/override.conf
+        " >/usr/lib/systemd/system/$dropin/override.conf
         systemctl daemon-reload
         check_ok a-b-c ExecCondition "/bin/echo $dropin"
     done
index 573ad4107916b84ce20b2658fc3c1011c83f4271..8be27d95073e627ea150bbc0a006daeefb6b158b 100755 (executable)
@@ -19,7 +19,7 @@ while : ; do
     sleep .5
 done
 
-cat > /run/udev/rules.d/50-testsuite.rules <<EOF
+cat >/run/udev/rules.d/50-testsuite.rules <<EOF
 ACTION!="remove", SUBSYSTEM=="block", KERNEL=="sda", ENV{SYSTEMD_WANTS}="foobar.service"
 EOF
 udevadm control --reload
@@ -36,7 +36,7 @@ while : ; do
     sleep .5
 done
 
-cat > /run/udev/rules.d/50-testsuite.rules <<EOF
+cat >/run/udev/rules.d/50-testsuite.rules <<EOF
 ACTION!="remove", SUBSYSTEM=="block", KERNEL=="sda", ENV{SYSTEMD_WANTS}="waldo.service"
 EOF
 udevadm control --reload
index c21fcc781b29af7ed8387103d6059510e9decc7f..5c77ab4b6a12861fe610b7c39e6d8a9680a7b67a 100755 (executable)
@@ -4,7 +4,7 @@ set -o pipefail
 
 mkdir -p /run/udev/rules.d/
 
-cat > /run/udev/rules.d/50-testsuite.rules <<EOF
+cat >/run/udev/rules.d/50-testsuite.rules <<EOF
 ACTION=="remove", GOTO="lo_end"
 
 SUBSYSTEM=="net", KERNEL=="lo", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/net/devices/lo"
index 02ac2176b5ad944d3367a3222cd0fb63ecc50689..e5178ce554371c32b302ec24f6cb025367e2ea31 100755 (executable)
@@ -7,9 +7,9 @@ test_rule="/run/udev/rules.d/49-test.rules"
 setup() {
     mkdir -p "${test_rule%/*}"
     cp -f /etc/udev/udev.conf /etc/udev/udev.conf.bckp
-    echo 'KERNEL=="lo", SUBSYSTEM=="net", PROGRAM=="/bin/sleep 60"' > "${test_rule}"
-    echo "event_timeout=30" >> /etc/udev/udev.conf
-    echo "timeout_signal=SIGABRT" >> /etc/udev/udev.conf
+    echo 'KERNEL=="lo", SUBSYSTEM=="net", PROGRAM=="/bin/sleep 60"' >"${test_rule}"
+    echo "event_timeout=30" >>/etc/udev/udev.conf
+    echo "timeout_signal=SIGABRT" >>/etc/udev/udev.conf
 
     systemctl restart systemd-udevd.service
 }
@@ -25,7 +25,7 @@ teardown() {
 run_test() {
     since="$(date +%T)"
 
-    echo add > /sys/class/net/lo/uevent
+    echo add >/sys/class/net/lo/uevent
 
     for n in {1..20}; do
         sleep 5
index c799936c0a3b04c61e1f1788f1d83aeba16d39e4..428aa813322898a6f471da5cf3e32d4886cd9c7d 100755 (executable)
@@ -11,7 +11,7 @@ mkdir -p /run/udev/rules.d/
     udevadm info /dev/null | grep -q -v 'E: TAGS=.*:changed:.*' &&
     udevadm info /dev/null | grep -q -v 'E: CURRENT_TAGS=.*:changed:.*'
 
-cat > /run/udev/rules.d/50-testsuite.rules <<EOF
+cat >/run/udev/rules.d/50-testsuite.rules <<EOF
 ACTION=="add", SUBSYSTEM=="mem", KERNEL=="null", TAG+="added"
 ACTION=="change", SUBSYSTEM=="mem", KERNEL=="null", TAG+="changed"
 EOF
index 0991ec9d590d71d26d32284a793b998e2bc4aea5..1e7f7f41b0a5d0de7f4fa95d540e802a7bc0ab1f 100755 (executable)
@@ -4,7 +4,7 @@ set -o pipefail
 
 mkdir -p /run/udev/rules.d/
 
-cat > /run/udev/rules.d/50-testsuite.rules <<EOF
+cat >/run/udev/rules.d/50-testsuite.rules <<EOF
 SUBSYSTEM=="mem", KERNEL=="null", OPTIONS="log_level=debug"
 ACTION=="add", SUBSYSTEM=="mem", KERNEL=="null", IMPORT{program}="/bin/echo -e HOGE=aa\\\\x20\\\\x20\\\\x20bb\nFOO=\\\\x20aaa\\\\x20\n\n\n"
 EOF
index d3c2df81019d19a3530c1b54931465368c0bfff7..c4e3ca211081aeadcbc03e601b4fd40b2e5c3883 100755 (executable)
@@ -6,10 +6,10 @@ systemd-run --wait -p FailureAction=poweroff true
 systemd-run --wait -p SuccessAction=poweroff false && { echo 'unexpected success'; exit 1; }
 
 if ! test -f /firstphase ; then
-    echo OK > /firstphase
+    echo OK >/firstphase
     systemd-run --wait -p SuccessAction=reboot true
 else
-    echo OK > /testok
+    echo OK >/testok
     systemd-run --wait -p FailureAction=poweroff false
 fi
 
index 57831c267f6d976237913c2c1229a7fdb1c559d7..dea2f4ba1f7f834863ff75197fe443895bad0360 100755 (executable)
@@ -34,6 +34,6 @@ else
     echo "Skipping TEST-19-DELEGATE, as the kernel doesn't actually support cgroup v2" >&2
 fi
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index 0e0feded3973df341feaff6341250e864a4eb744..6003e4f1813be4b865df6efd62be25d9d5b1d196 100755 (executable)
@@ -71,7 +71,7 @@ disown
 sleep infinity &
 disown
 
-echo \$MAINPID > /run/mainpidsh/pid
+echo \$MAINPID >/run/mainpidsh/pid
 EOF
 chmod +x /tmp/test20-mainpid.sh
 
@@ -95,7 +95,7 @@ disown
 sleep infinity &
 disown
 
-echo \$MAINPID > /run/mainpidsh2/pid
+echo \$MAINPID >/run/mainpidsh2/pid
 chown 1001:1001 /run/mainpidsh2/pid
 EOF
 chmod +x /tmp/test20-mainpid2.sh
@@ -140,10 +140,10 @@ systemd-run --unit=test20-mainpidsh3.service \
     && { echo 'unexpected success'; exit 1; }
 
 # Test that this failed due to timeout, and not some other error
-test `systemctl show -P Result test20-mainpidsh3.service` = timeout
+test $(systemctl show -P Result test20-mainpidsh3.service) = timeout
 
 systemd-analyze log-level info
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index ebee20a65a2f966be263b867d73b94d7aec4d858..a21523756230184e2507a0d2c49d2ff3bb572325 100755 (executable)
@@ -29,6 +29,6 @@ systemctl stop seven.service
 
 systemd-analyze log-level info
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index ef27e2dfbfa5041f3968c2dc60f806f06bd9f3ef..d4d2e0f9532b30a53e05a346a04f68e4f2e0a023 100755 (executable)
@@ -67,7 +67,7 @@ mkdir /var/tmp/scratch
 mv /var/tmp/testimage.raw /var/tmp/scratch/
 touch /var/tmp/scratch/anotherfile
 mkdir /var/tmp/scratch/adirectory
-echo "piep" > /var/tmp/scratch/adirectory/athirdfile
+echo "piep" >/var/tmp/scratch/adirectory/athirdfile
 
 # Test import-fs
 machinectl import-fs /var/tmp/scratch/
@@ -138,6 +138,6 @@ machinectl remove scratch5
 test ! -f /var/lib/machines/scratch5
 machinectl image-status scratch5 && { echo 'unexpected success'; exit 1; }
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index 22bd22c2b04fe99daaab5fe313d8ea3a7d49f03c..9c1abc5916186b83639dd96ca26158c68174d3ad 100755 (executable)
@@ -26,6 +26,6 @@ systemctl show-environment | grep '^FOO=$' && exit 1
 systemctl show-environment | grep '^PATH=.*testaddition$' && exit 1
 systemctl show-environment | grep -q '^PATH='
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index 2e55c275bf1d8443cc60fbbf50117aa60819e082..4e91aa73363ed2ff776c035e281e547f2a8c728c 100755 (executable)
@@ -93,6 +93,6 @@ umount /tmp/overlay
 umount /tmp/rootdir
 umount /tmp/app1
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index 425f153c3b5802284b20996fb95be4e9257cb9d6..cb3b46d2cbea58432c711a0f20ef9199008a2849 100755 (executable)
@@ -26,6 +26,6 @@ while test ! -f /tmp/clock-changed ; do sleep .5 ; done
 
 systemd-analyze log-level info
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index fcff82d804804673f5fb4b5013c7d14e019e4b30..42873bfd833a88166bdcb84f667ae13ea7b73057 100755 (executable)
@@ -6,5 +6,5 @@ if journalctl -b -t systemd --grep '\.device: Changed plugged -> dead'; then
     exit 1
 fi
 
-echo OK > /testok
+echo OK >/testok
 exit 0
index d79d054fcdb9f89d889ff10cab8aab60c1027ac3..929c76062be8f1d6fd2bbd5e56301dbf6e94eb3c 100755 (executable)
@@ -4,7 +4,7 @@
 set -ex
 set -o pipefail
 
-cat > /etc/systemd/system/testservice.service <<EOF
+cat >/etc/systemd/system/testservice.service <<EOF
 [Service]
 ConfigurationDirectory=testservice
 RuntimeDirectory=testservice
@@ -74,7 +74,7 @@ test ! -e /var/lib/testservice
 test ! -e /var/cache/testservice
 test ! -e /var/log/testservice
 
-cat > /etc/systemd/system/testservice.service <<EOF
+cat >/etc/systemd/system/testservice.service <<EOF
 [Service]
 DynamicUser=yes
 ConfigurationDirectory=testservice
@@ -169,7 +169,7 @@ test ! -L /var/lib/testservice
 test ! -L /var/cache/testservice
 test ! -L /var/log/testservice
 
-cat > /etc/systemd/system/tmp-hoge.mount <<EOF
+cat >/etc/systemd/system/tmp-hoge.mount <<EOF
 [Mount]
 What=tmpfs
 Type=tmpfs
@@ -244,7 +244,7 @@ test ! -d /var/lib/hoge
 test ! -d /var/cache/hoge
 test ! -d /var/log/hoge
 
-cat > /etc/systemd/system/testservice.socket <<EOF
+cat >/etc/systemd/system/testservice.socket <<EOF
 [Socket]
 ListenSequentialPacket=/run/testservice.socket
 RemoveOnStop=yes
@@ -314,6 +314,6 @@ test ! -e /var/lib/testsocket
 test ! -e /var/cache/testsocket
 test ! -e /var/log/testsocket
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index 827eafc43334715e8bb835fcc7cef3764b21399e..ca54a01f403894defed71ba567db2f187f469b66 100755 (executable)
@@ -44,6 +44,6 @@ test ! -f /var/lib/zzz/test-missing
 
 systemd-analyze log-level info
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index f5579ce8255ff21997db22f3df9cc5cf23cf6f73..3decf4b3f33ddc84aee5ea027d3b721f2ea0dfca 100755 (executable)
@@ -55,7 +55,7 @@ stopJournalctl() {
     # the --sync wait until the synchronization is complete
     echo "Force journald to write all queued messages"
     journalctl --sync
-    journalctl -u $unit --cursor-file="$journalCursorFile" > "$journalLog"
+    journalctl -u $unit --cursor-file="$journalCursorFile" >"$journalLog"
 }
 
 checkNUMA() {
@@ -64,21 +64,21 @@ checkNUMA() {
 }
 
 writePID1NUMAPolicy() {
-    echo [Manager] > $confDir/numa.conf
-    echo NUMAPolicy=$1 >> $confDir/numa.conf
-    echo NUMAMask=$2>> $confDir/numa.conf
+    echo [Manager] >$confDir/numa.conf
+    echo NUMAPolicy=$1 >>$confDir/numa.conf
+    echo NUMAMask=$2 >>$confDir/numa.conf
 }
 
 writeTestUnit() {
     mkdir -p $testUnitFile.d/
-    echo [Service] > $testUnitFile
-    echo ExecStart=/bin/sleep 3600 >> $testUnitFile
+    echo [Service] >$testUnitFile
+    echo ExecStart=/bin/sleep 3600 >>$testUnitFile
 }
 
 writeTestUnitNUMAPolicy() {
-    echo [Service] > $testUnitNUMAConf
-    echo NUMAPolicy=$1 >> $testUnitNUMAConf
-    echo NUMAMask=$2>> $testUnitNUMAConf
+    echo [Service] >$testUnitNUMAConf
+    echo NUMAPolicy=$1 >>$testUnitNUMAConf
+    echo NUMAMask=$2 >>$testUnitNUMAConf
     systemctl daemon-reload
 }
 
@@ -115,13 +115,13 @@ pid1StopUnit() {
 
 systemctlCheckNUMAProperties() {
     local LOGFILE="$(mktemp)"
-    systemctl show -p NUMAPolicy $1 > "$LOGFILE"
+    systemctl show -p NUMAPolicy $1 >"$LOGFILE"
     grep "NUMAPolicy=$2" "$LOGFILE"
 
-    > "$LOGFILE"
+    >"$LOGFILE"
 
     if [ -n "$3" ]; then
-        systemctl show -p NUMAMask $1 > "$LOGFILE"
+        systemctl show -p NUMAMask $1 >"$LOGFILE"
         grep "NUMAMask=$3" "$LOGFILE"
     fi
 }
@@ -281,7 +281,7 @@ else
 
     echo "Unit file CPUAffinity=NUMA support"
     writeTestUnitNUMAPolicy "bind" "0"
-    echo "CPUAffinity=numa" >> $testUnitNUMAConf
+    echo "CPUAffinity=numa" >>$testUnitNUMAConf
     systemctl daemon-reload
     systemctl start $testUnit
     systemctlCheckNUMAProperties $testUnit "bind" "0"
@@ -336,6 +336,6 @@ systemctl daemon-reload
 
 systemd-analyze log-level info
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index 696b8cdeef7fa4cd80001fb231f57bc570380f63..3ae0cb32fe166084805706ef53f98dd790fa3d6a 100755 (executable)
@@ -14,6 +14,6 @@ systemctl restart tmp-aaa.mount
 test -e /run/hoge/foo
 test ! -e /tmp/aaa/bbb
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index 18b7bd6dcee27b0b8f3c8564f20c1747cf927461..707fd8a86466105a59c2de360c1ea9a4c8f903df 100755 (executable)
@@ -245,7 +245,7 @@ test_preserve_state() {
     echo "Test that freezer state is preserved when recursive freezing is initiated from outside (e.g. by manager up the tree):"
 
     echo -n "  - freeze from outside: "
-    echo 1 > /sys/fs/cgroup/"${slice}"/cgroup.freeze
+    echo 1 >/sys/fs/cgroup/"${slice}"/cgroup.freeze
     # Give kernel some time to freeze the slice
     sleep 1
 
@@ -259,7 +259,7 @@ test_preserve_state() {
     echo "[ OK ]"
 
     echo -n "  - thaw from outside: "
-    echo 0 > /sys/fs/cgroup/"${slice}"/cgroup.freeze
+    echo 0 >/sys/fs/cgroup/"${slice}"/cgroup.freeze
     sleep 1
 
     check_freezer_state "${unit}" "running"
@@ -271,8 +271,8 @@ test_preserve_state() {
     echo -n "  - thaw from outside while inner service is frozen: "
     systemctl freeze "$unit"
     check_freezer_state "${unit}" "frozen"
-    echo 1 > /sys/fs/cgroup/"${slice}"/cgroup.freeze
-    echo 0 > /sys/fs/cgroup/"${slice}"/cgroup.freeze
+    echo 1 >/sys/fs/cgroup/"${slice}"/cgroup.freeze
+    echo 0 >/sys/fs/cgroup/"${slice}"/cgroup.freeze
     check_freezer_state "${slice}" "running"
     check_freezer_state "${unit}" "frozen"
     echo "[ OK ]"
@@ -293,5 +293,5 @@ test -e /sys/fs/cgroup/system.slice/cgroup.freeze && {
     test_preserve_state
 }
 
-echo OK > /testok
+echo OK >/testok
 exit 0
index 0b0cfc5aa5180264a9559aa973f405f3facc2cd9..5c0680878f352c2329dce336eeb066f58ccb7ded 100755 (executable)
@@ -11,7 +11,7 @@ SERVICE_PATH="$(mktemp /etc/systemd/system/execreloadXXX.service)"
 SERVICE_NAME="${SERVICE_PATH##*/}"
 
 echo "[#1] Failing ExecReload= should not kill the service"
-cat > "$SERVICE_PATH" << EOF
+cat >"$SERVICE_PATH" <<EOF
 [Service]
 ExecStart=/bin/sleep infinity
 ExecReload=/bin/false
@@ -27,7 +27,7 @@ systemctl stop $SERVICE_NAME
 
 
 echo "[#2] Failing ExecReload= should not kill the service (multiple ExecReload=)"
-cat > "$SERVICE_PATH" << EOF
+cat >"$SERVICE_PATH" <<EOF
 [Service]
 ExecStart=/bin/sleep infinity
 ExecReload=/bin/true
@@ -44,7 +44,7 @@ systemctl status $SERVICE_NAME
 systemctl stop $SERVICE_NAME
 
 echo "[#3] Failing ExecReload=- should not affect reload's exit code"
-cat > "$SERVICE_PATH" << EOF
+cat >"$SERVICE_PATH" <<EOF
 [Service]
 ExecStart=/bin/sleep infinity
 ExecReload=-/bin/false
@@ -59,6 +59,6 @@ systemctl stop $SERVICE_NAME
 
 systemd-analyze log-level info
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index 957d22031a9416a94e293901ee375845bc9482e9..7593401369eef8d07b47021bf995a407b9032646 100755 (executable)
@@ -41,6 +41,6 @@ done
 
 systemd-analyze log-level info
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index 7caf99be24834182e9603b4474cdfa1056508fd2..0a43f8ba57412a0ed908f93c2c500ec72c449c49 100755 (executable)
@@ -51,6 +51,6 @@ fi
 
 systemd-analyze log-level info
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index 155c3c73840da66445a8c60f0a2ec8c1865284e5..ca13c5dec5cab036070318298af3db78e9e98300 100755 (executable)
@@ -17,7 +17,7 @@ systemd-run --unit=exec2.service --wait -p StandardOutput=tty -p StandardError=t
     && { echo 'unexpected success'; exit 1; }
 test -f /run/exec2
 
-cat > /tmp/forking1.sh <<EOF
+cat >/tmp/forking1.sh <<EOF
 #!/usr/bin/env bash
 
 set -eux
@@ -33,7 +33,7 @@ chmod +x /tmp/forking1.sh
 systemd-run --unit=forking1.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=forking -p NotifyAccess=exec -p ExecStopPost='/bin/touch /run/forking1' /tmp/forking1.sh
 test -f /run/forking1
 
-cat > /tmp/forking2.sh <<EOF
+cat >/tmp/forking2.sh <<EOF
 #!/usr/bin/env bash
 
 set -eux
@@ -65,7 +65,7 @@ test -f /run/dbus1
 systemd-run --unit=dbus2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=dbus -p BusName=systemd.test.ExecStopPost -p ExecStopPost='/bin/touch /run/dbus2' true
 test -f /run/dbus2
 
-cat > /tmp/notify1.sh <<EOF
+cat >/tmp/notify1.sh <<EOF
 #!/usr/bin/env bash
 
 set -eux
@@ -90,6 +90,6 @@ test -f /run/idle2
 
 systemd-analyze log-level info
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index ec84868a21271cbc07591c636b359c286925cdb3..d9453e81a19b7f3bc4429196c908427e63c7ce8d 100755 (executable)
@@ -63,6 +63,6 @@ runas testuser systemd-run --wait --user --unit=test-protect-home-yes \
 
 systemd-analyze log-level info
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index 97541634d05b8a816f234f1d4e79422c8bf175cb..78022cb545b419b506e9114b25c3715b93a5f6b3 100755 (executable)
@@ -6,14 +6,14 @@ systemd-analyze log-level debug
 systemd-run -p LogNamespace=foobar echo "hello world"
 
 journalctl --namespace=foobar --sync
-journalctl --namespace=foobar > /tmp/hello-world
-journalctl > /tmp/no-hello-world
+journalctl --namespace=foobar >/tmp/hello-world
+journalctl >/tmp/no-hello-world
 
 grep "hello world" /tmp/hello-world
 ! grep "hello world" /tmp/no-hello-world
 
 systemd-analyze log-level info
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index 00bbdf507e62f79b4a4c2878dacbeebfe50fe2bd..5390acabf30fa8944bf212c3ffb9e15df92d9ef0 100755 (executable)
@@ -4,7 +4,7 @@ set -o pipefail
 
 # Check if homectl is installed, and if it isn't bail out early instead of failing
 if ! test -x /usr/bin/homectl ; then
-        echo OK > /testok
+        echo OK >/testok
         exit 0
 fi
 
@@ -76,6 +76,6 @@ homectl remove test-user
 
 systemd-analyze log-level info
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index 8c34289c529602223d99fe854fb6d9e1232d28c7..b008f52e9521e33cd2c8988b026efa298e240fcd 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env bash
 
 sleep infinity &
-echo $! > /leakedtestpid
+echo $! >/leakedtestpid
 wait $!
index 50034cf3d9a5e9af2c6ccfd1cfbcf60a79d21ebc..f8529083a2b23fdfcc7359ac157d218dc261063b 100755 (executable)
@@ -20,6 +20,6 @@ ps -p "$leaked_pid" && exit 42
 
 systemd-analyze log-level info
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index 03231e71b183b3f1f76fac1d1bd641ad9b98404e..ea84b1d72325d25ae214eb67651dcacebd3fb76a 100755 (executable)
@@ -3,7 +3,7 @@
 # ex: ts=8 sw=4 sts=4 et filetype=sh
 set -ex
 
-cat > /run/systemd/system/testservice-48.target <<EOF
+cat >/run/systemd/system/testservice-48.target <<EOF
 [Unit]
 Wants=testservice-48.service
 EOF
@@ -23,7 +23,7 @@ systemctl start testservice-48.target
 # May 07 23:12:20 systemd-testsuite testsuite-48.sh[53]: ef53
 sleep 3.1
 
-cat > /run/systemd/system/testservice-48.service <<EOF
+cat >/run/systemd/system/testservice-48.service <<EOF
 [Service]
 ExecStart=/bin/sleep infinity
 EOF
@@ -39,7 +39,7 @@ systemctl daemon-reload
 
 sleep 3.1
 
-cat > /run/systemd/system/testservice-48.service <<EOF
+cat >/run/systemd/system/testservice-48.service <<EOF
 [Service]
 ExecStart=/bin/sleep infinity
 EOF
@@ -61,7 +61,7 @@ systemctl daemon-reload
 
 sleep 3.1
 
-cat > /run/systemd/system/testservice-48.target <<EOF
+cat >/run/systemd/system/testservice-48.target <<EOF
 [Unit]
 Conflicts=shutdown.target
 Wants=testservice-48.service
@@ -71,7 +71,7 @@ systemctl daemon-reload
 
 systemctl start testservice-48.target
 
-cat > /run/systemd/system/testservice-48.service <<EOF
+cat >/run/systemd/system/testservice-48.service <<EOF
 [Service]
 ExecStart=/bin/sleep infinity
 EOF
@@ -80,6 +80,6 @@ systemctl restart testservice-48.target
 
 systemctl is-active testservice-48.service
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index 07bb20d99c67f5f39e77f62099bc9216e6ad85df..f92280f884bedabca0dbaeb22caf512af91f8f95 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 set -ex
 
-echo "MARKER_FIXED" > /run/testservice-49-fixed
+echo "MARKER_FIXED" >/run/testservice-49-fixed
 mkdir -p /run/inaccessible
 
 systemctl start testsuite-49-namespaced.service
@@ -11,7 +11,7 @@ set +e
 systemctl bind --mkdir testsuite-49-namespaced.service /run/testservice-49-fixed /run/inaccessible/testfile_fixed && exit 1
 set -e
 
-echo "MARKER_RUNTIME" > /run/testservice-49-runtime
+echo "MARKER_RUNTIME" >/run/testservice-49-runtime
 
 systemctl bind --mkdir testsuite-49-namespaced.service /run/testservice-49-runtime /tmp/testfile_runtime
 
@@ -38,6 +38,6 @@ set +e
 systemctl is-active testsuite-49-non-namespaced.service && exit 1
 set -e
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index e2d8ef6da23693b543f702ab7fba4220e5ccafa2..c3e7b4f04ef1f0430469d1dcdca00c7b96f60bc2 100755 (executable)
@@ -207,7 +207,7 @@ grep -F "squashfs" ${image_dir}/result/c | grep -q -F -v "nosuid"
 
 # Adding a new mounts at runtime works if the unit is in the active state,
 # so use Type=notify to make sure there's no race condition in the test
-cat > /run/systemd/system/testservice-50d.service <<EOF
+cat >/run/systemd/system/testservice-50d.service <<EOF
 [Service]
 RuntimeMaxSec=300
 Type=notify
index b8f5c0cb392fd1276319f27411b9286027c2f801..d145d7e33ec498628fa08d2d4758ea3b39fca54e 100755 (executable)
@@ -10,7 +10,7 @@ systemd-run -p LoadCredential=passwd:/etc/passwd \
             -p DynamicUser=1 \
             --wait \
             --pipe \
-            cat '${CREDENTIALS_DIRECTORY}/passwd' '${CREDENTIALS_DIRECTORY}/shadow' '${CREDENTIALS_DIRECTORY}/dog' > /tmp/ts54-concat
+            cat '${CREDENTIALS_DIRECTORY}/passwd' '${CREDENTIALS_DIRECTORY}/shadow' '${CREDENTIALS_DIRECTORY}/dog' >/tmp/ts54-concat
 ( cat /etc/passwd /etc/shadow && echo -n wuff ) | cmp /tmp/ts54-concat
 rm /tmp/ts54-concat
 
@@ -28,6 +28,6 @@ systemd-run -p LoadCredential=passwd:/etc/passwd \
 
 systemd-analyze log-level info
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index f7896ada4274c3d53a5138b345acd121db6d66dd..d73f4b1e7ae21b76e9a5000e345c1116a61b6bf4 100755 (executable)
@@ -6,19 +6,19 @@ systemd-analyze log-level debug
 systemd-analyze log-target console
 
 # Loose checks to ensure the environment has the necessary features for systemd-oomd
-[[ -e /proc/pressure ]] || echo "no PSI" >> /skipped
+[[ -e /proc/pressure ]] || echo "no PSI" >>/skipped
 cgroup_type=$(stat -fc %T /sys/fs/cgroup/)
 if [[ "$cgroup_type" != *"cgroup2"* ]] && [[ "$cgroup_type" != *"0x63677270"* ]]; then
-    echo "no cgroup2" >> /skipped
+    echo "no cgroup2" >>/skipped
 fi
 if [ ! -f /usr/lib/systemd/systemd-oomd ] && [ ! -f /lib/systemd/systemd-oomd ]; then
-    echo "no oomd" >> /skipped
+    echo "no oomd" >>/skipped
 fi
 [[ -e /skipped ]] && exit 0 || true
 
 rm -rf /etc/systemd/system/testsuite-55-testbloat.service.d
 
-echo "DefaultMemoryPressureDurationSec=5s" >> /etc/systemd/oomd.conf
+echo "DefaultMemoryPressureDurationSec=5s" >>/etc/systemd/oomd.conf
 
 systemctl start testsuite-55-testchill.service
 systemctl start testsuite-55-testbloat.service
@@ -47,8 +47,8 @@ if setfattr -n user.xattr_test -v 1 /sys/fs/cgroup/; then
     sleep 120 # wait for systemd-oomd kill cool down and elevated memory pressure to come down
 
     mkdir -p /etc/systemd/system/testsuite-55-testbloat.service.d/
-    echo "[Service]" > /etc/systemd/system/testsuite-55-testbloat.service.d/override.conf
-    echo "ManagedOOMPreference=avoid" >> /etc/systemd/system/testsuite-55-testbloat.service.d/override.conf
+    echo "[Service]" >/etc/systemd/system/testsuite-55-testbloat.service.d/override.conf
+    echo "ManagedOOMPreference=avoid" >>/etc/systemd/system/testsuite-55-testbloat.service.d/override.conf
 
     systemctl daemon-reload
     systemctl start testsuite-55-testchill.service
@@ -71,6 +71,6 @@ fi
 
 systemd-analyze log-level info
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0
index 0b5010b9f96e68999128f892239a5cf2abc6830e..079da072015a666c9e20c90332c77a22d3c6e511 100755 (executable)
@@ -93,6 +93,6 @@ systemd-run --wait --unit=eight -p ExitType=cgroup /tmp/test56-exit-cgroup-uncle
 
 systemd-analyze log-level info
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0