summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-04-12 23:27:51 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-04-12 23:27:51 -0400
commit269025c216e4245f2b10927630130db89fddf4c8 (patch)
tree49f513db666af952d38cdfda6d7ae2c6de6f4f82
parent4538f7e4fcaa3bf199377b9b735562e53cd1c7d3 (diff)
Add various test scripts
- also useful for normal debugging, not just PM
-rw-r--r--scripts/README24
-rwxr-xr-xscripts/pm_test_script79
-rwxr-xr-xscripts/pm_test_single_taskset12
-rwxr-xr-xscripts/pm_test_single_taskset_mtimes_long8
-rwxr-xr-xscripts/pm_test_single_taskset_mtimes_short8
-rwxr-xr-xscripts/test_find15
-rw-r--r--scripts/test_get_arrays.py26
-rw-r--r--scripts/uni1_050_0.ts50
-rw-r--r--scripts/uni1_050_0.ts-psn-edf50
9 files changed, 272 insertions, 0 deletions
diff --git a/scripts/README b/scripts/README
new file mode 100644
index 0000000..915df06
--- /dev/null
+++ b/scripts/README
@@ -0,0 +1,24 @@
1This directory contains some scripts used for bug hunting, general testing
2of Litmus and LibLitmus, Preemption and Migration overhead measurements etc.
3
4When you add a script, please also add a brief description of the script here.
5
6pm_test_script:
7 main preemption and migration testing script; can iterate on
8 multiple WSS and multiple plugins. Some assumtion on filenames and
9 taskset filenames are made. More information direcly in the script.
10
11pm_test_single_taskset*:
12 preemption and migration test scripts. Mainly for debugging / bug hunting
13
14test_find:
15 test script which spawns "find" tasks (which suspend frequently).
16 Mainly for debugging / bug hunting
17
18uni1_050_0.ts:
19 taskset used by pm_test_single_taskset* and test_find (this ts is one of the
20 smallest ts used by John and Bjoern for preemption and migration evaluation
21 on Niagara
22
23test_get_arrays.py:
24 simple python test to verify C to Python PM interface
diff --git a/scripts/pm_test_script b/scripts/pm_test_script
new file mode 100755
index 0000000..c76947b
--- /dev/null
+++ b/scripts/pm_test_script
@@ -0,0 +1,79 @@
1#!/bin/bash
2#
3# pm_test_script:
4# Batch script for running (all?) pm benchmarking experiments.
5# Run it as root!
6#
7# Original script by John Calandrino 2008
8# Changes by Andrea Bastoni 2010
9#
10# Distribution A can be in "PFAIR" "GSN-EDF" "C-EDF" "PSN-EDF";
11
12launchpolluter()
13{
14 NCPU=`cat /sys/devices/system/cpu/present | cut -d - -f 2`
15
16 for i in `seq 0 $NCPU`;
17 do
18 taskset -pc $i ./pm_polluter &
19 done
20}
21
22run_taskset()
23{
24 rm -f curr_taskset
25 cat $1 | sed "s/task //" | sed "s/\#.*//" | sed "/^$/d" >> curr_taskset
26 # Read task set from some source and start all tasks.
27 TASK=0
28 while read inputline;
29 do
30 e=`echo $inputline | awk -F' ' '{print $1}'`
31 p=`echo $inputline | awk -F' ' '{print $2}'`
32 ./rt_launch -w $e $p ./pm_task "./$2/res_plugin=`expr $A`_wss=`expr $W`_tss=`expr $X`_`expr $Y`_`expr $TASK`.raw"
33 TASK=`expr $TASK + 1`
34 done < ./curr_taskset
35 echo "($A, $W, $X, $Y)"
36 # try to see if this solves the problem of the task which is not released at every run
37 # speculation: not properly set up when release put it in the queue
38 sleep 5
39 ./release_ts -d 3000
40 # launchpolluter
41 # Sleep for 150 seconds. This includes ~60 seconds
42 # of run time followed by 90 seconds of "tear down" time. (to save files)
43 # NOTE: may need to sleep longer than this...
44 sleep 150
45 sync
46 # killall pm_be_polluter
47 # sleep 2
48 killall pm_task
49 sleep 1
50 killall rt_launch
51}
52
53for A in "GSN-EDF";
54do
55 echo "Setting plugin $A..."
56 ./setsched $A
57 sleep 1
58
59 for W in 1024;
60 do
61 echo "Experiments for WSS of `expr $W`KB"
62 scons ARCH=x86_64 WSS=$W
63 sleep 1
64
65 SET1=$(echo `seq 10 10 40`)
66 SET2=$(echo `seq 50 25 125`)
67 SET3=$(echo `seq 150 50 250`)
68 for X in $SET1 $SET2 $SET3; # Number of tasks
69 do
70 for Y in `seq 0 9`; # Taskset number
71 do
72 run_taskset "`expr ../$A`-ts/ts-uni_light-`expr $X`-`expr $Y`.ts" "pm_raw_results"
73 done
74 done
75 done
76 DATE=`date +%Y%m%d-%H%M`
77 mkdir pm_raw_results/$DATE
78 mv pm_raw_results/*.raw pm_raw_results/$DATE
79done
diff --git a/scripts/pm_test_single_taskset b/scripts/pm_test_single_taskset
new file mode 100755
index 0000000..232dc3b
--- /dev/null
+++ b/scripts/pm_test_single_taskset
@@ -0,0 +1,12 @@
1#!/bin/bash
2rm -f res-*.bin
3TASK=0
4while read inputline;
5do
6 e=`echo $inputline | awk -F' ' '{print $1}'`
7 p=`echo $inputline | awk -F' ' '{print $2}'`
8 c=`echo $inputline | awk -F' ' '{print $3}'`
9 ./rt_launch -w $e $p -p $c ./pm_task ./res-$TASK.bin
10 TASK=`expr $TASK + 1`
11done < uni1_050_0.ts
12./release_ts -d 5000
diff --git a/scripts/pm_test_single_taskset_mtimes_long b/scripts/pm_test_single_taskset_mtimes_long
new file mode 100755
index 0000000..1b8100d
--- /dev/null
+++ b/scripts/pm_test_single_taskset_mtimes_long
@@ -0,0 +1,8 @@
1#!/bin/bash
2for i in `seq 0 200` ; do
3 echo -n "$i) ";
4 ./test_single_taskset ;
5 sleep 100;
6 cat res-*.bin >> result-all-$i.bin
7done
8
diff --git a/scripts/pm_test_single_taskset_mtimes_short b/scripts/pm_test_single_taskset_mtimes_short
new file mode 100755
index 0000000..0ae2093
--- /dev/null
+++ b/scripts/pm_test_single_taskset_mtimes_short
@@ -0,0 +1,8 @@
1#!/bin/bash
2for i in `seq 0 100` ; do
3 echo -n "$i) ";
4 ./test_single_taskset ;
5 sleep 20;
6 cat res-*.bin >> result-all-$i.bin
7done
8
diff --git a/scripts/test_find b/scripts/test_find
new file mode 100755
index 0000000..003cbb4
--- /dev/null
+++ b/scripts/test_find
@@ -0,0 +1,15 @@
1#!/bin/bash
2#
3# test_find: stress test with lot of suspending tasks
4# main purpose: bug hunting
5
6TASK=0
7while read inputline;
8do
9 e=`echo $inputline | awk -F' ' '{print $1}'`
10 p=`echo $inputline | awk -F' ' '{print $2}'`
11 c=`echo $inputline | awk -F' ' '{print $3}'`
12 ./rt_launch -w $e $p -p $c find /
13 TASK=`expr $TASK + 1`
14done < uni1_050_0.ts-psn-edf
15./release_ts -d 5000
diff --git a/scripts/test_get_arrays.py b/scripts/test_get_arrays.py
new file mode 100644
index 0000000..cfe9fa7
--- /dev/null
+++ b/scripts/test_get_arrays.py
@@ -0,0 +1,26 @@
1#!/usr/bin/python
2#
3# test_get_arrays: test program to verify and test C to Python pm interface
4#
5# recall: PYTHONPATH=".." python test_get_arrays.py :)
6#
7import sys, pm
8
9args = sys.argv[1:]
10if len(args) != 1:
11 print "Filename required"
12 sys.exit(-1)
13
14pm.load(args[0],0,4)
15x = pm.getPreemption()
16y = pm.getOnChipMigration()
17z = pm.getL2Migration()
18w = pm.getOffChipMigration()
19print "preemption: "
20print x
21print "samechip:"
22print y
23print "l2:"
24print z
25print "offchip"
26print w
diff --git a/scripts/uni1_050_0.ts b/scripts/uni1_050_0.ts
new file mode 100644
index 0000000..b6768d8
--- /dev/null
+++ b/scripts/uni1_050_0.ts
@@ -0,0 +1,50 @@
17 75 0
22 34 0
31 78 0
47 86 0
51 22 0
61 12 0
73 63 0
84 37 0
98 89 0
104 58 0
111 50 0
126 52 0
134 68 0
143 80 0
154 49 0
161 30 0
172 63 0
181 14 0
191 12 0
202 61 0
214 58 0
221 41 0
236 53 0
244 37 0
258 99 0
261 33 0
271 79 0
287 75 0
291 27 0
303 38 0
313 54 0
322 24 0
331 32 0
341 82 0
356 79 0
364 48 0
373 65 0
387 83 0
392 95 0
402 13 0
411 21 0
424 78 0
433 65 0
446 97 0
452 92 0
464 37 0
471 67 0
487 93 0
493 57 0
502 71 0
diff --git a/scripts/uni1_050_0.ts-psn-edf b/scripts/uni1_050_0.ts-psn-edf
new file mode 100644
index 0000000..d4bd8e0
--- /dev/null
+++ b/scripts/uni1_050_0.ts-psn-edf
@@ -0,0 +1,50 @@
17 75 0
22 34 1
31 78 2
47 86 3
51 22 4
61 12 5
73 63 6
84 37 7
98 89 0
104 58 1
111 50 2
126 52 3
134 68 4
143 80 5
154 49 6
161 30 7
172 63 0
181 14 1
191 12 2
202 61 3
214 58 4
221 41 5
236 53 6
244 37 7
258 99 0
261 33 1
271 79 2
287 75 3
291 27 4
303 38 5
313 54 6
322 24 7
331 32 0
341 82 1
356 79 2
364 48 3
373 65 4
387 83 5
392 95 6
402 13 7
411 21 0
424 78 1
433 65 2
446 97 3
452 92 4
464 37 5
471 67 6
487 93 7
493 57 0
502 71 1