Add verbose option
PATCH 7/9 Add verbose option
Add an option that prints each instruction that is currently being tested. To use this option, just add "--v" to risu's command-line.
Signed-off-by John Arbuckle <[email protected]>
--- risu.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
risu.c +10 -1
@@ -37,6 +37,8 @@ sigjmp_buf jmpbuf;/* Should we test for FP exception status bits? */ int test_fp_exc =0 ; +int verbose_mode =0 ; +void master_sigill (int sig,siginfo_t *si,void *uc) { switch (recv_and_compare_register_info(master_socket, uc))
@@ -125,7 +127,8 @@ int master(int sock) {if (sigsetjmp (jmpbuf,1 )) { -return report_match_status (); +int return_status =report_match_status (); +exit (return_status); } master_socket = sock;set_sigill_handler (&master_sigill);
@@ -177,6 +180,7 @@ int main(int argc, char **argv) { "host", required_argument, 0, 'h' }, { "port", required_argument, 0, 'p' }, { "test-fp-exc", no_argument, &test_fp_exc, 1 }, + { "verbose testing", no_argument, 0, 'v'}, { 0,0,0,0 } };int optidx =0 ;
@@ -209,6 +213,11 @@ int main(int argc, char **argv)usage ();exit (1 ); } +case 'v' :/* Prints each instruction being tested */ + { + verbose_mode =1 ; +break ; + }default :abort (); }
Signature · 1 line
2.10.2