]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/commitdiff
QNX: Fix multi_process.sh for < 10 processes
authorvwan@ti.com <vwan@ti.com>
Fri, 21 Jun 2013 22:28:13 +0000 (15:28 -0700)
committerChris Ring <cring@ti.com>
Tue, 25 Jun 2013 21:24:48 +0000 (14:24 -0700)
The slave side executables can only handle a maximum of 10 threads,
so the script did not work corrently when it inadvertently tried to
look for an 11th thread.

This addresses SDOCM00102067.

Signed-off-by: VW <vwan@ti.com>
qnx/src/tests/MessageQMulti/multi_process.sh

index b72f9734aa346d6b18b34e7759bab22280e23858..41244f10464797d39cfe124115f0587552114ed5 100644 (file)
@@ -3,13 +3,20 @@
 if [ $# -ne 2 ]
 then
     echo "Usage: multi_process <num_processes> <iterations_per_process>"
+    echo "Max # processes: 10"
+    exit
+fi
+
+if [ $1 -gt 10 ]
+then
+    echo "Number of processes cannot exceed 10."
     exit
 fi
 
 num=0; while [ $num -lt $1 ];  do
+    echo "MessageQMulti Test #" $num
+    # This calls MessageQMulti with One Thread, a process #, and
+    # number of iterations per thread.
+    MessageQMulti 1 $2 $num &
     ((num = $num + 1))
-       echo "MessageQMulti Test #" $num
-       # This calls MessageQMulti with One Thread, a process #, and
-       # number of iterations per thread.
-       MessageQMulti 1 $2 $num &
 done