int CMD_auto(int argc, char **argv) { // // Keep the compiler happy. // (void)argc; (void)argv; auto_test(); return (0); }
int main(int argc, char **argv) { int fd; parse_args(argc, argv); print_options(); fd = open(rtcdev, O_RDONLY); if (fd == -1) { perror(rtcdev); exit(errno); } if (autotest) { auto_test(fd); goto done; } if (!strcmp(cmd, "read")) { test_read_time(fd); } else if (!strcmp(cmd, "write")) { test_set_time(fd); } else if (!strcmp(cmd, "vl")) { test_low_voltage(fd); } else if (!strcmp(cmd, "update")) { test_update(fd); } else if (!strcmp(cmd, "alarm")) { test_alarm(fd); } else if (!strcmp(cmd, "periodic")) { test_periodic(fd); } else { printf("invalid command %s\n", cmd); } goto done; done: fprintf(stderr, "\n*** Test complete ***\n"); close(fd); return 0; }
int main(int argc, char ** argv) { int retv = 0; if (argc < 2) { usage(); return 0; } if (init_param(argc, argv) < 0) return -1; if (open_crypto_dev() < 0) return -1; if (crypto_method == CRYPTO_SHA1){ retv = sha(); return retv; } if (crypto_method == CRYPTO_MD5){ retv = md5(); return retv; } if (autotest_flag) { retv = auto_test(algoname); return retv; } if (crypto_method == CRYPTO_ENCRYPTE) { if (do_encryption(algoname) < 0) return -1; } else { if (do_decryption(algoname) < 0) return -1; } close_crypto_dev(); return 0; }
int main(void) { int count,i; // rounddn(); /* fpsetround(FP_RM);*/ printf("Debug mode? (yes = 1 no = 0 )\n"); scanf("%d",&debug); printf("Auto test? (yes = 1 no = 0 )\n"); scanf("%d",&autogen); printf("asin domain: (0,1,2,3,4,5)\n"); scanf("%d",&asd); trig_range = 1000000.0; /* printf("What range for the trig functions (-x to x)\n enter x:\n"); scanf("%lg",&trig_range); printf( "What range for the trig functions (LO to HI)\n enter LO HI:\n"); scanf("%lg%lg",&trig_start,&trig_end); */ count = 1; while( count != -2) { printf("Evaluate which function?\n"); scanf("%d",&count); if (count == -1) { /* test all functions */ tabular_form = 1; printf("number of iterations of all functions:\n"); scanf("%d",&count); printf("\n\nname rmserr maxerr 1 ULP 2 UL P >3 ULP b<blo b>bhi\n"); while(count > 0) { for (i=0;i<14;i++) { nexta = f[i].gen; flo = f[i].lo; fmid = f[i].mid; fhi = f[i].hi; printf("%8s ",f[i].name); auto_test(count); } printf("number of iterations of all functions:\n"); scanf("%d",&count); } } else if (count == -3) { /* test all functions */ tabular_form = 1; printf("number of iterations of all functions:\n"); scanf("%d",&count); printf("\n\nname rmserr maxerr 1 ULP 2 UL P >3 ULP b<blo b>bhi\n"); while(count > 0) { for (i=0;i<14;i++) { if (i==6) i=12; nexta = f[i].gen; flo = f[i].lo; fmid = f[i].mid; fhi = f[i].hi; printf("%8s ",f[i].name); auto_test(count); } printf("number of iterations of all functions:\n"); scanf("%d",&count); } } else { tabular_form = 0; nexta = f[count].gen; flo = f[count].lo; fmid = f[count].mid; fhi = f[count].hi; printf("number of iterations of %s:\n",f[count].name); scanf("%d",&count); while(count > 0) { auto_test(count); /* printf("asin domain: (0,1,2,3,4,5)\n"); scanf("%d",&asd); */ printf("number of iterations:\n"); scanf("%d",&count); } } } return 0; }
int auto_test_c_api(int argc, char** argv) { OLIAS_DB db; return auto_test(argc, argv, db); }