"rsalveti@linux.vnet.ibm.com" fixed the problem reported at bug [1732287] mtest06/mmap1.c missing run_once check in do loop
diff --git a/runtest/ltplite b/runtest/ltplite
index b72eb43..05bcd5c 100644
--- a/runtest/ltplite
+++ b/runtest/ltplite
@@ -1007,7 +1007,7 @@
#test for race conditions
mtest05 mmstress
-mtest06 mmap1
+mtest06 mmap1 -x 0.05
mem01 mem01
mem02 mem02
diff --git a/runtest/mm b/runtest/mm
index f549f0b..a4b6b61 100644
--- a/runtest/mm
+++ b/runtest/mm
@@ -14,7 +14,7 @@
#test for race conditions
mtest05 mmstress
-mtest06 mmap1
+mtest06 mmap1 -x 0.05
mem01 mem01
mem02 mem02
diff --git a/runtest/stress.part1 b/runtest/stress.part1
index ef923d7..89f01dd 100644
--- a/runtest/stress.part1
+++ b/runtest/stress.part1
@@ -14,7 +14,7 @@
#test for race conditions
mtest05 mmstress
-mtest06 mmap1
+mtest06 mmap1 -x 0.05
mem02 mem02
diff --git a/testcases/kernel/mem/mtest06/mmap1.c b/testcases/kernel/mem/mtest06/mmap1.c
index 40cfbd5..c73f395 100644
--- a/testcases/kernel/mem/mtest06/mmap1.c
+++ b/testcases/kernel/mem/mtest06/mmap1.c
@@ -63,6 +63,12 @@
/* we are done with the test - Paul Larson */
/* email:plars@linuxtestproject.org */
/* */
+/* Jun - 12 - 2007 Modified - removing 'run_once', so the test */
+/* can be run only with a time value (or the */
+/* default one, 24 hours). Bug 1732287, pointed */
+/* by jerrywei. */
+/* email:rsalveti@linux.vnet.ibm.com */
+/* */
/* File: mmap1.c */
/* */
/* Description: Test the LINUX memory manager. The program is aimed at */
@@ -398,6 +404,8 @@
long *rmargs = args; /* local pointer to the arguments */
volatile int exit_val = 0; /* pthread exit value */
+ fprintf(stdout, "pid[%d] - read contents of memory %p %ld times\n",
+ getpid(), map_address, rmargs[2]);
if (verbose_print)
fprintf(stdout,
"read_mem()arguments are:\n"
@@ -407,8 +415,6 @@
while (rd_index++ < (int)rmargs[2])
{
- fprintf(stdout, "pid[%d] - read contents of memory %p %ld times\n",
- getpid(), map_address, rmargs[2]);
if (verbose_print)
fprintf(stdout,
"read_mem() in while loop %d times to go %ld times\n",
@@ -500,7 +506,6 @@
int fd; /* temporary file descriptor */
int status[2]; /* exit status for process X and Y */
int sig_ndx; /* index into signal handler structure. */
- int run_once = TRUE;/* run the test once time. (dont repeat) */
pthread_t thid[2]; /* pids of process X and Y */
long chld_args[3]; /* arguments to funcs execed by child process */
extern char *optarg; /* arguments passed to each option */
@@ -558,10 +563,8 @@
if (exec_time == 0)
OPT_MISSING(argv[0], optopt);
else
- if (exec_time < 0) {
+ if (exec_time < 0)
fprintf(stdout,"WARNING: bad argument. Using default %d\n", (exec_time = 24));
- } else
- run_once = FALSE;
break;
default :
usage(argv[0]);