diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/tests/filst/sc-bad-write.c | 2 | ||||
| -rw-r--r-- | src/tests/klaar/exec-corrupt.ck | 16 |
2 files changed, 16 insertions, 2 deletions
diff --git a/src/tests/filst/sc-bad-write.c b/src/tests/filst/sc-bad-write.c index 2280d92..55927e7 100644 --- a/src/tests/filst/sc-bad-write.c +++ b/src/tests/filst/sc-bad-write.c @@ -29,7 +29,7 @@ void test_main(void) unsigned page = (unsigned)pg_round_up(&global); // Reserve space for 3 parameters (write requires 4). - page -= sizeof(int) * 4; + page -= sizeof(int) * 3; asm volatile ( "movl %%esp, %%edi;" diff --git a/src/tests/klaar/exec-corrupt.ck b/src/tests/klaar/exec-corrupt.ck index d66eeee..e323b8d 100644 --- a/src/tests/klaar/exec-corrupt.ck +++ b/src/tests/klaar/exec-corrupt.ck @@ -2,7 +2,7 @@ use strict; use warnings; use tests::tests; -check_expected ([<<'EOF', <<'EOF', <<'EOF', <<'EOF']); +check_expected ([<<'EOF', <<'EOF', <<'EOF', <<'EOF', <<'EOF', <<'EOF']); (exec-corrupt) begin load: corrupt-elf: error loading executable (exec-corrupt) exec("corrupt-elf"): -1 @@ -28,4 +28,18 @@ corrupt-elf: exit(-1) (exec-corrupt) end exec-corrupt: exit(0) EOF +(exec-corrupt) begin +load: corrupt-elf: error loading executable +(exec-corrupt) exec("corrupt-elf"): -1 +(exec-corrupt) end +exec-corrupt: exit(0) +corrupt-elf: exit(-1) +EOF +(exec-corrupt) begin +load: corrupt-elf: error loading executable +(exec-corrupt) exec("corrupt-elf"): -1 +(exec-corrupt) end +corrupt-elf: exit(-1) +exec-corrupt: exit(0) +EOF pass; |
