]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: set working directory even if it is expected that the command fails
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 8 Nov 2023 03:16:26 +0000 (12:16 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 8 Nov 2023 07:07:27 +0000 (08:07 +0100)
Otherwise, parsing may unexpectedly succeeds but fail to run writing
.network files with permission error.

Follow-up for 6bc5de53e8410fdec817300185b7ad72cd7775dd.

test/test-network-generator-conversion.sh

index f03847c1faee76f82a3e51f479cd5d26b378c7aa..6224a4d04f96a4839514dbd6b918f4602ae146d0 100755 (executable)
@@ -307,5 +307,5 @@ INVALID_COMMAND_LINES=(
     "ip=:::::dhcp99:dhcp6:10.0.0.128:[fdef:c400:bd01:1096::bbbb]:"
 )
 for cmdline in "${INVALID_COMMAND_LINES[@]}"; do
-    (! SYSTEMD_LOG_LEVEL=debug SYSTEMD_PROC_CMDLINE="$cmdline" "$GENERATOR_BIN")
+    (! SYSTEMD_LOG_LEVEL=debug SYSTEMD_PROC_CMDLINE="$cmdline" "$GENERATOR_BIN" --root "$WORK_DIR")
 done