This allows for shell scripts to check for success or failure without parsing the printed output. If the function name is later changed from main() it will also allow other code calling the tests to also easily check the pass or fail status.
test.c: In function ‘main’: test.c:49:9: warning: variable ‘fails’ set but not used [-Wunused-but-set-variable] int fails = 0; ^~~~~