From cbcaf9f47e125d2214138f0ec9486b3a8727e6d7 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 6 Mar 2025 17:31:49 +0100 Subject: [PATCH] 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. --- test/units/TEST-13-NSPAWN.machined.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/units/TEST-13-NSPAWN.machined.sh b/test/units/TEST-13-NSPAWN.machined.sh index d8c15dfcfb..46884791ea 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