MCPcopy Create free account
hub / github.com/git/git / ut_001return

Function ut_001return

t/helper/test-trace2.c:52–60  ·  view source on GitHub ↗

* Cause process to exit with the requested value via "return". * * Rely on test-tool.c:cmd_main() to call trace2_cmd_exit() * with our result. * * Test harness can confirm: * [] the process-exit value. * [] the "code" field in the "exit" trace2 event. * [] the "code" field in the "atexit" trace2 event. * [] the "name" field in the "cmd_name" trace2 event. * [] "def_param" events for all

Source from the content-addressed store, hash-verified

50 * config settings.
51 */
52static int ut_001return(int argc UNUSED, const char **argv)
53{
54 int rc;
55
56 if (get_i(&rc, argv[0]))
57 die("expect <exit_code>");
58
59 return rc;
60}
61
62/*
63 * Cause the process to exit with the requested value via "exit()".

Callers

nothing calls this directly

Calls 2

get_iFunction · 0.70
dieFunction · 0.50

Tested by

no test coverage detected