summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJianxun Zhang <jianxun.zhang@linux.intel.com>2017-04-20 10:09:42 -0700
committerJohn Kacur <jkacur@redhat.com>2017-05-15 16:47:46 +0200
commit44de1a494583c33e72335221360085f9e1faad2b (patch)
tree313a88d5eefb078a58211ef7a38915035d8496ae
parent470b7394e60f0209e2a08e79617cfead0ef25ed2 (diff)
downloadrt-tests-44de1a494583c33e72335221360085f9e1faad2b.tar.gz
Make -x option position-agnostic
Change 9d2c9edd86943dfea399a0176826af8bb92bf97c introduces the new option of POSIX timer and makes MODE_CLOCK_NANOSLEEP the default choice. But there are two places explicitly set MODE_CLOCK_NANOSLEEP to the variable use_nanosleep in the code, so the actual value of the variable after parsing depends on the position of '-x' to '-U' and '-S'. These command pairs result in different values in the variable: 'cyclictest -S -x' VS 'cyclictest -x -S' 'cyclictest -U -x' VS 'cyclictest -x -U' This change ensures -x work regardless its position by removing the two lines in these cases. Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r--src/cyclictest/cyclictest.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index fceb152..0912494 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -1716,7 +1716,6 @@ static void process_options (int argc, char *argv[], int max_cpus)
smp = 1;
num_threads = max_cpus;
setaffinity = AFFINITY_USEALL;
- use_nanosleep = MODE_CLOCK_NANOSLEEP;
break;
case 't':
case OPT_THREADS:
@@ -1755,7 +1754,6 @@ static void process_options (int argc, char *argv[], int max_cpus)
#ifdef NUMA
num_threads = max_cpus;
setaffinity = AFFINITY_USEALL;
- use_nanosleep = MODE_CLOCK_NANOSLEEP;
#else
warn("cyclictest was not built with the numa option\n");
warn("ignoring --numa or -U\n");