* 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
| 50 | * config settings. |
| 51 | */ |
| 52 | static 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()". |