diff options
author | dzwdz | 2024-07-22 21:48:03 +0200 |
---|---|---|
committer | dzwdz | 2024-07-22 21:48:03 +0200 |
commit | a6fabfb78e70b8096a8bf336aa64a3358a2f5eca (patch) | |
tree | efd544588d4de22dd59bf006217beddf5381ad62 /src/cmd/tests/tests.c | |
parent | 2be2236e99e5aed779b820b540d72dffb47da406 (diff) |
tests: check if SSE registers are preserved on context switches
Diffstat (limited to 'src/cmd/tests/tests.c')
-rw-r--r-- | src/cmd/tests/tests.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/cmd/tests/tests.c b/src/cmd/tests/tests.c index 2b66b43..debd095 100644 --- a/src/cmd/tests/tests.c +++ b/src/cmd/tests/tests.c @@ -21,7 +21,7 @@ void run_test_inner(void (*fn)(), const char *s) { if (waitpid(pid, &status, 0) != pid) { test_failf("%s", "waitpid returned something weird"); } else if (WEXITSTATUS(status) != 0) { - test_failf("%s exited with %d", s, WEXITSTATUS(status)); + test_failf("%s exited with %d, pid %d", s, WEXITSTATUS(status), pid); } } } @@ -62,13 +62,15 @@ int main(void) { r_s_ringbuf(); exit(0); } else { - for (;;) { + for (int i = 0; ; i++) { char buf[128]; long ret = _sys_read(reader, buf, sizeof buf, 0); if (ret < 0) break; - printf("\033[31mFAIL\033[0m "); - fwrite(buf, ret, 1, stdout); - printf("\n"); + printf("\033[31mFAIL\033[0m %3d %.*s\n", i, (int)ret, buf); + if (i == 100) { + printf("quitting due to too many errors\n"); + break; + } } } return 0; |