neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35303?usp=email ) Change subject: mgcp_test: fix false negatives in test output ...................................................................... mgcp_test: fix false negatives in test output If one test fails, do not print failure for all following tests as well. Change-Id: I196880b4b34a672ef45042c25f89bc1684363567 --- M tests/mgcp/mgcp_test.c 1 file changed, 17 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/03/35303/1 diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index a43d47a..b3c111f 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -2145,7 +2145,7 @@ static void test_mgcp_codec_decide(void) { int i; - bool ok = true; + bool ok_all = true; printf("\nTesting mgcp_codec_find_convertible()\n"); for (i = 0; i < ARRAY_SIZE(test_mgcp_codec_find_convertible_cases); i++) { @@ -2154,6 +2154,7 @@ int rc; int conn_i; int c; + bool ok = true; printf("#%d: %s\n", i, t->descr); @@ -2194,9 +2195,12 @@ printf(" ===> SUCCESS: codec decision as expected!\n"); else printf(" ===> FAIL: unexpected codec decision!\n"); + + if (!ok) + ok_all = false; } - OSMO_ASSERT(ok); + OSMO_ASSERT(ok_all); } void test_conn_id_matching(void) -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35303?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I196880b4b34a672ef45042c25f89bc1684363567 Gerrit-Change-Number: 35303 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr@sysmocom.de> Gerrit-MessageType: newchange