|
56 | 56 | echo > $i/kvm-test-1-run-qemu.sh.out
|
57 | 57 | export TORTURE_AFFINITY=
|
58 | 58 | kvm-get-cpus-script.sh $T/cpuarray.awk $T/cpubatches.awk $T/cpustate
|
59 |
| - cat << ' ___EOF___' >> $T/cpubatches.awk |
60 |
| - END { |
61 |
| - affinitylist = ""; |
62 |
| - if (!gotcpus()) { |
63 |
| - print "echo No CPU-affinity information, so no taskset command."; |
64 |
| - } else if (cpu_count !~ /^[0-9][0-9]*$/) { |
65 |
| - print "echo " scenario ": Bogus number of CPUs (old qemu-cmd?), so no taskset command."; |
66 |
| - } else { |
67 |
| - affinitylist = nextcpus(cpu_count); |
68 |
| - if (!(affinitylist ~ /^[0-9,-][0-9,-]*$/)) |
69 |
| - print "echo " scenario ": Bogus CPU-affinity information, so no taskset command."; |
70 |
| - else if (!dumpcpustate()) |
71 |
| - print "echo " scenario ": Could not dump state, so no taskset command."; |
72 |
| - else |
73 |
| - print "export TORTURE_AFFINITY=" affinitylist; |
| 59 | + if test -z "${TORTURE_NO_AFFINITY}" |
| 60 | + then |
| 61 | + cat << ' ___EOF___' >> $T/cpubatches.awk |
| 62 | + END { |
| 63 | + affinitylist = ""; |
| 64 | + if (!gotcpus()) { |
| 65 | + print "echo No CPU-affinity information, so no taskset command."; |
| 66 | + } else if (cpu_count !~ /^[0-9][0-9]*$/) { |
| 67 | + print "echo " scenario ": Bogus number of CPUs (old qemu-cmd?), so no taskset command."; |
| 68 | + } else { |
| 69 | + affinitylist = nextcpus(cpu_count); |
| 70 | + if (!(affinitylist ~ /^[0-9,-][0-9,-]*$/)) |
| 71 | + print "echo " scenario ": Bogus CPU-affinity information, so no taskset command."; |
| 72 | + else if (!dumpcpustate()) |
| 73 | + print "echo " scenario ": Could not dump state, so no taskset command."; |
| 74 | + else |
| 75 | + print "export TORTURE_AFFINITY=" affinitylist; |
| 76 | + } |
74 | 77 | }
|
75 |
| - } |
76 |
| - ___EOF___ |
77 |
| - cpu_count="`grep '# TORTURE_CPU_COUNT=' $i/qemu-cmd | sed -e 's/^.*=//'`" |
78 |
| - affinity_export="`awk -f $T/cpubatches.awk -v cpu_count="$cpu_count" -v scenario=$i < /dev/null`" |
79 |
| - $affinity_export |
| 78 | + ___EOF___ |
| 79 | + cpu_count="`grep '# TORTURE_CPU_COUNT=' $i/qemu-cmd | sed -e 's/^.*=//'`" |
| 80 | + affinity_export="`awk -f $T/cpubatches.awk -v cpu_count="$cpu_count" -v scenario=$i < /dev/null`" |
| 81 | + $affinity_export |
| 82 | + fi |
80 | 83 | kvm-test-1-run-qemu.sh $i >> $i/kvm-test-1-run-qemu.sh.out 2>&1 &
|
81 | 84 | done
|
82 | 85 | for i in $runfiles
|
|
0 commit comments