diff options
author | dzwdz | 2023-09-16 20:48:28 +0200 |
---|---|---|
committer | dzwdz | 2023-09-17 17:13:50 +0200 |
commit | 4ade8ff9e6c4185ebe45ecfe183668f28e1525b7 (patch) | |
tree | 26fdfa0659f4a32fc3d187658c2d8d457b272578 /src/cmd | |
parent | 458978e7b8a6d50566fc8b68558f76f6b0465c52 (diff) |
kernel/amd64: add HPET support, slightly rework time handling
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/tests/kernel/miscsyscall.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); |