From 8cda7ecb6853bbab780060776fa83e901f2da43f Mon Sep 17 00:00:00 2001 From: claudio <> Date: Tue, 31 Oct 2023 07:59:52 +0000 Subject: unlink("/") just needs to error. Checking for a specific errno makes little sense here since there are multiple possible errnos that could be returned. On OpenBSD this returns EISDIR and not EBUSY. OK mbuhl@ millert@ --- src/regress/lib/libc/sys/t_unlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/regress/lib/libc/sys/t_unlink.c b/src/regress/lib/libc/sys/t_unlink.c index 2b1170ead7..be1529b6ad 100644 --- a/src/regress/lib/libc/sys/t_unlink.c +++ b/src/regress/lib/libc/sys/t_unlink.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t_unlink.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */ +/* $OpenBSD: t_unlink.c,v 1.3 2023/10/31 07:59:52 claudio Exp $ */ /* $NetBSD: t_unlink.c,v 1.4 2017/01/14 20:55:26 christos Exp $ */ /*- @@ -86,7 +86,7 @@ ATF_TC_BODY(unlink_err, tc) (void)memset(buf, 'x', sizeof(buf)); errno = 0; - ATF_REQUIRE_ERRNO(EBUSY, unlink("/") == -1); + ATF_REQUIRE(unlink("/") == -1); errno = 0; ATF_REQUIRE_ERRNO(ENAMETOOLONG, unlink(buf) == -1); -- cgit v1.2.3-55-g6feb