From: David Disseldorp Date: Sun, 6 Sep 2020 08:57:41 +0000 (+0200) Subject: s4:torture/rpc: run tests in the order that they're added X-Git-Tag: talloc-2.3.2~560 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=671fe10f212b013af844ad4e3291322082b05619;p=thirdparty%2Fsamba.git s4:torture/rpc: run tests in the order that they're added torture_rpc_tcase_add_test*() uses DLIST_ADD(), which sees them executed in reverse order to which they're added. Use DLIST_ADD_END() instead to fix this. Signed-off-by: David Disseldorp Reviewed-by: Andrew Bartlett --- diff --git a/source4/torture/rpc/rpc.c b/source4/torture/rpc/rpc.c index 4a01eb2480c..243e5d3f207 100644 --- a/source4/torture/rpc/rpc.c +++ b/source4/torture/rpc/rpc.c @@ -414,7 +414,7 @@ _PUBLIC_ struct torture_test *torture_rpc_tcase_add_test( test->data = NULL; test->fn = fn; - DLIST_ADD(tcase->tcase.tests, test); + DLIST_ADD_END(tcase->tcase.tests, test); return test; } @@ -435,7 +435,7 @@ _PUBLIC_ struct torture_test *torture_rpc_tcase_add_test_creds( test->data = NULL; test->fn = fn; - DLIST_ADD(tcase->tcase.tests, test); + DLIST_ADD_END(tcase->tcase.tests, test); return test; } @@ -457,7 +457,7 @@ _PUBLIC_ struct torture_test *torture_rpc_tcase_add_test_join( test->data = NULL; test->fn = fn; - DLIST_ADD(tcase->tcase.tests, test); + DLIST_ADD_END(tcase->tcase.tests, test); return test; } @@ -480,7 +480,7 @@ _PUBLIC_ struct torture_test *torture_rpc_tcase_add_test_ex( test->data = userdata; test->fn = fn; - DLIST_ADD(tcase->tcase.tests, test); + DLIST_ADD_END(tcase->tcase.tests, test); return test; } @@ -536,7 +536,7 @@ _PUBLIC_ struct torture_test *torture_rpc_tcase_add_test_setup( test->data = userdata; test->fn = fn; - DLIST_ADD(tcase->tcase.tests, test); + DLIST_ADD_END(tcase->tcase.tests, test); return test; }