]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/commitdiff
General cleanup in fault test
authorRobert Tivy <rtivy@ti.com>
Fri, 8 May 2015 00:08:21 +0000 (17:08 -0700)
committerRobert Tivy <rtivy@ti.com>
Fri, 8 May 2015 00:15:02 +0000 (17:15 -0700)
linux/src/tests/fault.c
packages/ti/ipc/tests/fault.c

index 1c97c26617e8665bd211ed292a37ccc33c0f8d0e..a13d89e20a3bfd25cfaeede14af6a7ee14ffd494 100644 (file)
@@ -244,16 +244,16 @@ int main (int argc, char ** argv)
         goto exit;
     }
 
-    if ((procId == 0) || (procId >= MultiProc_getNumProcessors())) {
+    if ((procId == 0) || (procId >= (MultiProc_getBaseIdOfCluster() + MultiProc_getNumProcessors()))) {
         printf("ProcId (%d) must be nonzero and less than %d\n",
-                procId, MultiProc_getNumProcessors());
+                procId, MultiProc_getBaseIdOfCluster() + MultiProc_getNumProcessors());
         Ipc_stop();
         exit(0);
     }
     printf("Using numLoops: %d; procId : %d\n", numLoops, procId);
 
     if (MessageQApp_execute(numLoops, procId, faultId) < 0) {
-        int nAttachAttempts = 0;
+        int nAttachAttempts = 1;
 
         printf("MessageQApp_execute failed, attempting detach/attach...\n");
         Ipc_detach(procId);
index 6e831ab56524c39ce7da2db188717ab0f31ce325..2f0cfd06a82132f30b1abb056db00a9d8188e50b 100644 (file)
@@ -74,11 +74,11 @@ Int32 fxnFault(UInt32 faultId)
             fxn();
             break;
         case 4:
-            System_printf("Generating exception (w/ divide-by-zero...\n");
+            System_printf("Generating exception (w/ divide-by-zero...)\n");
             dummy = dummy / dummy;
             break;
         case 5:
-            System_printf("Generating Watchdog interrupt...\n");
+            System_printf("Forcing Watchdog interrupt (w/ spin)...\n");
             dummy = 1;
             while(dummy);
             break;