aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/usctest.h3
-rw-r--r--lib/ltp_priv.h1
-rw-r--r--lib/parse_opts.c48
-rw-r--r--lib/tst_sig.c11
-rw-r--r--testcases/kernel/module/delete_module/delete_module03.c7
-rw-r--r--testcases/kernel/module/query_module/query_module01.c7
-rw-r--r--testcases/kernel/module/query_module/query_module03.c7
-rw-r--r--testcases/kernel/syscalls/mount/mount01.c7
-rw-r--r--testcases/kernel/syscalls/mount/mount02.c7
-rw-r--r--testcases/kernel/syscalls/mount/mount03.c7
-rw-r--r--testcases/kernel/syscalls/mount/mount04.c7
-rw-r--r--testcases/kernel/syscalls/mount/mount05.c7
-rw-r--r--testcases/kernel/syscalls/mount/mount06.c7
-rw-r--r--testcases/kernel/syscalls/umount/umount01.c7
-rw-r--r--testcases/kernel/syscalls/umount/umount02.c7
-rw-r--r--testcases/kernel/syscalls/umount/umount03.c7
16 files changed, 1 insertions, 146 deletions
diff --git a/include/usctest.h b/include/usctest.h
index 01b47f7b0..6990583a0 100644
--- a/include/usctest.h
+++ b/include/usctest.h
@@ -54,8 +54,7 @@
extern int STD_TIMING_ON, /* turned on by -t to print timing stats */
STD_LOOP_COUNT, /* changed by -in to set loop count to n */
STD_ERRNO_LOG, /* turned on by -e to log errnos returned */
- STD_ERRNO_LIST[], /* counts of errnos returned. indexed by errno */
- STD_COPIES;
+ STD_ERRNO_LIST[]; /* counts of errnos returned. indexed by errno */
#define USC_MAX_ERRNO 2000
diff --git a/lib/ltp_priv.h b/lib/ltp_priv.h
index 7d13694bb..8fec67f2b 100644
--- a/lib/ltp_priv.h
+++ b/lib/ltp_priv.h
@@ -41,6 +41,5 @@ const char *tst_get_startwd(void);
#define USC_LOOP_WALLTIME "USC_LOOP_WALLTIME"
#define USC_NO_FUNC_CHECK "USC_NO_FUNC_CHECK"
#define USC_LOOP_DELAY "USC_LOOP_DELAY"
-#define USC_COPIES "USC_COPIES"
#endif /* __LTP_PRIV_H__ */
diff --git a/lib/parse_opts.c b/lib/parse_opts.c
index 2ac222c48..1249ce982 100644
--- a/lib/parse_opts.c
+++ b/lib/parse_opts.c
@@ -63,7 +63,6 @@ static int STD_PAUSE = 0; /* flag indicating to pause before actual start, */
/* for contention mode */
static int STD_INFINITE = 0; /* flag indciating to loop forever */
int STD_LOOP_COUNT = 1; /* number of iterations */
-int STD_COPIES = 1; /* number of copies */
int STD_ERRNO_LOG = 0; /* flag indicating to do errno logging */
static float STD_LOOP_DURATION = 0.0; /* duration value in fractional seconds */
@@ -97,7 +96,6 @@ static struct std_option_t {
char *flag;
char **arg;
} std_options[] = {
- {"c:", " -c n Run n copies concurrently\n", NULL, NULL},
{"e", " -e Turn on errno logging\n", NULL, NULL},
{"h", " -h Show this help screen\n", NULL, NULL},
{"i:", " -i n Execute test n times\n", NULL, NULL},
@@ -250,20 +248,6 @@ const char *parse_opts(int ac, char **av, const option_t * user_optarr,
if (STD_LOOP_DURATION == 0.0)
STD_INFINITE = 1;
break;
- case 'c': /* Copies */
- fprintf(stderr,
- "WARNING * WARNING * WARNING * WARNING * "
- "WARNING * WARNING * WARNING * WARNING\n\n"
- "The -c option is broken by desing. See:\n\n"
- "http://www.mail-archive.com/"
- "ltp-list@lists.sourceforge.net/msg13418.html\n"
- "\nIn short don't use it in runtest files "
- "as the option will be removed.\n\n"
- "WARNING * WARNING * WARNING * WARNING * "
- "WARNING * WARNING * WARNING * WARNING\n\n");
- options |= OPT_copies;
- STD_COPIES = atoi(optarg);
- break;
case 'p': /* Pause for SIGUSR1 */
STD_PAUSE = 1;
break;
@@ -408,19 +392,6 @@ const char *parse_opts(int ac, char **av, const option_t * user_optarr,
}
/*
- * If the USC_COPIES environmental variable is set,
- * use that number as copies (same as -c option).
- * The -c option with arg will be used even if this env var is set.
- */
- if (!(options & OPT_copies) && (ptr = getenv(USC_COPIES)) != NULL) {
- if (sscanf(ptr, "%d", &STD_COPIES) == 1 && STD_COPIES >= 0) {
- if (Debug)
- printf("Using env %s, set STD_COPIES = %d\n",
- USC_COPIES, STD_COPIES);
- }
- }
-
- /*
* The following are special system testing envs to turn on special
* hooks in the code.
*/
@@ -526,7 +497,6 @@ const char *parse_opts(int ac, char **av, const option_t * user_optarr,
printf("The following variables after option and env parsing:\n");
printf("STD_LOOP_DURATION = %f\n", STD_LOOP_DURATION);
printf("STD_LOOP_DELAY = %f\n", STD_LOOP_DELAY);
- printf("STD_COPIES = %d\n", STD_COPIES);
printf("STD_LOOP_COUNT = %d\n", STD_LOOP_COUNT);
printf("STD_INFINITE = %d\n", STD_INFINITE);
printf("STD_TIMING_ON = %d\n", STD_TIMING_ON);
@@ -556,28 +526,10 @@ static void STD_go(int sig)
int usc_global_setup_hook(void)
{
#ifndef UCLINUX
- int cnt;
/* temp variable to store old signal action to be restored after pause */
int (*_TMP_FUNC) (void);
/*
- * Fork STD_COPIES-1 copies.
- */
- for (cnt = 1; cnt < STD_COPIES; cnt++) {
- switch (fork()) {
- case -1:
- fprintf(stderr, "%s: fork failed: %d - %s\n",
- __FILE__, errno, strerror(errno));
- break;
- case 0:
- cnt = STD_COPIES; /* to stop the forking */
- break;
- default:
- break;
- }
- }
-
- /*
* pause waiting for sigusr1.
*/
if (STD_PAUSE) {
diff --git a/lib/tst_sig.c b/lib/tst_sig.c
index e57b0530b..5841a34de 100644
--- a/lib/tst_sig.c
+++ b/lib/tst_sig.c
@@ -77,12 +77,6 @@
static void (*T_cleanup) ();
-/****************************************************************************
- * STD_COPIES is defined in parse_opts.c but is externed here in order to
- * test whether SIGCHILD should be ignored or not.
- ***************************************************************************/
-extern int STD_COPIES;
-
static void def_handler(); /* default signal handler */
static void (*tst_setup_signal(int, void (*)(int))) (int);
@@ -210,11 +204,6 @@ void tst_sig(int fork_flag, void (*handler) (), void (*cleanup) ())
case _SIGGFAULT:
#endif
break;
-
- case SIGCLD:
- if (fork_flag == FORK || STD_COPIES > 1)
- continue;
-
default:
if (tst_setup_signal(sig, handler) == SIG_ERR)
tst_resm(TWARN | TERRNO,
diff --git a/testcases/kernel/module/delete_module/delete_module03.c b/testcases/kernel/module/delete_module/delete_module03.c
index 794804963..1dd60ca34 100644
--- a/testcases/kernel/module/delete_module/delete_module03.c
+++ b/testcases/kernel/module/delete_module/delete_module03.c
@@ -111,13 +111,6 @@ static void setup(void)
tst_module_load(cleanup, DUMMY_MOD_DEP_KO, NULL);
dummy_mod_dep_loaded = 1;
- if (STD_COPIES != 1) {
- tst_resm(TINFO, "-c option has no effect for this testcase - "
- "doesn't allow running more than one instance "
- "at a time");
- STD_COPIES = 1;
- }
-
TEST_PAUSE;
}
diff --git a/testcases/kernel/module/query_module/query_module01.c b/testcases/kernel/module/query_module/query_module01.c
index f2fee0deb..6798f7ab4 100644
--- a/testcases/kernel/module/query_module/query_module01.c
+++ b/testcases/kernel/module/query_module/query_module01.c
@@ -162,13 +162,6 @@ int main(int argc, char **argv)
tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
}
- if (STD_COPIES != 1) {
- tst_resm(TINFO, "-c option has no effect for these testcases - "
- "doesn't allow running more than one instance "
- "at a time");
- STD_COPIES = 1;
- }
-
tst_tmpdir();
setup();
diff --git a/testcases/kernel/module/query_module/query_module03.c b/testcases/kernel/module/query_module/query_module03.c
index eff1cf703..43f5e965c 100644
--- a/testcases/kernel/module/query_module/query_module03.c
+++ b/testcases/kernel/module/query_module/query_module03.c
@@ -159,13 +159,6 @@ int main(int argc, char **argv)
tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
}
- if (STD_COPIES != 1) {
- tst_resm(TINFO, "-c option has no effect for this testcase - "
- "doesn't allow running more than one instance "
- "at a time");
- STD_COPIES = 1;
- }
-
tst_tmpdir();
setup();
diff --git a/testcases/kernel/syscalls/mount/mount01.c b/testcases/kernel/syscalls/mount/mount01.c
index ea77482cd..67b42e5f1 100644
--- a/testcases/kernel/syscalls/mount/mount01.c
+++ b/testcases/kernel/syscalls/mount/mount01.c
@@ -65,13 +65,6 @@ int main(int ac, char **av)
"you must specify the device used for mounting with the -D "
"option");
- if (STD_COPIES != 1) {
- tst_resm(TINFO, "-c option has no effect for this testcase - "
- "%s doesn't allow running more than one instance "
- "at a time", TCID);
- STD_COPIES = 1;
- }
-
setup();
for (lc = 0; TEST_LOOPING(lc); lc++) {
diff --git a/testcases/kernel/syscalls/mount/mount02.c b/testcases/kernel/syscalls/mount/mount02.c
index 2f20386da..7acc9ac22 100644
--- a/testcases/kernel/syscalls/mount/mount02.c
+++ b/testcases/kernel/syscalls/mount/mount02.c
@@ -107,13 +107,6 @@ int main(int ac, char **av)
tst_brkm(TBROK, NULL, "You must specifiy the device used for "
" mounting with -D option.");
- if (STD_COPIES != 1) {
- tst_resm(TINFO, "-c option has no effect for this testcase - "
- "%s doesn't allow running more than one instance "
- "at a time", TCID);
- STD_COPIES = 1;
- }
-
setup();
for (lc = 0; TEST_LOOPING(lc); lc++) {
diff --git a/testcases/kernel/syscalls/mount/mount03.c b/testcases/kernel/syscalls/mount/mount03.c
index 1e699bcc3..d8a63557b 100644
--- a/testcases/kernel/syscalls/mount/mount03.c
+++ b/testcases/kernel/syscalls/mount/mount03.c
@@ -104,13 +104,6 @@ int main(int argc, char *argv[])
"you must specify the device used for mounting with -D "
"option");
- if (STD_COPIES != 1) {
- tst_resm(TINFO, "-c option has no effect for this testcase - "
- "%s doesn't allow running more than one instance "
- "at a time", TCID);
- STD_COPIES = 1;
- }
-
setup();
for (lc = 0; TEST_LOOPING(lc); lc++) {
diff --git a/testcases/kernel/syscalls/mount/mount04.c b/testcases/kernel/syscalls/mount/mount04.c
index 4804bad37..b0ed4df6f 100644
--- a/testcases/kernel/syscalls/mount/mount04.c
+++ b/testcases/kernel/syscalls/mount/mount04.c
@@ -78,13 +78,6 @@ int main(int ac, char **av)
tst_exit();
}
- if (STD_COPIES != 1) {
- tst_resm(TINFO, "-c option has no effect for this testcase - "
- "%s doesn't allow running more than one instance "
- "at a time", TCID);
- STD_COPIES = 1;
- }
-
setup();
for (lc = 0; TEST_LOOPING(lc); lc++) {
diff --git a/testcases/kernel/syscalls/mount/mount05.c b/testcases/kernel/syscalls/mount/mount05.c
index c3226b915..d0c9200b9 100644
--- a/testcases/kernel/syscalls/mount/mount05.c
+++ b/testcases/kernel/syscalls/mount/mount05.c
@@ -66,13 +66,6 @@ int main(int argc, char *argv[])
if (msg != NULL)
tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- if (STD_COPIES != 1) {
- tst_resm(TINFO, "-c option has no effect for this testcase - "
- "%s doesn't allow running more than one instance "
- "at a time", TCID);
- STD_COPIES = 1;
- }
-
setup();
for (lc = 0; TEST_LOOPING(lc); lc++) {
diff --git a/testcases/kernel/syscalls/mount/mount06.c b/testcases/kernel/syscalls/mount/mount06.c
index 4262ed98b..94f81c6c2 100644
--- a/testcases/kernel/syscalls/mount/mount06.c
+++ b/testcases/kernel/syscalls/mount/mount06.c
@@ -81,13 +81,6 @@ int main(int argc, char *argv[])
"you must specify the device used for mounting with "
"the -D option");
- if (STD_COPIES != 1) {
- tst_resm(TINFO, "-c option has no effect for this testcase - "
- "%s doesn't allow running more than one instance "
- "at a time", TCID);
- STD_COPIES = 1;
- }
-
setup();
for (lc = 0; TEST_LOOPING(lc); lc++) {
diff --git a/testcases/kernel/syscalls/umount/umount01.c b/testcases/kernel/syscalls/umount/umount01.c
index 2f60219b8..19ff10cc3 100644
--- a/testcases/kernel/syscalls/umount/umount01.c
+++ b/testcases/kernel/syscalls/umount/umount01.c
@@ -67,13 +67,6 @@ int main(int ac, char **av)
" information.", TCID);
}
- if (STD_COPIES != 1) {
- tst_resm(TINFO, "-c option has no effect for this testcase - "
- "%s doesn't allow running more than one instance "
- "at a time", TCID);
- STD_COPIES = 1;
- }
-
setup();
for (lc = 0; TEST_LOOPING(lc); lc++) {
diff --git a/testcases/kernel/syscalls/umount/umount02.c b/testcases/kernel/syscalls/umount/umount02.c
index c69197d5d..81a9da5a2 100644
--- a/testcases/kernel/syscalls/umount/umount02.c
+++ b/testcases/kernel/syscalls/umount/umount02.c
@@ -109,13 +109,6 @@ int main(int ac, char **av)
tst_exit();
}
- if (STD_COPIES != 1) {
- tst_resm(TINFO, "-c option has no effect for this testcase - "
- "%s doesn't allow running more than one instance "
- "at a time", TCID);
- STD_COPIES = 1;
- }
-
setup();
for (lc = 0; TEST_LOOPING(lc); lc++) {
diff --git a/testcases/kernel/syscalls/umount/umount03.c b/testcases/kernel/syscalls/umount/umount03.c
index 41f7d0786..e33a8458d 100644
--- a/testcases/kernel/syscalls/umount/umount03.c
+++ b/testcases/kernel/syscalls/umount/umount03.c
@@ -84,13 +84,6 @@ int main(int ac, char **av)
" information.", TCID);
}
- if (STD_COPIES != 1) {
- tst_resm(TINFO, "-c option has no effect for this testcase - "
- "%s doesn't allow running more than one instance "
- "at a time", TCID);
- STD_COPIES = 1;
- }
-
setup();
for (lc = 0; TEST_LOOPING(lc); lc++) {