Module Name: src Committed By: pgoyette Date: Mon Feb 18 20:59:19 UTC 2013
Modified Files: src/tests/kernel: t_lockf.c Log Message: Check that we did get EDEADLK error, and fail immediately if we did not. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/kernel/t_lockf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/kernel/t_lockf.c diff -u src/tests/kernel/t_lockf.c:1.1 src/tests/kernel/t_lockf.c:1.2 --- src/tests/kernel/t_lockf.c:1.1 Wed Nov 7 14:00:38 2012 +++ src/tests/kernel/t_lockf.c Mon Feb 18 20:59:19 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: t_lockf.c,v 1.1 2012/11/07 14:00:38 pgoyette Exp $ */ +/* $NetBSD: t_lockf.c,v 1.2 2013/02/18 20:59:19 pgoyette Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -230,7 +230,7 @@ ATF_TC_BODY(deadlock, tc) sleep(1); /* give child time to grab its lock then block */ error = dolock(fd, F_LOCK, 1, 1); - ATF_CHECK_MSG(error != EDEADLK, "parent did not deadlock: %s", + ATF_REQUIRE_MSG(error == EDEADLK, "parent did not detect deadlock: %s", strerror(errno)); ret = kill(pid, SIGKILL); ATF_REQUIRE_MSG(ret != -1, "failed to kill child: %s", strerror(errno));