From: Victor Cheng-Yen Yang via ltp <ltp@lists.linux.it>
To: <ltp@lists.linux.it>
Subject: [LTP] [PATCH] lib: test: check systemd in tst_virt_hyperv() as tst_test.sh
Date: Thu, 20 Aug 2026 15:21:33 +0800 [thread overview]
Message-ID: <20260820072133.2036117-1-cyyang772@andestech.com> (raw)
Guard tst_virt_hyperv() in the old shell API with a command lookup, as
the tst_test.sh version already does. Without systemd installed every
test calling it printed "systemd-detect-virt: not found" to stderr.
Signed-off-by: Victor Cheng-Yen Yang <cyyang772@andestech.com>
---
testcases/lib/test.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/testcases/lib/test.sh b/testcases/lib/test.sh
index d26cf5df0..edae1313e 100644
--- a/testcases/lib/test.sh
+++ b/testcases/lib/test.sh
@@ -331,6 +331,8 @@ tst_virt_hyperv()
{
local v
+ command -v systemd-detect-virt > /dev/null 2>&1 || return 1
+
v="$(systemd-detect-virt)"
[ $? -eq 0 ] || return 1
--
2.34.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next reply other threads:[~2026-08-20 7:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 7:21 Victor Cheng-Yen Yang via ltp [this message]
2026-08-20 7:47 ` [LTP] lib: test: check systemd in tst_virt_hyperv() as tst_test.sh linuxtestproject.agent
2026-08-25 5:03 ` [LTP] [PATCH] " Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260820072133.2036117-1-cyyang772@andestech.com \
--to=ltp@lists.linux.it \
--cc=cyyang772@andestech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.