test: append, not insert the suites
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 17 Oct 2024 01:45:22 +0000 (11:45 +1000)
committerMarge Bot <emma+marge@anholt.net>
Wed, 30 Oct 2024 23:20:42 +0000 (23:20 +0000)
list_append() came later than list_insert() and there's an argument to
be made that tests added later should be run first since they're less
likely to succeed. But it's a lot harder to read test logs when they are
in reverse order, and with the TEST_COLLECTION() macro the order of the
test suite is not obvious anyway.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1067>

test/litest.c

index eb4d983fc5134ad719453ea57a468f448dcfedf2..67d8157cbcd0980ea97a246fd9e55e9fa1b5f4e0 100644 (file)
@@ -4855,7 +4855,7 @@ setup_tests(void)
                s->name = safe_strdup(c->name);
 
                list_init(&s->tests);
-               list_insert(&all_test_suites, &s->node);
+               list_append(&all_test_suites, &s->node);
 
                current_suite = s;
                c->setup();