aboutsummaryrefslogtreecommitdiff
path: root/tests/testlib.c
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2024-03-27 19:18:35 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-03-27 19:52:28 +0100
commitb5a1c677cae00261962ccfc31f33bc826539fc23 (patch)
treeb853766e6824efb069f1cefa710a89deba2aa0be /tests/testlib.c
parent62e3c40ebb090e24c70a38c13957f5a02857383e (diff)
downloadgnumach-b5a1c677cae00261962ccfc31f33bc826539fc23.tar.gz
gnumach-b5a1c677cae00261962ccfc31f33bc826539fc23.tar.bz2
gnumach-b5a1c677cae00261962ccfc31f33bc826539fc23.zip
tests: Fix halt()
Mark it as noreturn, and make sure to halt, not reboot. Message-ID: <20240327161841.95685-12-bugaevc@gmail.com>
Diffstat (limited to 'tests/testlib.c')
-rw-r--r--tests/testlib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/testlib.c b/tests/testlib.c
index 2eaeb591..d2198830 100644
--- a/tests/testlib.c
+++ b/tests/testlib.c
@@ -23,6 +23,7 @@
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/vm_param.h>
+#include <sys/reboot.h>
#include <mach.user.h>
#include <mach_host.user.h>
@@ -55,7 +56,7 @@ mach_port_t device_priv(void)
void halt()
{
- int ret = host_reboot(host_priv_port, 0);
+ int ret = host_reboot(host_priv_port, RB_HALT);
ASSERT_RET(ret, "host_reboot() failed!");
while (1)
;