MCPcopy Create free account
hub / github.com/F-Stack/f-stack / main

Function main

dpdk/examples/fips_validation/main.c:482–620  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480}
481
482int
483main(int argc, char *argv[])
484{
485 int ret;
486
487 ret = rte_eal_init(argc, argv);
488 if (ret < 0) {
489 RTE_LOG(ERR, USER1, "Error %i: Failed init\n", ret);
490 return -1;
491 }
492
493 argc -= ret;
494 argv += ret;
495
496 ret = cryptodev_fips_validate_parse_args(argc, argv);
497 if (ret < 0)
498 rte_exit(EXIT_FAILURE, "Failed to parse arguments!\n");
499
500 ret = cryptodev_fips_validate_app_init();
501 if (ret < 0) {
502 RTE_LOG(ERR, USER1, "Error %i: Failed init\n", ret);
503 return -1;
504 }
505
506 if (env.req_path == NULL || env.rsp_path == NULL) {
507 printf("No request, exit.\n");
508 goto exit;
509 }
510
511 if (!env.is_path_folder) {
512 printf("Processing file %s... ", env.req_path);
513
514 ret = fips_test_init(env.req_path, env.rsp_path,
515 rte_cryptodev_name_get(env.dev_id));
516 if (ret < 0) {
517 RTE_LOG(ERR, USER1, "Error %i: Failed test %s\n",
518 ret, env.req_path);
519 goto exit;
520 }
521
522#ifdef USE_JANSSON
523 if (info.file_type == FIPS_TYPE_JSON) {
524 ret = fips_test_one_json_file();
525 json_decref(json_info.json_root);
526 } else {
527 ret = fips_test_one_file();
528 }
529#else /* USE_JANSSON */
530 ret = fips_test_one_file();
531#endif /* USE_JANSSON */
532
533 if (ret < 0) {
534 RTE_LOG(ERR, USER1, "Error %i: Failed test %s\n",
535 ret, env.req_path);
536 goto exit;
537 }
538
539 printf("Done\n");

Callers

nothing calls this directly

Calls 15

rte_exitFunction · 0.85
fips_test_initFunction · 0.85
rte_cryptodev_name_getFunction · 0.85
fips_test_one_json_fileFunction · 0.85
fips_test_one_fileFunction · 0.85
opendirFunction · 0.85
closedirFunction · 0.85
readdirFunction · 0.85
strstrFunction · 0.85
snprintfFunction · 0.85

Tested by

no test coverage detected