lib: Allow zero iterations (-i0)
PATCH 1/1 lib: Allow zero iterations (-i0)
-i0 is helpful to test if setup and cleanup are working. We suggest that in maintainer-patch-review-checklist.txt.
--- lib/tst_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/tst_test.c +1 -1
@@ -678,7 +678,7 @@ static void parse_opts(int argc, char *argv[])print_test_tags ();exit (0 );case 'i' : - iterations =SAFE_STRTOL (optarg,1 ,INT_MAX ); + iterations =SAFE_STRTOL (optarg,0 ,INT_MAX );break ;case 'I' :if (tst_test->max_runtime >0 )
Signature · 5 lines
2.39.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi,
Quoted 16 lines · IST Petr Vorel
-i0 is helpful to test if setup and cleanup are working. We suggest that in maintainer-patch-review-checklist.txt.
Fixes 4c0465f217 ("lib: Replace atoi/atof with SAFE_STRTOL/SAFE_STRTOF")Signed-off-by Petr Vorel <[email protected]>--- lib/tst_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/tst_test.c +0
-0
lib/tst_test.c static void parse_opts(int argc, char *argv[]) · line 684
Quoted 8 lines
lib/tst_test.c +1
-1@@ -678,7 +678,7 @@ static void parse_opts(int argc, char *argv[])print_test_tags ();exit (0 );case 'i' : - iterations =SAFE_STRTOL (optarg,1 ,INT_MAX ); + iterations =SAFE_STRTOL (optarg,0 ,INT_MAX );break ;case 'I' :if (tst_test->max_runtime >0 )
Regards,
Avinesh
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 3 lines · Petr Vorel
-i0 is helpful to test if setup and cleanup are working. We suggest that in maintainer-patch-review-checklist.txt.
Until now, I never thought of trying -i0 :-)
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi all,
thanks a lot, merged!
Quoted 6 lines · Petr Vorel
Quoted 3 lines
-i0 is helpful to test if setup and cleanup are working. We suggest that in maintainer-patch-review-checklist.txt.
Until now, I never thought of trying -i0 :-)
Credit goes to Martin Doucha, who let me know some time ago.
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp