diff options
-rw-r--r-- | drivers/misc/kgdbts.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index 879fcbde32c2..fa394104339c 100644 --- a/drivers/misc/kgdbts.c +++ b/drivers/misc/kgdbts.c | |||
@@ -47,6 +47,7 @@ | |||
47 | * to test the HW NMI watchdog | 47 | * to test the HW NMI watchdog |
48 | * F## = Break at do_fork for ## iterations | 48 | * F## = Break at do_fork for ## iterations |
49 | * S## = Break at sys_open for ## iterations | 49 | * S## = Break at sys_open for ## iterations |
50 | * I## = Run the single step test ## iterations | ||
50 | * | 51 | * |
51 | * NOTE: that the do_fork and sys_open tests are mutually exclusive. | 52 | * NOTE: that the do_fork and sys_open tests are mutually exclusive. |
52 | * | 53 | * |
@@ -875,7 +876,9 @@ static void kgdbts_run_tests(void) | |||
875 | char *ptr; | 876 | char *ptr; |
876 | int fork_test = 0; | 877 | int fork_test = 0; |
877 | int do_sys_open_test = 0; | 878 | int do_sys_open_test = 0; |
879 | int sstep_test = 1000; | ||
878 | int nmi_sleep = 0; | 880 | int nmi_sleep = 0; |
881 | int i; | ||
879 | 882 | ||
880 | ptr = strstr(config, "F"); | 883 | ptr = strstr(config, "F"); |
881 | if (ptr) | 884 | if (ptr) |
@@ -886,6 +889,9 @@ static void kgdbts_run_tests(void) | |||
886 | ptr = strstr(config, "N"); | 889 | ptr = strstr(config, "N"); |
887 | if (ptr) | 890 | if (ptr) |
888 | nmi_sleep = simple_strtol(ptr+1, NULL, 10); | 891 | nmi_sleep = simple_strtol(ptr+1, NULL, 10); |
892 | ptr = strstr(config, "I"); | ||
893 | if (ptr) | ||
894 | sstep_test = simple_strtol(ptr+1, NULL, 10); | ||
889 | 895 | ||
890 | /* required internal KGDB tests */ | 896 | /* required internal KGDB tests */ |
891 | v1printk("kgdbts:RUN plant and detach test\n"); | 897 | v1printk("kgdbts:RUN plant and detach test\n"); |
@@ -894,8 +900,13 @@ static void kgdbts_run_tests(void) | |||
894 | run_breakpoint_test(0); | 900 | run_breakpoint_test(0); |
895 | v1printk("kgdbts:RUN bad memory access test\n"); | 901 | v1printk("kgdbts:RUN bad memory access test\n"); |
896 | run_bad_read_test(); | 902 | run_bad_read_test(); |
897 | v1printk("kgdbts:RUN singlestep breakpoint test\n"); | 903 | v1printk("kgdbts:RUN singlestep test %i iterations\n", sstep_test); |
898 | run_singlestep_break_test(); | 904 | for (i = 0; i < sstep_test; i++) { |
905 | run_singlestep_break_test(); | ||
906 | if (i % 100 == 0) | ||
907 | v1printk("kgdbts:RUN singlestep [%i/%i]\n", | ||
908 | i, sstep_test); | ||
909 | } | ||
899 | 910 | ||
900 | /* ===Optional tests=== */ | 911 | /* ===Optional tests=== */ |
901 | 912 | ||