From 4ade8ff9e6c4185ebe45ecfe183668f28e1525b7 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 16 Sep 2023 20:48:28 +0200 Subject: kernel/amd64: add HPET support, slightly rework time handling --- src/cmd/tests/kernel/miscsyscall.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/cmd/tests/kernel/miscsyscall.c') diff --git a/src/cmd/tests/kernel/miscsyscall.c b/src/cmd/tests/kernel/miscsyscall.c index 0518654..7c61392 100644 --- a/src/cmd/tests/kernel/miscsyscall.c +++ b/src/cmd/tests/kernel/miscsyscall.c @@ -271,7 +271,11 @@ static void test_sleep(void) { long ret = _sys_read(reader, buf, sizeof buf, 0); if (ret == 0) break; test(pos + ret <= target); - test(memcmp(buf, expected + pos, ret) == 0); + if (memcmp(buf, expected + pos, ret) != 0) { + buf[ret] = '\0'; + printf("got %s\n", buf); + test(0); + } pos += ret; } test(pos == target); -- cgit v1.2.3