From: Daan De Meyer Date: Thu, 6 Mar 2025 16:31:49 +0000 (+0100) Subject: TEST-13-NSPAWN: Set TERM=dumb when calling machinectl shell X-Git-Tag: v258-rc1~1158 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cbcaf9f47e125d2214138f0ec9486b3a8727e6d7;p=thirdparty%2Fsystemd.git TEST-13-NSPAWN: Set TERM=dumb when calling machinectl shell We only consider something not a tty if it's not connected to a tty and not connected to /dev/null, so let's use the environment variable instead to tell machinectl shell that it shouldn't do any of its TTY stuff. --- diff --git a/test/units/TEST-13-NSPAWN.machined.sh b/test/units/TEST-13-NSPAWN.machined.sh index d8c15dfcfb8..46884791ea6 100755 --- a/test/units/TEST-13-NSPAWN.machined.sh +++ b/test/units/TEST-13-NSPAWN.machined.sh @@ -113,8 +113,8 @@ machinectl disable long-running test ! -L /etc/systemd/system/machines.target.wants/systemd-nspawn@long-running.service machinectl disable long-running long-running long-running container1 -[[ "$(machinectl shell testuser@ /usr/bin/bash -c 'echo -ne $FOO')" == "" ]] -[[ "$(machinectl shell --setenv=FOO=bar testuser@ /usr/bin/bash -c 'echo -ne $FOO')" == "bar" ]] +[[ "$(TERM=dumb machinectl shell testuser@ /usr/bin/bash -c 'echo -ne $FOO')" == "" ]] +[[ "$(TERM=dumb machinectl shell --setenv=FOO=bar testuser@ /usr/bin/bash -c 'echo -ne $FOO')" == "bar" ]] [[ "$(machinectl show --property=State --value long-running)" == "running" ]] # Equivalent to machinectl kill --signal=SIGRTMIN+4 --kill-whom=leader