]>
Commit | Line | Data |
---|---|---|
6d2010ae A |
1 | #!/bin/sh |
2 | ||
3 | EXECUTABLES="exit.nodyld \ | |
4 | exit.nopie.dyld-but-no-Libsystem exit.pie.dyld-but-no-Libsystem \ | |
5 | exit.nopie.dyld-and-Libsystem exit.pie.dyld-and-Libsystem \ | |
6 | exit.nopie exit.pie" | |
7 | ||
8 | RUN=run | |
9 | PRODUCT=`sw_vers -productName` | |
10 | COUNT= | |
11 | ||
12 | case "$PRODUCT" in | |
13 | "iPhone OS") | |
14 | COUNT=1000 | |
15 | ;; | |
16 | *) | |
17 | COUNT=10000 | |
18 | ;; | |
19 | esac | |
20 | ||
fe8ab488 A |
21 | for i in ${EXECUTABLES}; do |
22 | echo "Running $i" | |
23 | for j in `jot $(sysctl -n hw.ncpu) 1`; do | |
24 | printf "\t%dx\t" $j | |
6d2010ae A |
25 | /usr/bin/time ./${RUN} $j $((${COUNT}/$j)) ./$i |
26 | if [ $? -ne 0 ]; then | |
27 | echo "Failed $i, exit status $?" | |
28 | exit 1 | |
29 | fi | |
30 | done | |
31 | done |