Browse Source

treewide: more portable bash shebangs

As in 2a5fcfae02
and in 3e67e5c992
using /usr/bin/env allows bash to be looked up in PATH
rather than being hard-coded.

As with the previous changes the same arguments apply
- distributions have scripts to rewrite shebangs on installation and
  they know what locations to rely on.
- For tests/compilation we should rather rely on the user to have setup
  there PATH correctly.

In particular this makes testing from git easier on NixOS where do not provide
/bin/bash to improve compose-ability.
master
Jörg Thalheim 2 years ago committed by Zbigniew Jędrzejewski-Szmek
parent
commit
ff12a7954c
  1. 3
      configure
  2. 2
      src/basic/linux/update.sh
  3. 2
      src/kernel-install/00-entry-directory.install
  4. 2
      src/kernel-install/50-depmod.install
  5. 2
      src/kernel-install/90-loaderentry.install
  6. 2
      src/kernel-install/kernel-install
  7. 2
      test/TEST-01-BASIC/test.sh
  8. 2
      test/TEST-02-CRYPTSETUP/test.sh
  9. 3
      test/TEST-03-JOBS/test-jobs.sh
  10. 2
      test/TEST-03-JOBS/test.sh
  11. 2
      test/TEST-04-JOURNAL/test-journal.sh
  12. 2
      test/TEST-04-JOURNAL/test.sh
  13. 2
      test/TEST-05-RLIMITS/test-rlimits.sh
  14. 2
      test/TEST-05-RLIMITS/test.sh
  15. 2
      test/TEST-06-SELINUX/test-selinux-checks.sh
  16. 2
      test/TEST-06-SELINUX/test.sh
  17. 2
      test/TEST-07-ISSUE-1981/test-segfault.sh
  18. 2
      test/TEST-07-ISSUE-1981/test.sh
  19. 2
      test/TEST-08-ISSUE-2730/test.sh
  20. 2
      test/TEST-09-ISSUE-2691/test.sh
  21. 2
      test/TEST-10-ISSUE-2467/test.sh
  22. 5
      test/TEST-11-ISSUE-3166/test.sh
  23. 4
      test/TEST-12-ISSUE-3171/test.sh
  24. 2
      test/TEST-13-NSPAWN-SMOKE/create-busybox-container
  25. 4
      test/TEST-13-NSPAWN-SMOKE/test.sh
  26. 4
      test/TEST-14-MACHINE-ID/test.sh
  27. 2
      test/TEST-15-DROPIN/test.sh
  28. 2
      test/TEST-16-EXTEND-TIMEOUT/assess.sh
  29. 2
      test/TEST-16-EXTEND-TIMEOUT/extend_timeout_test_service.sh
  30. 2
      test/TEST-16-EXTEND-TIMEOUT/test.sh
  31. 2
      test/TEST-17-UDEV-WANTS/test.sh
  32. 2
      test/TEST-17-UDEV-WANTS/testsuite.sh
  33. 2
      test/TEST-18-FAILUREACTION/test.sh
  34. 2
      test/TEST-18-FAILUREACTION/testsuite.sh
  35. 2
      test/TEST-19-DELEGATE/test.sh
  36. 2
      test/TEST-19-DELEGATE/testsuite.sh
  37. 2
      test/TEST-20-MAINPIDGAMES/test.sh
  38. 8
      test/TEST-20-MAINPIDGAMES/testsuite.sh
  39. 2
      test/TEST-21-SYSUSERS/test.sh
  40. 2
      test/TEST-22-TMPFILES/run-tmpfiles-tests.sh
  41. 2
      test/TEST-22-TMPFILES/test-09.sh
  42. 2
      test/TEST-22-TMPFILES/test.sh
  43. 2
      test/TEST-23-TYPE-EXEC/test.sh
  44. 2
      test/TEST-23-TYPE-EXEC/testsuite.sh
  45. 2
      test/TEST-24-UNIT-TESTS/test.sh
  46. 2
      test/TEST-24-UNIT-TESTS/testsuite.sh
  47. 2
      test/TEST-25-IMPORT/test.sh
  48. 2
      test/TEST-25-IMPORT/testsuite.sh
  49. 2
      test/TEST-26-SETENV/test.sh
  50. 2
      test/TEST-26-SETENV/testsuite.sh
  51. 2
      test/TEST-27-STDOUTFILE/test.sh
  52. 2
      test/TEST-27-STDOUTFILE/testsuite.sh
  53. 2
      test/TEST-28-PERCENTJ-WANTEDBY/test.sh
  54. 2
      test/TEST-29-UDEV-ID_RENAMING/test.sh
  55. 2
      test/TEST-29-UDEV-ID_RENAMING/testsuite.sh
  56. 2
      test/TEST-30-ONCLOCKCHANGE/test.sh
  57. 2
      test/TEST-30-ONCLOCKCHANGE/testsuite.sh
  58. 2
      test/TEST-31-DEVICE-ENUMERATION/test.sh
  59. 2
      test/TEST-31-DEVICE-ENUMERATION/testsuite.sh
  60. 2
      test/TEST-32-OOMPOLICY/test.sh
  61. 2
      test/TEST-32-OOMPOLICY/testsuite.sh
  62. 2
      test/TEST-33-CLEAN-UNIT/test.sh
  63. 2
      test/TEST-33-CLEAN-UNIT/testsuite.sh
  64. 2
      test/TEST-34-DYNAMICUSERMIGRATE/test.sh
  65. 2
      test/TEST-34-DYNAMICUSERMIGRATE/testsuite.sh
  66. 2
      test/TEST-35-NETWORK-GENERATOR/test.sh
  67. 2
      test/TEST-36-NUMAPOLICY/test.sh
  68. 2
      test/TEST-36-NUMAPOLICY/testsuite.sh
  69. 2
      test/TEST-37-RUNTIMEDIRECTORYPRESERVE/test.sh
  70. 2
      test/TEST-37-RUNTIMEDIRECTORYPRESERVE/testsuite.sh
  71. 2
      test/TEST-39-EXECRELOAD/test.sh
  72. 2
      test/TEST-39-EXECRELOAD/testsuite.sh
  73. 2
      test/TEST-40-EXEC-COMMAND-EX/test.sh
  74. 2
      test/TEST-40-EXEC-COMMAND-EX/testsuite.sh
  75. 2
      test/TEST-41-ONESHOT-RESTART/test.sh
  76. 2
      test/TEST-41-ONESHOT-RESTART/testsuite.sh
  77. 2
      test/TEST-42-EXECSTOPPOST/test.sh
  78. 8
      test/TEST-42-EXECSTOPPOST/testsuite.sh
  79. 2
      test/TEST-43-PRIVATEUSER-UNPRIV/test.sh
  80. 2
      test/TEST-43-PRIVATEUSER-UNPRIV/testsuite.sh
  81. 2
      test/TEST-44-LOG-NAMESPACE/test.sh
  82. 2
      test/TEST-44-LOG-NAMESPACE/testsuite.sh
  83. 2
      test/TEST-45-REPART/test.sh
  84. 2
      test/TEST-45-REPART/testsuite.sh
  85. 2
      test/TEST-46-HOMED/test.sh
  86. 2
      test/TEST-46-HOMED/testsuite.sh
  87. 2
      test/mocks/fsck
  88. 3
      test/run-integration-tests.sh
  89. 3
      test/test-efi-create-disk.sh
  90. 12
      test/test-functions
  91. 2
      tools/check-directives.sh
  92. 2
      tools/coverity.sh
  93. 2
      tools/meson-vcs-tag.sh
  94. 2
      tools/oss-fuzz.sh

3
configure vendored

@ -1,4 +1,5 @@
#!/bin/bash -e
#!/usr/bin/env bash
set -e
cflags=CFLAGS="$CFLAGS"
cxxflags=CXXFLAGS="$CXXFLAGS"

2
src/basic/linux/update.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eu

2
src/kernel-install/00-entry-directory.install

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

2
src/kernel-install/50-depmod.install

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

2
src/kernel-install/90-loaderentry.install

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

2
src/kernel-install/kernel-install

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
# SPDX-License-Identifier: LGPL-2.1+

2
test/TEST-01-BASIC/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="Basic systemd setup"
RUN_IN_UNPRIVILEGED_CONTAINER=${RUN_IN_UNPRIVILEGED_CONTAINER:-yes}

2
test/TEST-02-CRYPTSETUP/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="cryptsetup systemd setup"
TEST_NO_NSPAWN=1

3
test/TEST-03-JOBS/test-jobs.sh

@ -1,4 +1,5 @@
#!/bin/bash -ex
#!/usr/bin/env bash
set -ex
# Test merging of a --job-mode=ignore-dependencies job into a previously
# installed job.

2
test/TEST-03-JOBS/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="Job-related tests"
TEST_NO_QEMU=1

2
test/TEST-04-JOURNAL/test-journal.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -x
set -e
set -o pipefail

2
test/TEST-04-JOURNAL/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="Journal-related tests"

2
test/TEST-05-RLIMITS/test-rlimits.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -x
set -e
set -o pipefail

2
test/TEST-05-RLIMITS/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="Resource limits-related tests"

2
test/TEST-06-SELINUX/test-selinux-checks.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -x
set -e
set -o pipefail

2
test/TEST-06-SELINUX/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="SELinux tests"
TEST_NO_NSPAWN=1

2
test/TEST-07-ISSUE-1981/test-segfault.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -x
set -e

2
test/TEST-07-ISSUE-1981/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="https://github.com/systemd/systemd/issues/1981"
TEST_NO_QEMU=1

2
test/TEST-08-ISSUE-2730/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="https://github.com/systemd/systemd/issues/2730"
TEST_NO_NSPAWN=1

2
test/TEST-09-ISSUE-2691/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="https://github.com/systemd/systemd/issues/2691"
TEST_NO_NSPAWN=1

2
test/TEST-10-ISSUE-2467/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="https://github.com/systemd/systemd/issues/2467"

5
test/TEST-11-ISSUE-3166/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="https://github.com/systemd/systemd/issues/3166"
TEST_NO_NSPAWN=1
@ -41,7 +41,8 @@ EOF
cat >$initdir/test-fail-on-restart.sh <<'EOF'
#!/bin/bash -x
#!/usr/bin/env bash
set -x
systemctl start fail-on-restart.service
active_state=$(systemctl show --property ActiveState fail-on-restart.service)

4
test/TEST-12-ISSUE-3171/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="https://github.com/systemd/systemd/issues/3171"
TEST_NO_QEMU=1
@ -29,7 +29,7 @@ Type=oneshot
EOF
cat >$initdir/test-socket-group.sh <<'EOF'
#!/bin/bash
#!/usr/bin/env bash
set -x
set -e
set -o pipefail

2
test/TEST-13-NSPAWN-SMOKE/create-busybox-container

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
set -u

4
test/TEST-13-NSPAWN-SMOKE/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="systemd-nspawn smoke test"
TEST_NO_NSPAWN=1
@ -33,7 +33,7 @@ Type=oneshot
EOF
cat >$initdir/test-nspawn.sh <<'EOF'
#!/bin/bash
#!/usr/bin/env bash
set -x
set -e
set -u

4
test/TEST-14-MACHINE-ID/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="/etc/machine-id testing"
TEST_NO_NSPAWN=1
@ -29,7 +29,7 @@ Type=oneshot
EOF
cat >$initdir/test-machine-id-setup.sh <<'EOF'
#!/bin/bash
#!/usr/bin/env bash
set -e
set -x

2
test/TEST-15-DROPIN/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="Dropin tests"
TEST_NO_QEMU=1

2
test/TEST-16-EXTEND-TIMEOUT/assess.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -v -x
rm -f /test.log

2
test/TEST-16-EXTEND-TIMEOUT/extend_timeout_test_service.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -x
set -e
set -o pipefail

2
test/TEST-16-EXTEND-TIMEOUT/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="EXTEND_TIMEOUT_USEC=usec start/runtime/stop tests"
SKIP_INITRD=yes

2
test/TEST-17-UDEV-WANTS/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="UDEV SYSTEMD_WANTS property"
TEST_NO_NSPAWN=1

2
test/TEST-17-UDEV-WANTS/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/TEST-18-FAILUREACTION/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="FailureAction= operation"

2
test/TEST-18-FAILUREACTION/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/TEST-19-DELEGATE/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="test cgroup delegation in the unified hierarchy"
TEST_NO_NSPAWN=1

2
test/TEST-19-DELEGATE/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/TEST-20-MAINPIDGAMES/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="test changing main PID"

8
test/TEST-20-MAINPIDGAMES/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail
@ -55,7 +55,7 @@ systemd-notify --uid=1000 MAINPID=$$
test `systemctl show -p MainPID --value testsuite.service` -eq $$
cat >/tmp/mainpid.sh <<EOF
#!/bin/bash
#!/usr/bin/env bash
set -eux
set -o pipefail
@ -79,7 +79,7 @@ systemd-run --unit=mainpidsh.service -p StandardOutput=tty -p StandardError=tty
test `systemctl show -p MainPID --value mainpidsh.service` -eq `cat /run/mainpidsh/pid`
cat >/tmp/mainpid2.sh <<EOF
#!/bin/bash
#!/usr/bin/env bash
set -eux
set -o pipefail
@ -104,7 +104,7 @@ systemd-run --unit=mainpidsh2.service -p StandardOutput=tty -p StandardError=tty
test `systemctl show -p MainPID --value mainpidsh2.service` -eq `cat /run/mainpidsh2/pid`
cat >/dev/shm/mainpid3.sh <<EOF
#!/bin/bash
#!/usr/bin/env bash
set -eux
set -o pipefail

2
test/TEST-21-SYSUSERS/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="Sysuser-related tests"

2
test/TEST-22-TMPFILES/run-tmpfiles-tests.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -x
set -e

2
test/TEST-22-TMPFILES/test-09.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
set -x

2
test/TEST-22-TMPFILES/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="Tmpfiles related tests"
TEST_NO_QEMU=1

2
test/TEST-23-TYPE-EXEC/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="test Type=exec"

2
test/TEST-23-TYPE-EXEC/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/TEST-24-UNIT-TESTS/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="Run unit tests under containers"
RUN_IN_UNPRIVILEGED_CONTAINER=yes

2
test/TEST-24-UNIT-TESTS/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#set -ex
#set -o pipefail

2
test/TEST-25-IMPORT/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="test importd"

2
test/TEST-25-IMPORT/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/TEST-26-SETENV/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="test setenv"

2
test/TEST-26-SETENV/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/TEST-27-STDOUTFILE/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="test StandardOutput=file:"

2
test/TEST-27-STDOUTFILE/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/TEST-28-PERCENTJ-WANTEDBY/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="Ensure %j Wants directives work"
RUN_IN_UNPRIVILEGED_CONTAINER=yes

2
test/TEST-29-UDEV-ID_RENAMING/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="UDEV ID_RENAMING property"
TEST_NO_NSPAWN=1

2
test/TEST-29-UDEV-ID_RENAMING/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/TEST-30-ONCLOCKCHANGE/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="test OnClockChange= + OnTimezoneChange="
TEST_NO_NSPAWN=1

2
test/TEST-30-ONCLOCKCHANGE/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/TEST-31-DEVICE-ENUMERATION/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="plugged -> dead -> plugged issue #11997"
TEST_NO_NSPAWN=1

2
test/TEST-31-DEVICE-ENUMERATION/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
set -o pipefail

2
test/TEST-32-OOMPOLICY/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="test OOM killer logic"
TEST_NO_NSPAWN=1

2
test/TEST-32-OOMPOLICY/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/TEST-33-CLEAN-UNIT/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
set -e

2
test/TEST-33-CLEAN-UNIT/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
set -ex

2
test/TEST-34-DYNAMICUSERMIGRATE/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="test migrating state directory from DynamicUser=1 to DynamicUser=0 and back"

2
test/TEST-34-DYNAMICUSERMIGRATE/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/TEST-35-NETWORK-GENERATOR/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="network-generator tests"

2
test/TEST-36-NUMAPOLICY/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="test MUMAPolicy= and NUMAMask= options"

2
test/TEST-36-NUMAPOLICY/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/TEST-37-RUNTIMEDIRECTORYPRESERVE/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
set -e

2
test/TEST-37-RUNTIMEDIRECTORYPRESERVE/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
set -ex

2
test/TEST-39-EXECRELOAD/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="Test ExecReload= (PR #13098)"

2
test/TEST-39-EXECRELOAD/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/TEST-40-EXEC-COMMAND-EX/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="test ExecXYZEx= service unit dbus hookups"

2
test/TEST-40-EXEC-COMMAND-EX/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/TEST-41-ONESHOT-RESTART/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="Test oneshot unit restart on failure"
. $TEST_BASE_DIR/test-functions

2
test/TEST-41-ONESHOT-RESTART/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/TEST-42-EXECSTOPPOST/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="test that ExecStopPost= is always run"

8
test/TEST-42-EXECSTOPPOST/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
systemd-analyze log-level debug
@ -16,7 +16,7 @@ test -f /run/exec1
test -f /run/exec2
cat > /tmp/forking1.sh <<EOF
#!/bin/bash
#!/usr/bin/env bash
set -eux
@ -32,7 +32,7 @@ systemd-run --unit=forking1.service --wait -p StandardOutput=tty -p StandardErro
test -f /run/forking1
cat > /tmp/forking2.sh <<EOF
#!/bin/bash
#!/usr/bin/env bash
set -eux
@ -62,7 +62,7 @@ test -f /run/dbus1
test -f /run/dbus2
cat > /tmp/notify1.sh <<EOF
#!/bin/bash
#!/usr/bin/env bash
set -eux

2
test/TEST-43-PRIVATEUSER-UNPRIV/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="Test PrivateUsers=yes on user manager"
. $TEST_BASE_DIR/test-functions

2
test/TEST-43-PRIVATEUSER-UNPRIV/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/TEST-44-LOG-NAMESPACE/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="test log namespaces"

2
test/TEST-44-LOG-NAMESPACE/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
systemd-analyze log-level debug

2
test/TEST-45-REPART/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="test systemd-repart"

2
test/TEST-45-REPART/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
# Check if repart is installed, and if it isn't bail out early instead of failing

2
test/TEST-46-HOMED/test.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
TEST_DESCRIPTION="testing homed"
TEST_NO_QEMU=1

2
test/TEST-46-HOMED/testsuite.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
set -o pipefail

2
test/mocks/fsck

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
fd=0
OPTIND=1

3
test/run-integration-tests.sh

@ -1,4 +1,5 @@
#!/bin/bash -e
#!/usr/bin/env bash
set -e
BUILD_DIR="$($(dirname "$0")/../tools/find-build-dir.sh)"
if [ $# -gt 0 ]; then

3
test/test-efi-create-disk.sh

@ -1,4 +1,5 @@
#!/bin/bash -e
#!/usr/bin/env bash
set -e
out="$1"
systemd_efi="$2"

12
test/test-functions

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
@ -39,7 +39,7 @@ PATH_TO_INIT=$ROOTLIBDIR/systemd
[ "$SYSTEMD_NSPAWN" ] || SYSTEMD_NSPAWN=$(which -a $BUILD_DIR/systemd-nspawn systemd-nspawn 2>/dev/null | grep '^/' -m1)
[ "$JOURNALCTL" ] || JOURNALCTL=$(which -a $BUILD_DIR/journalctl journalctl 2>/dev/null | grep '^/' -m1)
BASICTOOLS="test sh bash setsid loadkeys setfont login sulogin gzip sleep echo head tail cat mount umount cryptsetup date dmsetup modprobe sed cmp tee rm true false chmod chown ln xargs"
BASICTOOLS="test env sh bash setsid loadkeys setfont login sulogin gzip sleep echo head tail cat mount umount cryptsetup date dmsetup modprobe sed cmp tee rm true false chmod chown ln xargs"
DEBUGTOOLS="df free ls stty ps ln ip route dmesg dhclient mkdir cp ping dhclient strace less grep id tty touch du sort hostname find vi mv"
STATEDIR="${BUILD_DIR:-.}/test/$(basename $(dirname $(realpath $0)))"
@ -376,7 +376,7 @@ create_valgrind_wrapper() {
local _valgrind_wrapper=$initdir/$ROOTLIBDIR/systemd-under-valgrind
ddebug "Create $_valgrind_wrapper"
cat >$_valgrind_wrapper <<EOF
#!/bin/bash
#!/usr/bin/env bash
mount -t proc proc /proc
exec valgrind --leak-check=full --log-file=/valgrind.out $ROOTLIBDIR/systemd "\$@"
@ -405,7 +405,7 @@ create_asan_wrapper() {
esac
cat >$_asan_wrapper <<EOF
#!/bin/bash
#!/usr/bin/env bash
set -x
@ -488,7 +488,7 @@ create_strace_wrapper() {
local _strace_wrapper=$initdir/$ROOTLIBDIR/systemd-under-strace
ddebug "Create $_strace_wrapper"
cat >$_strace_wrapper <<EOF
#!/bin/bash
#!/usr/bin/env bash
exec strace -D -o /strace.out $ROOTLIBDIR/systemd "\$@"
EOF
@ -675,7 +675,7 @@ strip_binaries() {
create_rc_local() {
mkdir -p $initdir/etc/rc.d
cat >$initdir/etc/rc.d/rc.local <<EOF
#!/bin/bash
#!/usr/bin/env bash
exit 0
EOF
chmod 0755 $initdir/etc/rc.d/rc.local

2
tools/check-directives.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
which perl &>/dev/null || exit 77

2
tools/coverity.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# The official unmodified version of the script can be found at
# https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh

2
tools/meson-vcs-tag.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eu
set -o pipefail

2
tools/oss-fuzz.sh

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1+
set -ex

Loading…
Cancel
Save