On Mon, 2025-11-24 at 16:51 +0100, Sabrina Dubroca wrote:
2025-11-21, 01:20:33 +0100, Antonio Quartulli wrote:
diff --git a/tools/testing/selftests/net/ovpn/common.sh b/tools/testing/selftests/net/ovpn/common.sh index 88869c675d03..b91cf17ab01f 100644 --- a/tools/testing/selftests/net/ovpn/common.sh +++ b/tools/testing/selftests/net/ovpn/common.sh
[...]
@@ -82,6 +99,23 @@ add_peer() { fi } +compare_ntfs() {
- if [ ${#tmp_jsons[@]} -gt 0 ]; then
[ "$FLOAT" == 1 ] && suffix="-float"expexted="json/peer${1}${suffix}.json"nit: expected?
Will fix, thanks.
received="${tmp_jsons[$1]}"kill -TERM ${listener_pids[$1]} || truewait ${listener_pids[$1]} || trueprintf "Checking notifications for peer ${1}... "diff <(jq -s "${JQ_FILTER}" ${expexted}) \<(jq -s "${JQ_FILTER}" ${received})echo "OK"Should that OK be conditional on what diff returns?
We run selftests with set -e, so if the jsons don’t match, the script will print the diff and exit. That said, I agree the current code isn’t very clear, so I’ll make the "OK" conditional.