Add debug logging

This commit is contained in:
Steffo 2024-10-12 05:04:12 +02:00
parent 2a355b1cce
commit a92e047690
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -54,6 +54,9 @@ __chk_nr()
nr=$(eval $command)
echo "chk_nr evaluation output:"
echo "$nr"
mptcp_lib_print_title "$msg"
if [ "$nr" != "$expected" ]; then
if [ "$nr" = "$skip" ] && ! mptcp_lib_expect_all_features; then
@ -85,9 +88,10 @@ __chk_msk_nr()
__chk_nr "ss --info --numeric --memory --no-header --mptcp --net=$ns | $condition" "$@"
}
# Count the amount of "token:" appearing in the ss output
chk_msk_nr()
{
__chk_msk_nr "grep -c token:" "$@"
__chk_msk_nr "grep --count token:" "$@"
}
chk_listener_nr()
@ -134,11 +138,13 @@ wait_msk_nr()
fi
}
# Count the amount of "fallback" appearing in the ss output
chk_msk_fallback_nr()
{
__chk_msk_nr "grep -c fallback" "$@"
}
# Count the amount of "remote_key" appearing in the ss output
chk_msk_remote_key_nr()
{
__chk_msk_nr "grep -c remote_key" "$@"