From cac7e71b9f86c017b0c0da05fdf2e0af926e114c Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Mon, 23 Nov 2015 13:52:28 -0800
Subject: [PATCH] Fix tests to use sort -V instead of -n to sort

snowflake10 after snowflake8
---
 testsuite/expect/test1.92 | 8 ++++----
 testsuite/expect/test1.97 | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/testsuite/expect/test1.92 b/testsuite/expect/test1.92
index 3ad33380e8c..5d4f5a46fe4 100755
--- a/testsuite/expect/test1.92
+++ b/testsuite/expect/test1.92
@@ -70,7 +70,7 @@ expect {
 		exit 0
 	}
 	-re $prompt {
-		send "$srun -l -c1 ./$file_bash | sort -n\r"
+		send "$srun -l -c1 ./$file_bash | sort -V\r"
 	}
 	timeout {
 		send_user "\nFAILURE: salloc not responding\n"
@@ -135,7 +135,7 @@ if {$task_cnt < (2 * $node_cnt)} {
 set this_cnt  0
 set prev_node -1
 set this_node -1
-send "$srun -l -n $task_cnt -m block ./$file_bash | sort -n\r"
+send "$srun -l -n $task_cnt -m block ./$file_bash | sort -V\r"
 expect {
 	-re "nodeid:($number) taskid:($number) localid:($number)" {
 		set this_node $expect_out(1,string)
@@ -185,7 +185,7 @@ set this_cnt  0
 set prev_node -1
 set this_node -1
 set prev_cnt  $block_size
-send "$srun -l -n $task_cnt -m cyclic ./$file_bash | sort -n\r"
+send "$srun -l -n $task_cnt -m cyclic ./$file_bash | sort -V\r"
 expect {
 	-re "nodeid:($number) taskid:($number) localid:($number)" {
 		set this_node $expect_out(1,string)
@@ -235,7 +235,7 @@ set this_cnt  0
 set prev_node -1
 set this_node -1
 set prev_cnt  $block_size
-send "$srun -l -n $task_cnt -m plane=$block_size ./$file_bash | sort -n\r"
+send "$srun -l -n $task_cnt -m plane=$block_size ./$file_bash | sort -V\r"
 expect {
 	-re "nodeid:($number) taskid:($number) localid:($number)" {
 		set this_node $expect_out(1,string)
diff --git a/testsuite/expect/test1.97 b/testsuite/expect/test1.97
index 57811a8ab3b..2b06be75c87 100755
--- a/testsuite/expect/test1.97
+++ b/testsuite/expect/test1.97
@@ -42,7 +42,7 @@ set file_in      "test$test_id\_sc"
 array set nodes {}
 array set tasks {}
 
-# some systems take a while to run the | sort -n | uniq -c stuff
+# some systems take a while to run the | sort -V | uniq -c stuff
 set timeout 60
 
 print_header $test_id
@@ -229,7 +229,7 @@ proc submit_cpu {ntasks ncpus} {
 	sleep 2
 
 	set x 0
-	spawn $bin_bash -c "$srun -N$num_nodes -n$ntasks -w$nodelist -c$ncpus --exclusive $bin_printenv SLURMD_NODENAME | sort -n | uniq -c"
+	spawn $bin_bash -c "$srun -N$num_nodes -n$ntasks -w$nodelist -c$ncpus --exclusive $bin_printenv SLURMD_NODENAME | sort -V | uniq -c"
 	expect {
 		-re "($number) ($alpha_numeric_nodelist)" {
 			set tasks($x) $expect_out(1,string)
@@ -261,7 +261,7 @@ proc submit_tasks {ntasks ntaskpn} {
 	sleep 2
 
 	set x 0
-	spawn $bin_bash -c "$srun -N$num_nodes -n$ntasks --ntasks-per-node=$ntaskpn -w$nodelist --exclusive $bin_printenv SLURMD_NODENAME | sort -n | uniq -c"
+	spawn $bin_bash -c "$srun -N$num_nodes -n$ntasks --ntasks-per-node=$ntaskpn -w$nodelist --exclusive $bin_printenv SLURMD_NODENAME | sort -V | uniq -c"
 	expect {
 		-re "($number) ($alpha_numeric_nodelist)" {
 			set tasks($x) $expect_out(1,string)
-- 
GitLab