lib: test: check systemd in tst_virt_hyperv() as tst_test.sh
PATCH 1/1 lib: test: check systemd in tst_virt_hyperv() as tst_test.sh
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.
--- testcases/lib/test.sh | 2 ++ 1 file changed, 2 insertions(+)
testcases/lib/test.sh +2 -0
@@ -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
Signature · 5 lines
2.34.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Victor,
Quoted 1 line · Victor Cheng-Yen Yang
lib: test: check systemd in
tst_virt_hyperv()astst_test.sh
Verdict - Reviewed
---
Note:
The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Victor,
Quoted 3 lines
Guard
tst_virt_hyperv()in the old shell API with a command lookup, as thetst_test.shversion already does. Without systemd installed every test calling it printed "systemd-detect-virt: not found" to stderr.
Thanks for your fix, merged.
FYI I send a follow up
https://patchwork.kernel.org/project/ltp/patch/[email protected]/
https://lore.kernel.org/ltp/[email protected]/T/#u
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp