summaryrefslogtreecommitdiff
path: root/src/cmd/tests/kernel/miscsyscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/tests/kernel/miscsyscall.c')
-rw-r--r--src/cmd/tests/kernel/miscsyscall.c6
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);