On Wed, Nov 05, 2025 at 12:16:42PM +0100, Stefano Garzarella wrote:
On Tue, Nov 04, 2025 at 01:50:50PM -0800, Bobby Eshleman wrote:
From: Bobby Eshleman bobbyeshleman@meta.com
Sometimes VMs will have some intermittent dmesg warnings that are unrelated to vsock. Change the dmesg parsing to filter on strings containing 'vsock' to avoid false positive failures that are unrelated to vsock. The downside is that it is possible for some vsock related warnings to not contain the substring 'vsock', so those will be missed.
Fixes: a4a65c6fe08b ("selftests/vsock: add initial vmtest.sh for vsock") Reviewed-by: Simon Horman horms@kernel.org Signed-off-by: Bobby Eshleman bobbyeshleman@meta.com
Previously was part of the series: https://lore.kernel.org/all/20251022-vsock-selftests-fixes-and-improvements-...
tools/testing/selftests/vsock/vmtest.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/vsock/vmtest.sh b/tools/testing/selftests/vsock/vmtest.sh index edacebfc1632..e1732f236d14 100755 --- a/tools/testing/selftests/vsock/vmtest.sh +++ b/tools/testing/selftests/vsock/vmtest.sh @@ -389,9 +389,9 @@ run_test() { local rc
host_oops_cnt_before=$(dmesg | grep -c -i 'Oops')
- host_warn_cnt_before=$(dmesg --level=warn | wc -l)
- host_warn_cnt_before=$(dmesg --level=warn | grep -c -i 'vsock') vm_oops_cnt_before=$(vm_ssh -- dmesg | grep -c -i 'Oops')
- vm_warn_cnt_before=$(vm_ssh -- dmesg --level=warn | wc -l)
vm_warn_cnt_before=$(vm_ssh -- dmesg --level=warn | grep -c -i 'vsock')
name=$(echo "${1}" | awk '{ print $1 }') eval test_"${name}"
@@ -403,7 +403,7 @@ run_test() { rc=$KSFT_FAIL fi
- host_warn_cnt_after=$(dmesg --level=warn | wc -l)
- host_warn_cnt_after=$(dmesg --level=warn | grep -c -i vsock)
In the previous hunk we quoted 'vsock', but here and in the next we did not. Can we be consistent at least in the same patch ?
The rest LGTM.
Stefano
Just sent the update, sorry for the oversight.
Best, Bobby