From cda174afc8e1bf6b779726965f5eaa030d80b1dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Str=C3=B6mb=C3=A4ck?= Date: Thu, 11 Jun 2020 15:19:17 +0200 Subject: The klaar/pfs test now properly detects crashes better. Previously, if the create() call would incorrectly kill the pfs process, the test would still succeed as exit codes were not verified, and there were no other way of identifying successful completion. --- src/tests/klaar/pfs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/tests/klaar/pfs.c') diff --git a/src/tests/klaar/pfs.c b/src/tests/klaar/pfs.c index fe1c3d7..9075ba5 100644 --- a/src/tests/klaar/pfs.c +++ b/src/tests/klaar/pfs.c @@ -59,7 +59,7 @@ static void start_rw(int rn, int wn) CHECK( wait( wpid ) != -1, "wait pfs-writer %d", wpid); } -int main (int argc, char *argv[]) +int main (int argc, char *argv[]) { if ( argc != 3 ) fail("usage: pfs START END"); @@ -79,5 +79,9 @@ int main (int argc, char *argv[]) start_rw(num_reader, num_writer); msg ("end"); + + // Tell the system we're entirely done. Otherwise the test accepts + // that this process is killed for some reason (e.g. invalid syscall). + printf("pfs done\n"); return 0; } -- cgit v1.2.1