summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-05-14 09:25:25 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-05-14 09:52:02 -0500
commit05a8dca0d65f5826b01bd03efb9d86521f76d849 (patch)
treef8ce59d8c150689a50f4d2ada152cab5da6a3323
parentshell/shared: Add task get/set affinity (diff)
downloadrtems-schedsim-05a8dca0d65f5826b01bd03efb9d86521f76d849.tar.bz2
cpus4_exercise_affinity_api.scen: Scenario to exercise affinity
-rw-r--r--schedsim/shell/schedsim_smppriority_affinity/scenarios/cpus4_exercise_affinity_api.scen29
1 files changed, 29 insertions, 0 deletions
diff --git a/schedsim/shell/schedsim_smppriority_affinity/scenarios/cpus4_exercise_affinity_api.scen b/schedsim/shell/schedsim_smppriority_affinity/scenarios/cpus4_exercise_affinity_api.scen
new file mode 100644
index 0000000..d06ba2d
--- /dev/null
+++ b/schedsim/shell/schedsim_smppriority_affinity/scenarios/cpus4_exercise_affinity_api.scen
@@ -0,0 +1,29 @@
+#
+# Verify that affinity APIs work with the right values
+#
+rtems_init 4
+task_create smp1 3
+task_create smp2 6
+task_create smp3 7
+task_create smp4 8
+task_create smp5 10
+dispatch
+# GOAL: Tasks 0x0a010001 - 0x0a010004 as heir and executing
+# GOAL: on CPUs 1 - 4 respectively
+cpus
+
+# GOAL: These should work OK and change the affinity
+task_get_affinity smp5
+task_set_affinity smp5 0x01
+task_get_affinity smp5
+task_set_affinity smp5 0x02
+task_get_affinity smp5
+task_set_affinity smp5 0x04
+task_get_affinity smp5
+task_set_affinity smp5 0x08
+task_get_affinity smp5
+
+# GOAL This should fail.
+task_set_affinity smp5 0x10
+task_get_affinity smp5
+