Skip to content

Commit 3099e49

Browse files
committed
testsuite: Assert a test binary is non-empty
Avoid issues like #269 by asserting the test binary is non-empty: Suggested-by: Emil Velikov <[email protected]> Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 0c5a7fb commit 3099e49

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

testsuite/testsuite.c

+3
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ int test_init(const struct test *start, const struct test *stop, int argc,
8282
{
8383
progname = argv[0];
8484

85+
/* An empty testsuite is not likely intended */
86+
assert_return(start != stop, -EINVAL);
87+
8588
for (;;) {
8689
int c, idx = 0;
8790
c = getopt_long(argc, argv, options_short, options, &idx);

0 commit comments

Comments
 (0)