aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Jordan <daniel.m.jordan@oracle.com>2018-10-11 21:19:00 +0800
committerFengguang Wu <fengguang.wu@intel.com>2018-10-11 21:19:00 +0800
commit62f2d0962054be966d302cacbbcb9dac433f2932 (patch)
tree4af5f3f10cc934459bd6d545cbba6b1e8ce2cd0d
parentd8b6d3c51d1c4de6c0f6f4ef1c59d657c574a182 (diff)
downloadvm-scalability-62f2d0962054be966d302cacbbcb9dac433f2932.tar.gz
case-swap-w-seq: fix ignored --random, keep swap cases dedup'ed
case-swap-w-seq tests for the string -rand in the testcase name to enable usemem's --random option, but the test breaks when -rand doesn't appear last, so case-swap-w-rand-mt isn't actually random. Just change the way we search the testcase name, which keeps case-swap-* deduplicated. Fixes: f35dd1388bfb ("case-swap: add multithreaded test case for case-swap-w-seq/rand") Cc: Aaron Lu <aaron.lu@intel.com> Cc: Ying Huang <ying.huang@intel.com> Suggested-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
-rwxr-xr-xcase-swap-w-seq2
1 files changed, 1 insertions, 1 deletions
diff --git a/case-swap-w-seq b/case-swap-w-seq
index 6e9f206..cf68990 100755
--- a/case-swap-w-seq
+++ b/case-swap-w-seq
@@ -16,7 +16,7 @@ else
multi_task_option="-n"
fi
-if [ "${testcase%-rand}" != "$testcase" ]; then
+if [ "${testcase#*-rand}" != "$testcase" ]; then
rand_seq_option="--random"
else
rand_seq_option=""