9os

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 039f48747a7d413df11591fd0c46e0c1ccb03cb3
parent b2efb08c25d882be14965ec887f189be21f9b9e5
Author: Roberto Vargas <roberto.vargas@arm.com>
Date:   Fri, 23 Nov 2018 09:12:06 +0000

[unit/test004] Check that rcode was actually halted.

Change-Id: I8e677e4026d6cb53ce76a790a16d584b7f45e614

Diffstat:
Mtarget/hosted/arch.c | 2++
Mtest/unit/004/test.c | 5++++-
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/target/hosted/arch.c b/target/hosted/arch.c @@ -10,6 +10,7 @@ jmp_buf recover; noreturn void abort(void); noreturn void longjmp(jmp_buf env, int val); struct trapframe *(*getframe)(void); +int halted; struct bssmap * bss(void) @@ -22,6 +23,7 @@ bss(void) void dohalt(void) { + halted = 1; abort(); } diff --git a/test/unit/004/test.c b/test/unit/004/test.c @@ -5,7 +5,10 @@ void cleanup(int signum) { - _Exit(0); + extern int halted; + + if (halted) + exit(0); } static struct trapframe *