improve debug output for EAL flags unit tests
cover improve debug output for EAL flags unit tests
If issues arise in the EAL flags unit tests they can be trick to debug due to the lack of debugging output when running recursive instances of the test binary with different EAL flags. Try to improve this situation by adding extra debug output for recursive dpdk-test calls in general, and to some of the EAL flags tests in particular that are proving problematic.
NOTE: there are intermittent failures seen in github actions with the file-prefix EAL unit tests. The problems seem less frequent, or possibly "gone", with this set applied, but even if it masks the problem, this set does give us greater visibility to debug if they do re-occur.
Bruce Richardson (3):
app/test: add extra logging for recursive calls test/eal_flags: add line numbers to error messages test/eal_flags: add extra logging for file prefix tests
app/test/test.c | 14 +- app/test/test_eal_flags.c | 373 ++++++++++++++++++++++---------------- 2 files changed, 224 insertions(+), 163 deletions(-)
--
2.51.0
PATCH 1/3 app/test: add extra logging for recursive calls
When the test binary calls itself recursively e.g. when testing multi-process, print out a few extra details on what is being done and returned to help with debugging in case of any issues. As part of this, if rte_eal_init ever fails, explicitly print out the failure code.
--- app/test/test.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
app/test/test.c +12 -2
@@ -92,8 +92,13 @@ do_recursive_call(void)if (recursive_call ==NULL )return -1 ;for (i =0 ; i <RTE_DIM (actions); i++) { -if (strcmp (actions[i].env_var, recursive_call) ==0 ) -return (actions[i].action_fn)(); +if (strcmp (actions[i].env_var, recursive_call) ==0 ) { +printf ("Calling recursive action for %s\n" , recursive_call); +int ret = actions[i].action_fn (); +printf ("Returned from recursive action for %s with %d\n" , + recursive_call, ret); +return ret; + } }printf ("ERROR - missing action to take for %s\n" , recursive_call);return -1 ;
@@ -146,6 +151,7 @@ main(int argc, char **argv) }else ret =rte_eal_init (argc, argv);if (ret <0 ) { +printf ("Error with EAL initialization, ret = %d\n" , ret); ret =-1 ; goto out; }
@@ -259,10 +265,14 @@ main(int argc, char **argv) ret =0 ; out: +if (recursive_call !=NULL ) +printf ("Cleaning up %s recursive instance\n" , argv[0 ]);#ifdef RTE_LIB_TIMER rte_timer_subsystem_finalize ();#endif rte_eal_cleanup (); +if (recursive_call !=NULL ) +printf ("%s recursive instance returning %d\n" , argv[0 ], ret);return ret; }
Signature · 1 line
2.51.0
PATCH 2/3 test/eal_flags: add line numbers to error messages
In reply to Bruce RichardsonTo aid in debugging any problems, and because there are sometimes multiple very similar error messages in tests, add line numbers to the error message printouts.
--- app/test/test_eal_flags.c | 368 +++++++++++++++++++++----------------- 1 file changed, 207 insertions(+), 161 deletions(-)
app/test/test_eal_flags.c +207 -161
@@ -179,7 +179,7 @@ process_hugefiles(const char * prefix, enum hugepage_action action) sizeof(hugefile_prefix), "%smap_", prefix);if (prefix_len <=0 || prefix_len >= (int )sizeof (hugefile_prefix) || prefix_len >= (int )sizeof (dirent->d_name)) { -printf ("Error creating hugefile filename prefix\n" ); +printf ("Error (line %d) - cannot create hugefile filename prefix\n" , __LINE__);return -1 ; }
@@ -187,7 +187,7 @@ process_hugefiles(const char * prefix, enum hugepage_action action) hugedir_handle =fopen ("/proc/mounts" ,"r" );if (hugedir_handle ==NULL ) { -printf ("Error parsing /proc/mounts!\n" ); +printf ("Error (line %d) - cannot parse /proc/mounts!\n" , __LINE__);return -1 ; }
@@ -201,7 +201,8 @@ process_hugefiles(const char * prefix, enum hugepage_action action)/* check if directory exists */ if ((hugepage_dir =opendir (hugedir)) ==NULL ) {fclose (hugedir_handle); -printf ("Error reading %s: %s\n" , hugedir,strerror (errno)); +printf ("Error (line %d) - cannot open %s: %s\n" , + __LINE__, hugedir,strerror (errno));return -1 ; }
@@ -227,8 +228,10 @@ process_hugefiles(const char * prefix, enum hugepage_action action)/* remove file */ if (remove (file_path) <0 ) { -printf ("Error deleting %s - %s!\n" , - dirent->d_name,strerror (errno)); +printf ("Error (line %d) - cannot delete %s - %s!\n" , + __LINE__, + dirent->d_name, +strerror (errno));closedir (hugepage_dir); result =-1 ; goto end;
@@ -243,8 +246,10 @@ process_hugefiles(const char * prefix, enum hugepage_action action)/* this shouldn't happen */ if (fd ==-1 ) { -printf ("Error opening %s - %s!\n" , - dirent->d_name,strerror (errno)); +printf ("Error (line %d) - cannot open %s - %s!\n" , + __LINE__, + dirent->d_name, +strerror (errno));closedir (hugepage_dir); result =-1 ; goto end;
@@ -299,7 +304,8 @@ get_number_of_sockets(void)printf ("No NUMA nodes detected: assuming 1 available socket\n" );return 1 ; } -printf ("Error opening %s: %s\n" , nodedir,strerror (errno)); +printf ("Error (line %d) - cannot open %s: %s\n" , + __LINE__, nodedir,strerror (errno));return -1 ; }
@@ -327,7 +333,7 @@ test_allow_flag(void)#else char prefix[PATH_MAX ], tmp[PATH_MAX ];if (get_current_prefix (tmp,sizeof (tmp)) ==NULL ) { -printf ("Error - unable to get current prefix!\n" ); +printf ("Error (line %d) - unable to get current prefix!\n" , __LINE__);return -1 ; }snprintf (prefix,sizeof (prefix),"--file-prefix=%s" , tmp);
@@ -359,21 +365,23 @@ test_allow_flag(void)for (i =0 ; i <RTE_DIM (wlinval); i++) {if (launch_proc (wlinval[i]) ==0 ) { -printf ("Error - process did run ok with invalid " -"allow parameter\n" ); +printf ("Error (line %d) - process did run ok with invalid " +"allow parameter\n" , __LINE__);return -1 ; } }if (launch_proc (wlval1) !=0 ) { -printf ("Error - process did not run ok with valid allow\n" ); +printf ("Error (line %d) - process did not run ok with valid allow\n" , __LINE__);return -1 ; }if (launch_proc (wlval2) !=0 ) { -printf ("Error - process did not run ok with valid allow value set\n" ); +printf ("Error (line %d) - process did not run ok with valid allow value set\n" , + __LINE__);return -1 ; }if (launch_proc (wlval3) !=0 ) { -printf ("Error - process did not run ok with valid allow + args\n" ); +printf ("Error (line %d) - process did not run ok with valid allow + args\n" , + __LINE__);return -1 ; }
@@ -393,7 +401,7 @@ test_invalid_b_flag(void)#else char prefix[PATH_MAX ], tmp[PATH_MAX ];if (get_current_prefix (tmp,sizeof (tmp)) ==NULL ) { -printf ("Error - unable to get current prefix!\n" ); +printf ("Error (line %d) - unable to get current prefix!\n" , __LINE__);return -1 ; }snprintf (prefix,sizeof (prefix),"--file-prefix=%s" , tmp);
@@ -415,13 +423,14 @@ test_invalid_b_flag(void)for (i =0 ; i !=RTE_DIM (blinval); i++) {if (launch_proc (blinval[i]) ==0 ) { -printf ("Error - process did run ok with invalid " -"blocklist parameter\n" ); +printf ("Error (line %d) - process did run ok with invalid " +"blocklist parameter\n" , __LINE__);return -1 ; } }if (launch_proc (blval) !=0 ) { -printf ("Error - process did not run ok with valid blocklist value\n" ); +printf ("Error (line %d) - process did not run ok with valid blocklist value\n" , + __LINE__);return -1 ; }return 0 ;
@@ -458,25 +467,26 @@ test_invalid_vdev_flag(void) vdev, "net_ring0,nodeaction=r1:0:CREATE"};if (launch_proc (vdevinval) ==0 ) { -printf ("Error - process did run ok with invalid " -"vdev parameter\n" ); +printf ("Error (line %d) - process did run ok with invalid " +"vdev parameter\n" , __LINE__);return -1 ; }if (launch_proc (vdevval1) !=0 ) { -printf ("Error - process did not run ok with valid vdev value\n" ); +printf ("Error (line %d) - process did not run ok with valid vdev value\n" , + __LINE__);return -1 ; }if (launch_proc (vdevval2) !=0 ) { -printf ("Error - process did not run ok with valid vdev value," -"with dummy args\n" ); +printf ("Error (line %d) - process did not run ok with valid vdev value with dummy args\n" , + __LINE__);return -1 ; }if (launch_proc (vdevval3) !=0 ) { -printf ("Error - process did not run ok with valid vdev value," -"with valid args\n" ); +printf ("Error (line %d) - process did not run ok with valid vdev value with valid args\n" , + __LINE__);return -1 ; }return 0 ;
@@ -497,7 +507,7 @@ test_invalid_r_flag(void)#else char prefix[PATH_MAX ], tmp[PATH_MAX ];if (get_current_prefix (tmp,sizeof (tmp)) ==NULL ) { -printf ("Error - unable to get current prefix!\n" ); +printf ("Error (line %d) - unable to get current prefix!\n" , __LINE__);return -1 ; }snprintf (prefix,sizeof (prefix),"--file-prefix=%s" , tmp);
@@ -516,13 +526,14 @@ test_invalid_r_flag(void)for (i =0 ; i !=RTE_DIM (rinval); i++) {if (launch_proc (rinval[i]) ==0 ) { -printf ("Error - process did run ok with invalid " -"-r (rank) parameter\n" ); +printf ("Error (line %d) - process did run ok with invalid " +"-r (rank) parameter\n" , __LINE__);return -1 ; } }if (launch_proc (rval) !=0 ) { -printf ("Error - process did not run ok with valid -r (rank) value\n" ); +printf ("Error (line %d) - process did not run ok with valid -r (rank) value\n" , + __LINE__);return -1 ; }return 0 ;
@@ -541,7 +552,7 @@ test_missing_c_flag(void)#else char prefix[PATH_MAX ], tmp[PATH_MAX ];if (get_current_prefix (tmp,sizeof (tmp)) ==NULL ) { -printf ("Error - unable to get current prefix!\n" ); +printf ("Error (line %d) - unable to get current prefix!\n" , __LINE__);return -1 ; }snprintf (prefix,sizeof (prefix),"--file-prefix=%s" , tmp);
@@ -622,20 +633,20 @@ test_missing_c_flag(void) "--lcores", "3@" RTE_STR(CPU_SETSIZE) };if (launch_proc (argv2) !=0 ) { -printf ("Error - " -"process did not run ok when missing -c flag\n" ); +printf ("Error (line %d) - " +"process did not run ok when missing -c flag\n" , __LINE__);return -1 ; }if (launch_proc (argv1) ==0 ||launch_proc (argv3) ==0 ) { -printf ("Error - " -"process ran without error with invalid -c flag\n" ); +printf ("Error (line %d) - " +"process ran without error with invalid -c flag\n" , __LINE__);return -1 ; }if (launch_proc (argv4) !=0 ) { -printf ("Error - " -"process did not run ok with valid coremask value\n" ); +printf ("Error (line %d) - " +"process did not run ok with valid coremask value\n" , __LINE__);return -1 ; }
@@ -650,15 +661,15 @@ test_missing_c_flag(void) || launch_proc(argv12) == 0 || launch_proc(argv13) == 0 || launch_proc(argv14) == 0) { -printf ("Error - " -"process ran without error with invalid -l flag\n" ); +printf ("Error (line %d) - " +"process ran without error with invalid -l flag\n" , __LINE__);return -1 ; }if (rte_lcore_is_enabled (0 ) &&rte_lcore_is_enabled (1 ) &&rte_lcore_is_enabled (2 ) &&rte_lcore_is_enabled (3 ) &&launch_proc (argv15) !=0 ) { -printf ("Error - " -"process did not run ok with valid corelist value\n" ); +printf ("Error (line %d) - " +"process did not run ok with valid corelist value\n" , __LINE__);return -1 ; }
@@ -670,8 +681,8 @@ test_missing_c_flag(void) launch_proc(argv24) == 0 || launch_proc(argv25) == 0 || launch_proc(argv26) == 0 || launch_proc(argv27) == 0 || launch_proc(argv28) == 0 || launch_proc(argv30) == 0) { -printf ("Error - " -"process ran without error with invalid --lcores flag\n" ); +printf ("Error (line %d) - " +"process ran without error with invalid --lcores flag\n" , __LINE__);return -1 ; }
@@ -680,8 +691,8 @@ test_missing_c_flag(void) rte_lcore_is_enabled(4) && rte_lcore_is_enabled(5) && rte_lcore_is_enabled(6) && rte_lcore_is_enabled(7) && launch_proc(argv29) != 0) { -printf ("Error - " -"process did not run ok with valid corelist value\n" ); +printf ("Error (line %d) - " +"process did not run ok with valid corelist value\n" , __LINE__);return -1 ; }
@@ -700,7 +711,7 @@ test_main_lcore_flag(void)#else char prefix[PATH_MAX ], tmp[PATH_MAX ];if (get_current_prefix (tmp,sizeof (tmp)) ==NULL ) { -printf ("Error - unable to get current prefix!\n" ); +printf ("Error (line %d) - unable to get current prefix!\n" , __LINE__);return -1 ; }snprintf (prefix,sizeof (prefix),"--file-prefix=%s" , tmp);
@@ -731,12 +742,14 @@ test_main_lcore_flag(void) || launch_proc(argv2) == 0 || launch_proc(argv3) == 0 || launch_proc(argv4) == 0) { -printf ("Error - process ran without error with wrong --main-lcore\n" ); +printf ("Error (line %d) - process ran without error with wrong --main-lcore\n" , + __LINE__);return -1 ; }if (launch_proc (argv5) !=0 ||launch_proc (argv6) !=0 ) { -printf ("Error - process did not run ok with valid --main-lcore\n" ); +printf ("Error (line %d) - process did not run ok with valid --main-lcore\n" , + __LINE__);return -1 ; }return 0 ;
@@ -757,7 +770,7 @@ test_invalid_n_flag(void)#else char prefix[PATH_MAX ], tmp[PATH_MAX ];if (get_current_prefix (tmp,sizeof (tmp)) ==NULL ) { -printf ("Error - unable to get current prefix!\n" ); +printf ("Error (line %d) - unable to get current prefix!\n" , __LINE__);return -1 ; }snprintf (prefix,sizeof (prefix),"--file-prefix=%s" , tmp);
@@ -781,16 +794,17 @@ test_invalid_n_flag(void)if (launch_proc (argv1) ==0 ||launch_proc (argv2) ==0 ||launch_proc (argv3) ==0 ) { -printf ("Error - process ran without error when" -"invalid -n flag\n" ); +printf ("Error (line %d) - process ran without error when invalid -n flag\n" , + __LINE__);return -1 ; }if (launch_proc (argv4) !=0 ) { -printf ("Error - process did not run ok with valid num-channel value\n" ); +printf ("Error (line %d) - process did not run ok with valid num-channel value\n" , + __LINE__);return -1 ; }if (launch_proc (argv5) !=0 ) { -printf ("Error - process did not run ok without -n flag\n" ); +printf ("Error (line %d) - process did not run ok without -n flag\n" , __LINE__);return -1 ; }
@@ -810,7 +824,7 @@ test_no_hpet_flag(void)#else char tmp[PATH_MAX ];if (get_current_prefix (tmp,sizeof (tmp)) ==NULL ) { -printf ("Error - unable to get current prefix!\n" ); +printf ("Error (line %d) - unable to get current prefix!\n" , __LINE__);return -1 ; }snprintf (prefix,sizeof (prefix),"--file-prefix=%s" , tmp);
@@ -822,11 +836,12 @@ test_no_hpet_flag(void)const char *argv2[] = {prgname, prefix, mp_flag};if (launch_proc (argv1) !=0 ) { -printf ("Error - process did not run ok with --no-hpet flag\n" ); +printf ("Error (line %d) - process did not run ok with --no-hpet flag\n" , __LINE__);return -1 ; }if (launch_proc (argv2) !=0 ) { -printf ("Error - process did not run ok without --no-hpet flag\n" ); +printf ("Error (line %d) - process did not run ok without --no-hpet flag\n" , + __LINE__);return -1 ; }return 0 ;
@@ -868,11 +883,12 @@ test_no_huge_flag(void) "--huge-worker-stack=512"};if (launch_proc (argv1) !=0 ) { -printf ("Error - process did not run ok with --no-huge flag\n" ); +printf ("Error (line %d) - process did not run ok with --no-huge flag\n" , __LINE__);return -1 ; }if (launch_proc (argv2) !=0 ) { -printf ("Error - process did not run ok with --no-huge and -m flags\n" ); +printf ("Error (line %d) - process did not run ok with --no-huge and -m flags\n" , + __LINE__);return -1 ; }#ifdef RTE_EXEC_ENV_FREEBSD
@@ -881,21 +897,23 @@ test_no_huge_flag(void)#endif if (launch_proc (argv3) ==0 ) { -printf ("Error - process run ok with --no-huge and --socket-mem " -"flags\n" ); +printf ("Error (line %d) - process run ok with --no-huge and --socket-mem " +"flags\n" , __LINE__);return -1 ; }if (launch_proc (argv4) ==0 ) { -printf ("Error - process run ok with --no-huge, -m and " -"--socket-mem flags\n" ); +printf ("Error (line %d) - process run ok with --no-huge, -m and " +"--socket-mem flags\n" , __LINE__);return -1 ; }if (launch_proc (argv5) ==0 ) { -printf ("Error - process run ok with --no-huge and --huge-worker-stack flags" ); +printf ("Error (line %d) - process run ok with --no-huge and --huge-worker-stack flags\n" , + __LINE__);return -1 ; }if (launch_proc (argv6) ==0 ) { -printf ("Error - process run ok with --no-huge and --huge-worker-stack=size flags" ); +printf ("Error (line %d) - process run ok with --no-huge and --huge-worker-stack=size flags\n" , + __LINE__);return -1 ; }return 0 ;
@@ -920,7 +938,7 @@ test_misc_flags(void)unsigned i, isempty =1 ;if (get_current_prefix (tmp,sizeof (tmp)) ==NULL ) { -printf ("Error - unable to get current prefix!\n" ); +printf ("Error (line %d) - unable to get current prefix!\n" , __LINE__);return -1 ; }snprintf (prefix,sizeof (prefix),"--file-prefix=%s" , tmp);
@@ -933,7 +951,7 @@ test_misc_flags(void) hugedir_handle =fopen ("/proc/mounts" ,"r" );if (hugedir_handle ==NULL ) { -printf ("Error opening /proc/mounts!\n" ); +printf ("Error (line %d) - cannot open /proc/mounts!\n" , __LINE__);return -1 ; }
@@ -962,14 +980,14 @@ test_misc_flags(void)snprintf (hugepath_dir2,sizeof (hugepath_dir2),"%s/dpdk.dir" , hugepath);if (mkdir (hugepath_dir2,0700 ) !=0 && errno !=EEXIST ) { -printf ("Error - failed to mkdir(%s)\n" , hugepath_dir2); +printf ("Error (line %d) - failed to mkdir(%s)\n" , __LINE__, hugepath_dir2);return -1 ; }snprintf (hugepath_dir3,sizeof (hugepath_dir3),"%s/dpdk.dir/sub" , hugepath);if (mkdir (hugepath_dir3,0700 ) !=0 && errno !=EEXIST ) { -printf ("Error - failed to mkdir(%s)\n" , hugepath_dir3); +printf ("Error (line %d) - failed to mkdir(%s)\n" , __LINE__, hugepath_dir3); goto fail; }
@@ -1082,19 +1100,20 @@ test_misc_flags(void)/* run all tests also applicable to FreeBSD first */ if (launch_proc (argv0) ==0 ) { -printf ("Error - process ran ok with invalid flag\n" ); +printf ("Error (line %d) - process ran ok with invalid flag\n" , __LINE__); goto fail; }if (launch_proc (argv1) !=0 ) { -printf ("Error - process did not run ok with --no-pci flag\n" ); +printf ("Error (line %d) - process did not run ok with --no-pci flag\n" , __LINE__); goto fail; }if (launch_proc (argv2) !=0 ) { -printf ("Error - process did not run ok with -v flag\n" ); +printf ("Error (line %d) - process did not run ok with -v flag\n" , __LINE__); goto fail; }if (launch_proc (argv6) !=0 ) { -printf ("Error - process did not run ok with --no-shconf flag\n" ); +printf ("Error (line %d) - process did not run ok with --no-shconf flag\n" , + __LINE__); goto fail; }
@@ -1104,110 +1123,124 @@ test_misc_flags(void)#endif if (launch_proc (argv3) !=0 ) { -printf ("Error - process did not run ok with --syslog=user flag\n" ); +printf ("Error (line %d) - process did not run ok with --syslog=user flag\n" , + __LINE__); goto fail; }if (launch_proc (argv4) !=0 ) { -printf ("Error - process did not run ok with --syslog flag\n" ); +printf ("Error (line %d) - process did not run ok with --syslog flag\n" , __LINE__); goto fail; }if (launch_proc (argv5) ==0 ) { -printf ("Error - process run ok with --syslog=invalid flag\n" ); +printf ("Error (line %d) - process run ok with --syslog=invalid flag\n" , __LINE__); goto fail; }if (launch_proc (argv7) !=0 ) { -printf ("Error - process did not run ok with --huge-dir flag\n" ); +printf ("Error (line %d) - process did not run ok with --huge-dir flag\n" , + __LINE__); goto fail; }if (launch_proc (argv8) ==0 ) { -printf ("Error - process run ok with empty --huge-dir flag\n" ); +printf ("Error (line %d) - process run ok with empty --huge-dir flag\n" , __LINE__); goto fail; }if (launch_proc (argv9) ==0 ) { -printf ("Error - process run ok with invalid --huge-dir flag\n" ); +printf ("Error (line %d) - process run ok with invalid --huge-dir flag\n" , __LINE__); goto fail; }if (launch_proc (argv10) ==0 ) { -printf ("Error - process run ok with invalid --huge-dir sub-dir flag\n" ); +printf ("Error (line %d) - process run ok with invalid --huge-dir sub-dir flag\n" , + __LINE__); goto fail; }if (launch_proc (argv11) !=0 ) { -printf ("Error - process did not run ok with --huge-dir subdir flag\n" ); +printf ("Error (line %d) - process did not run ok with --huge-dir subdir flag\n" , + __LINE__); goto fail; }if (launch_proc (argv12) !=0 ) { -printf ("Error - secondary process did not run ok with invalid --huge-dir flag\n" ); +printf ("Error (line %d) - secondary process did not run ok with invalid --huge-dir flag\n" , + __LINE__); goto fail; }if (launch_proc (argv13) !=0 ) { -printf ("Error - process did not run ok with --base-virtaddr parameter\n" ); +printf ("Error (line %d) - process did not run ok with --base-virtaddr parameter\n" , + __LINE__); goto fail; }if (launch_proc (argv14) !=0 ) { -printf ("Error - process did not run ok with " -"--vfio-intr INTx parameter\n" ); +printf ("Error (line %d) - process did not run ok with --vfio-intr INTx parameter\n" , + __LINE__); goto fail; }if (launch_proc (argv15) !=0 ) { -printf ("Error - process did not run ok with " -"--vfio-intr MSI parameter\n" ); +printf ("Error (line %d) - process did not run ok with --vfio-intr MSI parameter\n" , + __LINE__); goto fail; }if (launch_proc (argv16) !=0 ) { -printf ("Error - process did not run ok with " -"--vfio-intr MSI-X parameter\n" ); +printf ("Error (line %d) - process did not run ok with --vfio-intr MSI-X parameter\n" , + __LINE__); goto fail; }if (launch_proc (argv17) ==0 ) { -printf ("Error - process run ok with " -"--vfio-intr invalid parameter\n" ); +printf ("Error (line %d) - process run ok with --vfio-intr invalid parameter\n" , + __LINE__); goto fail; }if (launch_proc (argv18) !=0 ) { -printf ("Error - process did not run ok with " -"--proc-type as auto parameter\n" ); +printf ("Error (line %d) - process did not run ok with --proc-type as auto parameter\n" , + __LINE__); goto fail; }if (launch_proc (argv19) !=0 ) { -printf ("Error - process did not run ok with " -"--proc-type and --no-shconf parameter\n" ); +printf ("Error (line %d) - process did not run ok with --proc-type and --no-shconf parameter\n" , + __LINE__); goto fail; }if (launch_proc (argv20) !=0 ) { -printf ("Error - process did not run ok with " -"--create-uio-dev parameter\n" ); +printf ("Error (line %d) - process did not run ok with --create-uio-dev parameter\n" , + __LINE__); goto fail; }if (launch_proc (argv21) !=0 ) { -printf ("Error - process did not run ok with --huge-worker-stack parameter\n" ); +printf ("Error (line %d) - process did not run ok with --huge-worker-stack parameter\n" , + __LINE__); goto fail; }if (launch_proc (argv22) !=0 ) { -printf ("Error - process did not run ok with --huge-worker-stack=size parameter\n" ); +printf ("Error (line %d) - process did not run ok with --huge-worker-stack=size parameter\n" , + __LINE__); goto fail; }if (launch_proc (argv23) !=0 ) { -printf ("Error - process did not run ok with --log-timestamp parameter\n" ); +printf ("Error (line %d) - process did not run ok with --log-timestamp parameter\n" , + __LINE__); goto fail; }if (launch_proc (argv24) !=0 ) { -printf ("Error - process did not run ok with --log-timestamp=iso parameter\n" ); +printf ("Error (line %d) - process did not run ok with --log-timestamp=iso parameter\n" , + __LINE__); goto fail; }if (launch_proc (argv25) ==0 ) { -printf ("Error - process did run ok with --log-timestamp=invalid parameter\n" ); +printf ("Error (line %d) - process did run ok with --log-timestamp=invalid parameter\n" , + __LINE__); goto fail; }if (launch_proc (argv26) !=0 ) { -printf ("Error - process did not run ok with --log-color parameter\n" ); +printf ("Error (line %d) - process did not run ok with --log-color parameter\n" , + __LINE__); goto fail; }if (launch_proc (argv27) !=0 ) { -printf ("Error - process did not run ok with --log-color=never parameter\n" ); +printf ("Error (line %d) - process did not run ok with --log-color=never parameter\n" , + __LINE__); goto fail; }if (launch_proc (argv28) ==0 ) { -printf ("Error - process did run ok with --log-timestamp=invalid parameter\n" ); +printf ("Error (line %d) - process did run ok with --log-timestamp=invalid parameter\n" , + __LINE__); goto fail; }
@@ -1245,7 +1278,7 @@ test_file_prefix(void)return 0 ;#else if (get_current_prefix (prefix,sizeof (prefix)) ==NULL ) { -printf ("Error - unable to get current prefix!\n" ); +printf ("Error (line %d) - unable to get current prefix!\n" , __LINE__);return -1 ; }#endif
@@ -1297,13 +1330,15 @@ test_file_prefix(void)/* check if files for current prefix are present */ if (process_hugefiles (prefix,HUGEPAGE_CHECK_EXISTS ) !=1 ) { -printf ("Error - hugepage files for %s were not created!\n" , prefix); +printf ("Error (line %d) - hugepage files for %s were not created!\n" , + __LINE__, prefix);return -1 ; }/* checks if files for current prefix are locked */ if (process_hugefiles (prefix,HUGEPAGE_CHECK_LOCKED ) !=1 ) { -printf ("Error - hugepages for current process aren't locked!\n" ); +printf ("Error (line %d) - hugepages for current process aren't locked!\n" , + __LINE__);return -1 ; }
@@ -1311,32 +1346,37 @@ test_file_prefix(void)if (process_hugefiles (memtest,HUGEPAGE_CHECK_EXISTS ) ==1 ) {/* check if they are not locked */ if (process_hugefiles (memtest,HUGEPAGE_CHECK_LOCKED ) ==1 ) { -printf ("Error - hugepages for current process are locked!\n" ); +printf ("Error (line %d) - hugepages for current process are locked!\n" , + __LINE__);return -1 ; }/* they aren't locked, delete them */ else {if (process_hugefiles (memtest,HUGEPAGE_DELETE ) !=1 ) { -printf ("Error - deleting hugepages failed!\n" ); +printf ("Error (line %d) - deleting hugepages failed!\n" , + __LINE__);return -1 ; } } }if (launch_proc (argv0) ==0 ) { -printf ("Error - secondary process ran ok without primary process\n" ); +printf ("Error (line %d) - secondary process ran ok without primary process\n" , + __LINE__);return -1 ; }/* check if files for current prefix are present */ if (process_hugefiles (prefix,HUGEPAGE_CHECK_EXISTS ) !=1 ) { -printf ("Error - hugepage files for %s were not created!\n" , prefix); +printf ("Error (line %d) - hugepage files for %s were not created!\n" , + __LINE__, prefix);return -1 ; }/* checks if files for current prefix are locked */ if (process_hugefiles (prefix,HUGEPAGE_CHECK_LOCKED ) !=1 ) { -printf ("Error - hugepages for current process aren't locked!\n" ); +printf ("Error (line %d) - hugepages for current process aren't locked!\n" , + __LINE__);return -1 ; }
@@ -1344,15 +1384,15 @@ test_file_prefix(void)* should clean up after itself on exit and leave no hugepages behind. */ if (launch_proc (argv1) !=0 ) { -printf ("Error - failed to run with --file-prefix=%s\n" , - memtest1); +printf ("Error (line %d) - failed to run with --file-prefix=%s\n" , + __LINE__, memtest1);return -1 ; }/* check if memtest1_map0 is present */ if (process_hugefiles (memtest1,HUGEPAGE_CHECK_EXISTS ) !=0 ) { -printf ("Error - hugepage files for %s were not deleted!\n" , - memtest1); +printf ("Error (line %d) - hugepage files for %s were not deleted!\n" , + __LINE__, memtest1);return -1 ; }
@@ -1360,35 +1400,35 @@ test_file_prefix(void)* mem mode - this should leave behind hugepage files. */ if (launch_proc (argv2) !=0 ) { -printf ("Error - failed to run with --file-prefix=%s\n" , - memtest1); +printf ("Error (line %d) - failed to run with --file-prefix=%s\n" , + __LINE__, memtest1);return -1 ; }/* check if memtest1_map0 is present */ if (process_hugefiles (memtest1,HUGEPAGE_CHECK_EXISTS ) !=1 ) { -printf ("Error - hugepage files for %s were not created!\n" , - memtest1); +printf ("Error (line %d) - hugepage files for %s were not created!\n" , + __LINE__, memtest1);return -1 ; }if (launch_proc (argv3) !=0 ) { -printf ("Error - failed to run with --file-prefix=%s\n" , - memtest2); +printf ("Error (line %d) - failed to run with --file-prefix=%s\n" , + __LINE__, memtest2);return -1 ; }/* check if hugefiles for memtest2 are present */ if (process_hugefiles (memtest2,HUGEPAGE_CHECK_EXISTS ) !=1 ) { -printf ("Error - hugepage files for %s were not created!\n" , - memtest2); +printf ("Error (line %d) - hugepage files for %s were not created!\n" , + __LINE__, memtest2);return -1 ; }/* check if hugefiles for memtest1 are present */ if (process_hugefiles (memtest1,HUGEPAGE_CHECK_EXISTS ) !=0 ) { -printf ("Error - hugepage files for %s were not deleted!\n" , - memtest1); +printf ("Error (line %d) - hugepage files for %s were not deleted!\n" , + __LINE__, memtest1);return -1 ; }
@@ -1396,22 +1436,22 @@ test_file_prefix(void)* hugepage files behind. */ if (launch_proc (argv4) !=0 ) { -printf ("Error - failed to run with --file-prefix=%s\n" , - memtest2); +printf ("Error (line %d) - failed to run with --file-prefix=%s\n" , + __LINE__, memtest2);return -1 ; }/* check if hugefiles for memtest2 are present */ if (process_hugefiles (memtest2,HUGEPAGE_CHECK_EXISTS ) !=0 ) { -printf ("Error - hugepage files for %s were not deleted!\n" , - memtest2); +printf ("Error (line %d) - hugepage files for %s were not deleted!\n" , + __LINE__, memtest2);return -1 ; }/* check if hugefiles for memtest1 are present */ if (process_hugefiles (memtest1,HUGEPAGE_CHECK_EXISTS ) !=0 ) { -printf ("Error - hugepage files for %s were not deleted!\n" , - memtest1); +printf ("Error (line %d) - hugepage files for %s were not deleted!\n" , + __LINE__, memtest1);return -1 ; }
@@ -1421,7 +1461,8 @@ test_file_prefix(void)/* test case to check eal-options with --in-memory mode */ if (launch_proc (argv5) !=0 ) { -printf ("Error - failed to run with --in-memory mode\n" ); +printf ("Error (line %d) - failed to run with --in-memory mode\n" , + __LINE__);return -1 ; }
@@ -1429,14 +1470,14 @@ test_file_prefix(void)* custom file-prefix. */ if (launch_proc (argv6) !=0 ) { -printf ("Error - failed to run with --in-memory mode\n" ); +printf ("Error (line %d) - failed to run with --in-memory mode\n" , __LINE__);return -1 ; }/* check if hugefiles for memtest1 are present */ if (process_hugefiles (memtest1,HUGEPAGE_CHECK_EXISTS ) !=0 ) { -printf ("Error - hugepage files for %s were created and not deleted!\n" , - memtest1); +printf ("Error (line %d) - hugepage files for %s were created and not deleted!\n" , + __LINE__, memtest1);return -1 ; }
@@ -1444,7 +1485,7 @@ test_file_prefix(void)* parent file-prefix. */ if (launch_proc (argv7) !=0 ) { -printf ("Error - failed to run with --file-prefix=%s\n" , prefix); +printf ("Error (line %d) - failed to run with --file-prefix=%s\n" , __LINE__, prefix);return -1 ; }
@@ -1452,14 +1493,15 @@ test_file_prefix(void)* so it should not leave any hugepage files behind. */ if (launch_proc (argv8) !=0 ) { -printf ("Error - failed to run with --single-file-segments mode\n" ); +printf ("Error (line %d) - failed to run with --single-file-segments mode\n" , + __LINE__);return -1 ; }/* check if hugefiles for memtest1 are present */ if (process_hugefiles (memtest1,HUGEPAGE_CHECK_EXISTS ) !=0 ) { -printf ("Error - hugepage files for %s were not deleted!\n" , - memtest1); +printf ("Error (line %d) - hugepage files for %s were not deleted!\n" , + __LINE__, memtest1);return -1 ; }
@@ -1467,18 +1509,18 @@ test_file_prefix(void)* so it should not remove hugepage files when it exits */ if (launch_proc (argv9) !=0 ) { -printf ("Error - failed to run with --huge-unlink=never\n" ); +printf ("Error (line %d) - failed to run with --huge-unlink=never\n" , __LINE__);return -1 ; }/* check if hugefiles for memtest1 are present */ if (process_hugefiles (memtest1,HUGEPAGE_CHECK_EXISTS ) ==0 ) { -printf ("Error - hugepage files for %s were deleted!\n" , - memtest1); +printf ("Error (line %d) - hugepage files for %s were deleted!\n" , + __LINE__, memtest1);return -1 ; }if (process_hugefiles (memtest1,HUGEPAGE_DELETE ) !=1 ) { -printf ("Error - deleting hugepages failed!\n" ); +printf ("Error (line %d) - deleting hugepages failed!\n" , __LINE__);return -1 ; }
@@ -1531,7 +1573,7 @@ test_memory_flags(void)#else char prefix[PATH_MAX ], tmp[PATH_MAX ];if (get_current_prefix (tmp,sizeof (tmp)) ==NULL ) { -printf ("Error - unable to get current prefix!\n" ); +printf ("Error (line %d) - unable to get current prefix!\n" , __LINE__);return -1 ; }snprintf (prefix,sizeof (prefix),"--file-prefix=%s" , tmp);
@@ -1588,7 +1630,7 @@ test_memory_flags(void)#endif if (num_sockets <=0 ) { -printf ("Error - cannot get number of sockets!\n" ); +printf ("Error (line %d) - cannot get number of sockets!\n" , __LINE__);return -1 ; }
@@ -1603,7 +1645,8 @@ test_memory_flags(void) "--file-prefix=" memtest, valid_socket_mem};if (launch_proc (argv0) !=0 ) { -printf ("Error - secondary process failed with valid -m flag !\n" ); +printf ("Error (line %d) - secondary process failed with valid -m flag !\n" , + __LINE__);return -1 ; }
@@ -1613,14 +1656,15 @@ test_memory_flags(void)#endif if (launch_proc (argv1) !=0 ) { -printf ("Error - process failed with valid -m flag!\n" ); +printf ("Error (line %d) - process failed with valid -m flag!\n" , __LINE__);return -1 ; }populate_socket_mem_param (num_sockets,"0" ,"" , arg2_socket_mem,sizeof (arg2_socket_mem));if (launch_proc (argv2) !=0 ) { -printf ("Error - process failed with valid (zero) --socket-mem!\n" ); +printf ("Error (line %d) - process failed with valid (zero) --socket-mem!\n" , + __LINE__);return -1 ; }
@@ -1628,25 +1672,24 @@ test_memory_flags(void)populate_socket_mem_param (num_sockets -1 ,"2" ,"," , arg3_socket_mem,sizeof (arg3_socket_mem));if (launch_proc (argv3) ==0 ) { -printf ("Error - process run ok with invalid " -"(incomplete) --socket-mem!\n" ); +printf ("Error (line %d) - process run ok with invalid (incomplete) --socket-mem!\n" , + __LINE__);return -1 ; }populate_socket_mem_param (num_sockets -1 ,"2" ,",Fred" , arg4_socket_mem,sizeof (arg4_socket_mem));if (launch_proc (argv4) ==0 ) { -printf ("Error - process run ok with invalid " -"(mixed with invalid input) --socket-mem!\n" ); +printf ("Error (line %d) - process run ok with invalid (mixed with invalid input) --socket-mem!\n" , + __LINE__);return -1 ; }populate_socket_mem_param (num_sockets -1 ,"2" ,",Fred0" , arg5_socket_mem,sizeof (arg5_socket_mem));if (launch_proc (argv5) ==0 ) { -printf ("Error - process run ok with invalid " -"(mixed with invalid input with a numeric value as " -"last character) --socket-mem!\n" ); +printf ("Error (line %d) - process run ok with invalid (mixed with invalid input with a numeric value as last character) --socket-mem!\n" , + __LINE__);return -1 ; } }
@@ -1655,35 +1698,38 @@ test_memory_flags(void)populate_socket_mem_param (num_sockets -2 ,"2" ,",,2" , arg6_socket_mem,sizeof (arg6_socket_mem));if (launch_proc (argv6) ==0 ) { -printf ("Error - process run ok with invalid " -"(with empty socket) --socket-mem!\n" ); +printf ("Error (line %d) - process run ok with invalid (with empty socket) --socket-mem!\n" , + __LINE__);return -1 ; } }if (launch_proc (argv7) ==0 ) { -printf ("Error - process run ok with invalid (null) --socket-mem!\n" ); +printf ("Error (line %d) - process run ok with invalid (null) --socket-mem!\n" , + __LINE__);return -1 ; }populate_socket_mem_param (num_sockets,"2" ,"" , arg8_socket_mem,sizeof (arg8_socket_mem));if (launch_proc (argv8) ==0 ) { -printf ("Error - process run ok with --socket-mem and -m specified!\n" ); +printf ("Error (line %d) - process run ok with --socket-mem and -m specified!\n" , + __LINE__);return -1 ; }populate_socket_mem_param (num_sockets +1 ,"2" ,"" , invalid_socket_mem,sizeof (invalid_socket_mem));if (launch_proc (argv9) ==0 ) { -printf ("Error - process run ok with extra socket in --socket-mem!\n" ); +printf ("Error (line %d) - process run ok with extra socket in --socket-mem!\n" , + __LINE__);return -1 ; }populate_socket_mem_param (num_sockets,"2" ,"" , valid_socket_mem,sizeof (valid_socket_mem));if (launch_proc (argv10) !=0 ) { -printf ("Error - process failed with valid --socket-mem!\n" ); +printf ("Error (line %d) - process failed with valid --socket-mem!\n" , __LINE__);return -1 ; }
Signature · 1 line
2.51.0
Re: [PATCH 2/3] test/eal_flags: add line numbers to error messages
Quoted 5 lines · On Tue, 20 Jan 2026 11:25:51 +0000 Bruce Richardson…
To aid in debugging any problems, and because there are sometimes multiple very similar error messages in tests, add line numbers to the error message printouts.
Signed-off-by Bruce Richardson <[email protected]>
Alternative but not required would be to the TEST_ASSERT macros which have file and line.
Re: [PATCH 2/3] test/eal_flags: add line numbers to error messages
Quoted 11 lines · Stephen Hemminger
Quoted 5 lines · On Tue, 20 Jan 2026 11:25:51 +0000 Bruce Richardson…
To aid in debugging any problems, and because there are sometimes multiple very similar error messages in tests, add line numbers to the error message printouts.
Signed-off-by Bruce Richardson <[email protected]>Alternative but not required would be to the
TEST_ASSERTmacros which have file and line.
Yep. Agreed it would be better. However, for this patch I decided just to add line numbers directly to minize churn to the code.
/Bruce
PATCH 3/3 test/eal_flags: add extra logging for file prefix tests
In reply to Bruce RichardsonAdd some additional logging about what files are being matched, locked or deleted as part of the unit tests. This could help with debugging any issues with the tests.
--- app/test/test_eal_flags.c | 5 +++++ 1 file changed, 5 insertions(+)
app/test/test_eal_flags.c +5 -0
@@ -214,6 +214,8 @@ process_hugefiles(const char * prefix, enum hugepage_action action)case HUGEPAGE_CHECK_EXISTS : {/* file exists, return */ +printf ("Hugepage file %s/%s exists, matching prefix %s\n" , + hugedir, dirent->d_name, hugefile_prefix);closedir (hugepage_dir); result =1 ; goto end;
@@ -236,6 +238,7 @@ process_hugefiles(const char * prefix, enum hugepage_action action) result =-1 ; goto end; } +printf ("Deleted hugepage file %s\n" , file_path); result =1 ; }break ;
@@ -269,6 +272,8 @@ process_hugefiles(const char * prefix, enum hugepage_action action) goto end; } result =1 ; +printf ("Hugepage file %s/%s is locked\n" , + hugedir, dirent->d_name);close (fd); }break ;
Signature · 1 line
2.51.0
Quoted 13 lines · Bruce Richardson
If issues arise in the EAL flags unit tests they can be trick to debug due to the lack of debugging output when running recursive instances of the test binary with different EAL flags. Try to improve this situation by adding extra debug output for recursive dpdk-test calls in general, and to some of the EAL flags tests in particular that are proving problematic.
NOTE: there are intermittent failures seen in github actions with the file-prefix EAL unit tests. The problems seem less frequent, or possibly "gone", with this set applied, but even if it masks the problem, this set does give us greater visibility to debug if they do re-occur.
Quoted 8 lines
Bruce Richardson (3):
app/test: add extra logging for recursive calls test/eal_flags: add line numbers to error messages test/eal_flags: add extra logging for file prefix testsapp/test/test.c | 14 +- app/test/test_eal_flags.c | 373 ++++++++++++++++++++++---------------- 2 files changed, 224 insertions(+), 163 deletions(-)
Series applied, thanks Bruce for looking into this.
Signature · 1 line
David Marchand
Hello Bruce,
Quoted 21 lines · David Marchand
Quoted 18 lines · Bruce Richardson
If issues arise in the EAL flags unit tests they can be trick to debug due to the lack of debugging output when running recursive instances of the test binary with different EAL flags. Try to improve this situation by adding extra debug output for recursive dpdk-test calls in general, and to some of the EAL flags tests in particular that are proving problematic.
NOTE: there are intermittent failures seen in github actions with the file-prefix EAL unit tests. The problems seem less frequent, or possibly "gone", with this set applied, but even if it masks the problem, this set does give us greater visibility to debug if they do re-occur.
Bruce Richardson (3):
app/test: add extra logging for recursive calls test/eal_flags: add line numbers to error messages test/eal_flags: add extra logging for file prefix tests
Quoted 5 lines
Quoted 3 lines
app/test/test.c | 14 +- app/test/test_eal_flags.c | 373 ++++++++++++++++++++++---------------- 2 files changed, 224 insertions(+), 163 deletions(-)Series applied, thanks Bruce for looking into this.
We got one occurence in the CI.
https://github.com/DPDK/dpdk/actions/runs/21214407393/job/61031333760
Here are the logs:
2026-01-21T15:18:20.4304709Z 33/125 DPDK:fast-tests / eal_flags_vdev_opt_autotest FAIL 0.92s (exit status 255 or signal 127 SIGinvalid) 2026-01-21T15:18:20.4307907Z >>> DPDK_TEST=eal_flags_vdev_opt_autotest MALLOC_PERTURB_=42 /home/runner/work/dpdk/dpdk/build/app/dpdk-test -d /home/runner/work/dpdk/dpdk/build/drivers 2026-01-21T15:18:20.4309736Z ――――――――――――――――――――――――――――――――――――― ✀ ――――――――――――――――――――――――――――――――――――― 2026-01-21T15:18:20.4310450Z EAL: Detected CPU lcores: 4 2026-01-21T15:18:20.4310882Z EAL: Detected NUMA nodes: 1 2026-01-21T15:18:20.4311249Z EAL: Detected shared linkage of DPDK 2026-01-21T15:18:20.4311730Z EAL: Multi-process socket /var/run/dpdk/rte/mp_socket 2026-01-21T15:18:20.4312208Z EAL: Selected IOVA mode 'PA' 2026-01-21T15:18:20.4312639Z APP: HPET is not enabled, using TSC as default timer 2026-01-21T15:18:20.4313094Z RTE>>eal_flags_vdev_opt_autotest 2026-01-21T15:18:20.4314397Z Running binary with argv[]:'/home/runner/work/dpdk/dpdk/build/app/dpdk-test' '--file-prefix=vdev' '--no-huge' '--vdev' 'eth_dummy' '--driver-path=/home/runner/work/dpdk/dpdk/build/drivers' 2026-01-21T15:18:20.4315613Z EAL: Detected CPU lcores: 4 2026-01-21T15:18:20.4316012Z EAL: Detected NUMA nodes: 1 2026-01-21T15:18:20.4316432Z EAL: Detected shared linkage of DPDK 2026-01-21T15:18:20.4316872Z EAL: failed to parse device "eth_dummy" 2026-01-21T15:18:20.4317298Z EAL: Unable to parse device 'eth_dummy' 2026-01-21T15:18:20.4317770Z EAL: Unregistering with invalid input parameter 2026-01-21T15:18:20.4318225Z Error with EAL initialization, ret = -1 2026-01-21T15:18:20.4319381Z Running binary with argv[]:'/home/runner/work/dpdk/dpdk/build/app/dpdk-test' '--file-prefix=vdev' '--no-huge' '--vdev' 'net_ring0' '--driver-path=/home/runner/work/dpdk/dpdk/build/drivers' 2026-01-21T15:18:20.4320519Z EAL: Detected CPU lcores: 4 2026-01-21T15:18:20.4320904Z EAL: Detected NUMA nodes: 1 2026-01-21T15:18:20.4321312Z EAL: Detected shared linkage of DPDK 2026-01-21T15:18:20.4321831Z EAL: Multi-process socket /var/run/dpdk/vdev/mp_socket 2026-01-21T15:18:20.4322354Z EAL: Selected IOVA mode 'VA' 2026-01-21T15:18:20.4322817Z Calling recursive action for test_invalid_vdev_flag 2026-01-21T15:18:20.4323483Z Returned from recursive action for test_invalid_vdev_flag with 0 2026-01-21T15:18:20.4324455Z Cleaning up /home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance 2026-01-21T15:18:20.4325093Z /home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance returning 0 2026-01-21T15:18:20.4326091Z Running binary with argv[]:'/home/runner/work/dpdk/dpdk/build/app/dpdk-test' '--file-prefix=vdev' '--no-huge' '--vdev' 'net_ring0,args=test' '--driver-path=/home/runner/work/dpdk/dpdk/build/drivers' 2026-01-21T15:18:20.4326783Z EAL: Detected CPU lcores: 4 2026-01-21T15:18:20.4327017Z EAL: Detected NUMA nodes: 1 2026-01-21T15:18:20.4327252Z EAL: Detected shared linkage of DPDK 2026-01-21T15:18:20.4327550Z EAL: Multi-process socket /var/run/dpdk/vdev/mp_socket 2026-01-21T15:18:20.4327845Z EAL: Selected IOVA mode 'VA' 2026-01-21T15:18:20.4328110Z Calling recursive action for test_invalid_vdev_flag 2026-01-21T15:18:20.4328475Z Returned from recursive action for test_invalid_vdev_flag with 0 2026-01-21T15:18:20.4328998Z Cleaning up /home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance 2026-01-21T15:18:20.4329492Z /home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance returning 0 2026-01-21T15:18:20.4330341Z Running binary with
argv[]:'/home/runner/work/dpdk/dpdk/build/app/dpdk-test' '--file-prefix=vdev' '--no-huge' '--vdev' 'net_ring0,nodeaction=r1:0:CREATE' '--driver-path=/home/runner/work/dpdk/dpdk/build/drivers'
2026-01-21T15:18:20.4331077Z EAL: Detected CPU lcores: 4 2026-01-21T15:18:20.4331303Z EAL: Detected NUMA nodes: 1 2026-01-21T15:18:20.4331530Z EAL: Detected shared linkage of DPDK 2026-01-21T15:18:20.4331832Z EAL: Multi-process socket /var/run/dpdk/vdev/mp_socket 2026-01-21T15:18:20.4332134Z EAL: Selected IOVA mode 'VA' 2026-01-21T15:18:20.4332468Z Error (line 490) - process did not run ok with valid vdev value with valid args 2026-01-21T15:18:20.4332815Z Test Failed 2026-01-21T15:18:20.4333029Z RTE>> 2026-01-21T15:18:20.4333385Z ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― 2026-01-21T15:18:20.4333623Z
And:
2026-01-21T15:18:22.3440177Z 36/125 DPDK:fast-tests / eal_flags_file_prefix_autotest FAIL 0.50s (exit status 255 or signal 127 SIGinvalid) 2026-01-21T15:18:22.3442376Z >>> DPDK_TEST=eal_flags_file_prefix_autotest MALLOC_PERTURB_=162 /home/runner/work/dpdk/dpdk/build/app/dpdk-test -d /home/runner/work/dpdk/dpdk/build/drivers 2026-01-21T15:18:22.3443273Z ――――――――――――――――――――――――――――――――――――― ✀ ――――――――――――――――――――――――――――――――――――― 2026-01-21T15:18:22.3443617Z EAL: Detected CPU lcores: 4 2026-01-21T15:18:22.3443875Z EAL: Detected NUMA nodes: 1 2026-01-21T15:18:22.3444115Z EAL: Detected shared linkage of DPDK 2026-01-21T15:18:22.3444453Z EAL: Multi-process socket /var/run/dpdk/rte/mp_socket 2026-01-21T15:18:22.3444751Z EAL: Selected IOVA mode 'PA' 2026-01-21T15:18:22.3445036Z APP: HPET is not enabled, using TSC as default timer 2026-01-21T15:18:22.3445333Z RTE>>eal_flags_file_prefix_autotest 2026-01-21T15:18:22.3445927Z Hugepage file /dev/hugepages/rtemap_2 exists, matching prefix rtemap_ 2026-01-21T15:18:22.3446300Z Hugepage file /dev/hugepages/rtemap_2 is locked 2026-01-21T15:18:22.3446599Z Hugepage file /dev/hugepages/rtemap_1 is locked 2026-01-21T15:18:22.3446897Z Hugepage file /dev/hugepages/rtemap_0 is locked 2026-01-21T15:18:22.3447615Z Running binary with argv[]:'/home/runner/work/dpdk/dpdk/build/app/dpdk-test' '--proc-type=secondary' '-m' '18' '--file-prefix=memtest' '--driver-path=/home/runner/work/dpdk/dpdk/build/drivers' 2026-01-21T15:18:22.3448304Z EAL: Detected CPU lcores: 4 2026-01-21T15:18:22.3448532Z EAL: Detected NUMA nodes: 1 2026-01-21T15:18:22.3448758Z EAL: Detected shared linkage of DPDK 2026-01-21T15:18:22.3449106Z EAL: Multi-process socket /var/run/dpdk/memtest/mp_socket_59707_2a8a22b91bd 2026-01-21T15:18:22.3449778Z EAL: failed to send to (/var/run/dpdk/memtest/mp_socket) due to No such file or directory 2026-01-21T15:18:22.3450297Z EAL: Fail to send request /var/run/dpdk/memtest/mp_socket:bus_vdev_mp 2026-01-21T15:18:22.3450673Z VDEV_BUS: vdev_scan(): Failed to request vdev from primary 2026-01-21T15:18:22.3450972Z EAL: Selected IOVA mode 'PA' 2026-01-21T15:18:22.3451326Z EAL: failed to send to (/var/run/dpdk/memtest/mp_socket) due to No such file or directory 2026-01-21T15:18:22.3451706Z EAL: Cannot send message to primary 2026-01-21T15:18:22.3451967Z EAL: error allocating rte services array 2026-01-21T15:18:22.3452224Z EAL: rte_service_init() failed 2026-01-21T15:18:22.3452473Z Error with EAL initialization, ret = -1 2026-01-21T15:18:22.3452809Z Hugepage file /dev/hugepages/rtemap_2 exists, matching prefix rtemap_ 2026-01-21T15:18:22.3453173Z Hugepage file /dev/hugepages/rtemap_2 is locked 2026-01-21T15:18:22.3453470Z Hugepage file /dev/hugepages/rtemap_1 is locked 2026-01-21T15:18:22.3453764Z Hugepage file /dev/hugepages/rtemap_0 is locked 2026-01-21T15:18:22.3454168Z Hugepage file /dev/hugepages/rtemap_2 exists, matching prefix rtemap_ 2026-01-21T15:18:22.3454524Z Hugepage file /dev/hugepages/rtemap_2 is locked 2026-01-21T15:18:22.3454816Z Hugepage file /dev/hugepages/rtemap_1 is locked 2026-01-21T15:18:22.3455110Z Hugepage file /dev/hugepages/rtemap_0 is locked 2026-01-21T15:18:22.3455938Z Running binary with argv[]:'/home/runner/work/dpdk/dpdk/build/app/dpdk-test' '-m' '18' '--file-prefix=memtest1' '--driver-path=/home/runner/work/dpdk/dpdk/build/drivers' 2026-01-21T15:18:22.3456554Z EAL: Detected CPU lcores: 4 2026-01-21T15:18:22.3456775Z EAL: Detected NUMA nodes: 1 2026-01-21T15:18:22.3457003Z EAL: Detected shared linkage of DPDK 2026-01-21T15:18:22.3457319Z EAL: Multi-process socket /var/run/dpdk/memtest1/mp_socket 2026-01-21T15:18:22.3457625Z EAL: Selected IOVA mode 'PA' 2026-01-21T15:18:22.3457959Z Calling recursive action for test_file_prefix 2026-01-21T15:18:22.3458291Z Returned from recursive action for test_file_prefix with 0 2026-01-21T15:18:22.3458715Z Cleaning up /home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance 2026-01-21T15:18:22.3459202Z /home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance returning 0 2026-01-21T15:18:22.3459656Z Hugepage file /dev/hugepages/rtemap_2 exists, matching prefix rtemap_ 2026-01-21T15:18:22.3460017Z Hugepage file /dev/hugepages/rtemap_2 is locked 2026-01-21T15:18:22.3460310Z Hugepage file /dev/hugepages/rtemap_1 is locked 2026-01-21T15:18:22.3460608Z Hugepage file /dev/hugepages/rtemap_0 is locked 2026-01-21T15:18:22.3460975Z Hugepage file /dev/hugepages/rtemap_2 exists, matching prefix rtemap_ 2026-01-21T15:18:22.3461339Z Hugepage file /dev/hugepages/rtemap_2 is locked 2026-01-21T15:18:22.3461640Z Hugepage file /dev/hugepages/rtemap_1 is locked 2026-01-21T15:18:22.3461933Z Hugepage file /dev/hugepages/rtemap_0 is locked 2026-01-21T15:18:22.3462316Z Hugepage file /dev/hugepages/memtest1map_8 exists, matching prefix memtest1map_ 2026-01-21T15:18:22.3462788Z Error (line 1396) - hugepage files for memtest1 were not deleted! 2026-01-21T15:18:22.3463100Z Test Failed 2026-01-21T15:18:22.3463268Z RTE>> 2026-01-21T15:18:22.3463597Z ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― 2026-01-21T15:18:22.3463824Z
For the latter, I suspect that now passing --driver-path exposes some driver leak.
But strange that it is not systematic...
--log-level=*:debug could help...
Signature · 1 line
David Marchand
Quoted 104 lines · David Marchand
Hello Bruce,
Quoted 21 lines · David Marchand
Quoted 18 lines · Bruce Richardson
If issues arise in the EAL flags unit tests they can be trick to debug due to the lack of debugging output when running recursive instances of the test binary with different EAL flags. Try to improve this situation by adding extra debug output for recursive dpdk-test calls in general, and to some of the EAL flags tests in particular that are proving problematic.
NOTE: there are intermittent failures seen in github actions with the file-prefix EAL unit tests. The problems seem less frequent, or possibly "gone", with this set applied, but even if it masks the problem, this set does give us greater visibility to debug if they do re-occur.
Bruce Richardson (3):
app/test: add extra logging for recursive calls test/eal_flags: add line numbers to error messages test/eal_flags: add extra logging for file prefix testsQuoted 5 lines
Quoted 3 lines
app/test/test.c | 14 +- app/test/test_eal_flags.c | 373 ++++++++++++++++++++++---------------- 2 files changed, 224 insertions(+), 163 deletions(-)Series applied, thanks Bruce for looking into this.
We got one occurence in the CI.
https://github.com/DPDK/dpdk/actions/runs/21214407393/job/61031333760Here are the logs:
2026-01-21T15:18:20.4304709Z 33/125 DPDK:fast-tests / eal_flags_vdev_opt_autotest FAIL 0.92s (exit status 255 or signal 127 SIGinvalid) 2026-01-21T15:18:20.4307907Z >>> DPDK_TEST=eal_flags_vdev_opt_autotest MALLOC_PERTURB_=42 /home/runner/work/dpdk/dpdk/build/app/dpdk-test -d /home/runner/work/dpdk/dpdk/build/drivers 2026-01-21T15:18:20.4309736Z ――――――――――――――――――――――――――――――――――――― ✀ ――――――――――――――――――――――――――――――――――――― 2026-01-21T15:18:20.4310450Z EAL: Detected CPU lcores: 4 2026-01-21T15:18:20.4310882Z EAL: Detected NUMA nodes: 1 2026-01-21T15:18:20.4311249Z EAL: Detected shared linkage of DPDK 2026-01-21T15:18:20.4311730Z EAL: Multi-process socket /var/run/dpdk/rte/mp_socket 2026-01-21T15:18:20.4312208Z EAL: Selected IOVA mode 'PA' 2026-01-21T15:18:20.4312639Z APP: HPET is not enabled, using TSC as default timer 2026-01-21T15:18:20.4313094Z RTE>>eal_flags_vdev_opt_autotest 2026-01-21T15:18:20.4314397Z Running binary with argv[]:'/home/runner/work/dpdk/dpdk/build/app/dpdk-test' '--file-prefix=vdev' '--no-huge' '--vdev' 'eth_dummy' '--driver-path=/home/runner/work/dpdk/dpdk/build/drivers' 2026-01-21T15:18:20.4315613Z EAL: Detected CPU lcores: 4 2026-01-21T15:18:20.4316012Z EAL: Detected NUMA nodes: 1 2026-01-21T15:18:20.4316432Z EAL: Detected shared linkage of DPDK 2026-01-21T15:18:20.4316872Z EAL: failed to parse device "eth_dummy" 2026-01-21T15:18:20.4317298Z EAL: Unable to parse device 'eth_dummy' 2026-01-21T15:18:20.4317770Z EAL: Unregistering with invalid input parameter 2026-01-21T15:18:20.4318225Z Error with EAL initialization, ret = -1 2026-01-21T15:18:20.4319381Z Running binary with argv[]:'/home/runner/work/dpdk/dpdk/build/app/dpdk-test' '--file-prefix=vdev' '--no-huge' '--vdev' 'net_ring0' '--driver-path=/home/runner/work/dpdk/dpdk/build/drivers' 2026-01-21T15:18:20.4320519Z EAL: Detected CPU lcores: 4 2026-01-21T15:18:20.4320904Z EAL: Detected NUMA nodes: 1 2026-01-21T15:18:20.4321312Z EAL: Detected shared linkage of DPDK 2026-01-21T15:18:20.4321831Z EAL: Multi-process socket /var/run/dpdk/vdev/mp_socket 2026-01-21T15:18:20.4322354Z EAL: Selected IOVA mode 'VA' 2026-01-21T15:18:20.4322817Z Calling recursive action for test_invalid_vdev_flag 2026-01-21T15:18:20.4323483Z Returned from recursive action for test_invalid_vdev_flag with 0 2026-01-21T15:18:20.4324455Z Cleaning up /home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance 2026-01-21T15:18:20.4325093Z /home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance returning 0 2026-01-21T15:18:20.4326091Z Running binary with argv[]:'/home/runner/work/dpdk/dpdk/build/app/dpdk-test' '--file-prefix=vdev' '--no-huge' '--vdev' 'net_ring0,args=test' '--driver-path=/home/runner/work/dpdk/dpdk/build/drivers' 2026-01-21T15:18:20.4326783Z EAL: Detected CPU lcores: 4 2026-01-21T15:18:20.4327017Z EAL: Detected NUMA nodes: 1 2026-01-21T15:18:20.4327252Z EAL: Detected shared linkage of DPDK 2026-01-21T15:18:20.4327550Z EAL: Multi-process socket /var/run/dpdk/vdev/mp_socket 2026-01-21T15:18:20.4327845Z EAL: Selected IOVA mode 'VA' 2026-01-21T15:18:20.4328110Z Calling recursive action for test_invalid_vdev_flag 2026-01-21T15:18:20.4328475Z Returned from recursive action for test_invalid_vdev_flag with 0 2026-01-21T15:18:20.4328998Z Cleaning up /home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance 2026-01-21T15:18:20.4329492Z /home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance returning 0 2026-01-21T15:18:20.4330341Z Running binary withargv[]:'/home/runner/work/dpdk/dpdk/build/app/dpdk-test' '--file-prefix=vdev' '--no-huge' '--vdev' 'net_ring0,nodeaction=r1:0:CREATE' '--driver-path=/home/runner/work/dpdk/dpdk/build/drivers'
Quoted 6 lines
2026-01-21T15:18:20.4331077Z EAL: Detected CPU lcores: 4 2026-01-21T15:18:20.4331303Z EAL: Detected NUMA nodes: 1 2026-01-21T15:18:20.4331530Z EAL: Detected shared linkage of DPDK 2026-01-21T15:18:20.4331832Z EAL: Multi-process socket /var/run/dpdk/vdev/mp_socket 2026-01-21T15:18:20.4332134Z EAL: Selected IOVA mode 'VA'
Looks like the secondary process silently crashes here. No indication why though. :-(
Quoted 81 lines
2026-01-21T15:18:20.4332468Z Error (line 490) - process did not run ok with valid vdev value with valid args 2026-01-21T15:18:20.4332815Z Test Failed 2026-01-21T15:18:20.4333029Z RTE>> 2026-01-21T15:18:20.4333385Z ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― 2026-01-21T15:18:20.4333623ZAnd:
2026-01-21T15:18:22.3440177Z 36/125 DPDK:fast-tests / eal_flags_file_prefix_autotest FAIL 0.50s (exit status 255 or signal 127 SIGinvalid) 2026-01-21T15:18:22.3442376Z >>> DPDK_TEST=eal_flags_file_prefix_autotest MALLOC_PERTURB_=162 /home/runner/work/dpdk/dpdk/build/app/dpdk-test -d /home/runner/work/dpdk/dpdk/build/drivers 2026-01-21T15:18:22.3443273Z ――――――――――――――――――――――――――――――――――――― ✀ ――――――――――――――――――――――――――――――――――――― 2026-01-21T15:18:22.3443617Z EAL: Detected CPU lcores: 4 2026-01-21T15:18:22.3443875Z EAL: Detected NUMA nodes: 1 2026-01-21T15:18:22.3444115Z EAL: Detected shared linkage of DPDK 2026-01-21T15:18:22.3444453Z EAL: Multi-process socket /var/run/dpdk/rte/mp_socket 2026-01-21T15:18:22.3444751Z EAL: Selected IOVA mode 'PA' 2026-01-21T15:18:22.3445036Z APP: HPET is not enabled, using TSC as default timer 2026-01-21T15:18:22.3445333Z RTE>>eal_flags_file_prefix_autotest 2026-01-21T15:18:22.3445927Z Hugepage file /dev/hugepages/rtemap_2 exists, matching prefix rtemap_ 2026-01-21T15:18:22.3446300Z Hugepage file /dev/hugepages/rtemap_2 is locked 2026-01-21T15:18:22.3446599Z Hugepage file /dev/hugepages/rtemap_1 is locked 2026-01-21T15:18:22.3446897Z Hugepage file /dev/hugepages/rtemap_0 is locked 2026-01-21T15:18:22.3447615Z Running binary with argv[]:'/home/runner/work/dpdk/dpdk/build/app/dpdk-test' '--proc-type=secondary' '-m' '18' '--file-prefix=memtest' '--driver-path=/home/runner/work/dpdk/dpdk/build/drivers' 2026-01-21T15:18:22.3448304Z EAL: Detected CPU lcores: 4 2026-01-21T15:18:22.3448532Z EAL: Detected NUMA nodes: 1 2026-01-21T15:18:22.3448758Z EAL: Detected shared linkage of DPDK 2026-01-21T15:18:22.3449106Z EAL: Multi-process socket /var/run/dpdk/memtest/mp_socket_59707_2a8a22b91bd 2026-01-21T15:18:22.3449778Z EAL: failed to send to (/var/run/dpdk/memtest/mp_socket) due to No such file or directory 2026-01-21T15:18:22.3450297Z EAL: Fail to send request /var/run/dpdk/memtest/mp_socket:bus_vdev_mp 2026-01-21T15:18:22.3450673Z VDEV_BUS: vdev_scan(): Failed to request vdev from primary 2026-01-21T15:18:22.3450972Z EAL: Selected IOVA mode 'PA' 2026-01-21T15:18:22.3451326Z EAL: failed to send to (/var/run/dpdk/memtest/mp_socket) due to No such file or directory 2026-01-21T15:18:22.3451706Z EAL: Cannot send message to primary 2026-01-21T15:18:22.3451967Z EAL: error allocating rte services array 2026-01-21T15:18:22.3452224Z EAL: rte_service_init() failed 2026-01-21T15:18:22.3452473Z Error with EAL initialization, ret = -1 2026-01-21T15:18:22.3452809Z Hugepage file /dev/hugepages/rtemap_2 exists, matching prefix rtemap_ 2026-01-21T15:18:22.3453173Z Hugepage file /dev/hugepages/rtemap_2 is locked 2026-01-21T15:18:22.3453470Z Hugepage file /dev/hugepages/rtemap_1 is locked 2026-01-21T15:18:22.3453764Z Hugepage file /dev/hugepages/rtemap_0 is locked 2026-01-21T15:18:22.3454168Z Hugepage file /dev/hugepages/rtemap_2 exists, matching prefix rtemap_ 2026-01-21T15:18:22.3454524Z Hugepage file /dev/hugepages/rtemap_2 is locked 2026-01-21T15:18:22.3454816Z Hugepage file /dev/hugepages/rtemap_1 is locked 2026-01-21T15:18:22.3455110Z Hugepage file /dev/hugepages/rtemap_0 is locked 2026-01-21T15:18:22.3455938Z Running binary with argv[]:'/home/runner/work/dpdk/dpdk/build/app/dpdk-test' '-m' '18' '--file-prefix=memtest1' '--driver-path=/home/runner/work/dpdk/dpdk/build/drivers' 2026-01-21T15:18:22.3456554Z EAL: Detected CPU lcores: 4 2026-01-21T15:18:22.3456775Z EAL: Detected NUMA nodes: 1 2026-01-21T15:18:22.3457003Z EAL: Detected shared linkage of DPDK 2026-01-21T15:18:22.3457319Z EAL: Multi-process socket /var/run/dpdk/memtest1/mp_socket 2026-01-21T15:18:22.3457625Z EAL: Selected IOVA mode 'PA' 2026-01-21T15:18:22.3457959Z Calling recursive action for test_file_prefix 2026-01-21T15:18:22.3458291Z Returned from recursive action for test_file_prefix with 0 2026-01-21T15:18:22.3458715Z Cleaning up /home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance 2026-01-21T15:18:22.3459202Z
Quoted 2 lines
/home/runner/work/dpdk/dpdk/build/app/dpdk-testrecursive instance returning 0
So process cleanup ok before returning. All hugepage files should be automatically deleted.
Quoted 20 lines
2026-01-21T15:18:22.3459656Z Hugepage file /dev/hugepages/rtemap_2 exists, matching prefix rtemap_ 2026-01-21T15:18:22.3460017Z Hugepage file /dev/hugepages/rtemap_2 is locked 2026-01-21T15:18:22.3460310Z Hugepage file /dev/hugepages/rtemap_1 is locked 2026-01-21T15:18:22.3460608Z Hugepage file /dev/hugepages/rtemap_0 is locked 2026-01-21T15:18:22.3460975Z Hugepage file /dev/hugepages/rtemap_2 exists, matching prefix rtemap_ 2026-01-21T15:18:22.3461339Z Hugepage file /dev/hugepages/rtemap_2 is locked 2026-01-21T15:18:22.3461640Z Hugepage file /dev/hugepages/rtemap_1 is locked 2026-01-21T15:18:22.3461933Z Hugepage file /dev/hugepages/rtemap_0 is locked 2026-01-21T15:18:22.3462316Z Hugepage file /dev/hugepages/memtest1map_8 exists, matching prefix memtest1map_ 2026-01-21T15:18:22.3462788Z Error (line 1396) - hugepage files for memtest1 were not deleted! 2026-01-21T15:18:22.3463100Z Test Failed 2026-01-21T15:18:22.3463268Z RTE>> 2026-01-21T15:18:22.3463597Z ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― 2026-01-21T15:18:22.3463824Z
Quoted 2 lines
For the latter, I suspect that now passing --driver-path exposes some driver leak.
Even if there was a leak, I would have thought all files would be unlinked anyway. I will dig into this, and discuss with Anatoly too, see if he has suggestions or ideas...
Quoted 4 lines
But strange that it is not systematic...
--log-level=*:debug could help...
Yes. I will have to see if I can reproduce in a GHA run with that flag added.
/Bruce