compiler/
kernel/
lib/
scripts/
seed/
sublime/
test/
acceptance/
boot/
bootstrap/
cycles/
dispatch/
loader/
mmio/
native/
packages/
pages/
runtime/
scheduling/
kernel/
machine.ras
274 B
run
1.3 KiB
shared/
slots/
smp/
support/
sync/
termination/
tests/
trap/
package-golden
1.6 KiB
run
3.1 KiB
runner.rad
10.5 KiB
vim/
.gitignore
336 B
.gitsigners
112 B
CONTRIBUTING
2.1 KiB
LICENSE
1.1 KiB
Makefile
9.2 KiB
README
2.5 KiB
STYLE
2.5 KiB
std.lib
1.5 KiB
std.lib.test
662 B
test/scheduling/run
raw
| 1 | #!/bin/sh |
| 2 | # Execute root handoff and successive user-space yields with the production packages. |
| 3 | set -eu |
| 4 | emulator=${RAD_EMULATOR:-emulator} |
| 5 | harts=${1:-1 2 8} |
| 6 | work=$(mktemp -d) |
| 7 | trap 'rm -rf "$work"' EXIT HUP INT TERM |
| 8 | cp kernel/kernel.rad "$work/kernel.rad" |
| 9 | printf '\nexport mod dispatchcheck;\n' >> "$work/kernel.rad" |
| 10 | mkdir "$work/kernel" |
| 11 | cp kernel/kernel/*.rad "$work/kernel/" |
| 12 | cp test/scheduling/kernel/dispatchcheck.rad "$work/kernel/" |
| 13 | sed -i '/let cause = trap::classify(frame.cause);/a\ super::dispatchcheck::observe(frame);' "$work/kernel/boot.rad" |
| 14 | sh test/acceptance/compile "$emulator" "$work" |
| 15 | cat test/scheduling/machine.ras kernel/kernel/*.ras > "$work/scheduling.ras" |
| 16 | "$emulator" -memory-size=385024 -data-size=348160 -stack-size=1024 -run bin/kernel.build.rv64 \ |
| 17 | -- "$work/std.ril" "$work/kernel.ril" "$work/scheduling.ras" "$work/scheduling.rv64" bin/root.ril bin/scheduler.ril |
| 18 | for count in $harts; do |
| 19 | if [ "${KERNEL_REPLAY:-0}" = 1 ]; then |
| 20 | sh test/acceptance/replay scheduling "$emulator" "$work/scheduling.rv64" "$count" |
| 21 | else |
| 22 | "$emulator" -machine -harts="$count" -memory-size=262144 -max-steps=2000000000 -run "$work/scheduling.rv64" |
| 23 | fi |
| 24 | printf 'scheduling: %s-hart root handoff, four user-space yields, and checked shutdown passed\n' "$count" |
| 25 | done |