aboutsummaryrefslogtreecommitdiffstats
path: root/roms/skiboot/external/gard/test/tests/11-clear-first
blob: c59fcc8f096910cf82aa2fde890d35540581b968 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

set -e

DATA=$(mktemp)

cleanup() {
	rm -f $DATA
}

trap cleanup EXIT

dd if=/dev/zero of=$DATA bs=$((0x1000)) count=5 2>/dev/null

run_binary "./opal-gard" "-p -e -f $DATA clear all"
run_binary "./opal-gard" "-p -e -f $DATA create /sys0/node0/proc0"
run_binary "./opal-gard" "-p -e -f $DATA create /sys0/node0/proc1"
run_binary "./opal-gard" "-p -e -f $DATA list"
run_binary "./opal-gard" "-p -e -f $DATA clear 00000001"
run_binary "./opal-gard" "-p -e -f $DATA list"
run_binary "./opal-gard" "-p -e -f $DATA clear 00000002"
run_binary "./opal-gard" "-p -e -f $DATA list"

diff_with_result

pass_test