summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2023-10-31 07:59:53 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2023-10-31 07:59:53 +0000
commit43e4dc2a5db3e96b21f7dcaff8d4cd7357f92670 (patch)
treeddc24229b7bf539e4d03deabef3340fbce362800
parentaa4d8d8efaf24a17ae79a4dcd5db09fc6bc6ff15 (diff)
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@
-rw-r--r--regress/lib/libc/sys/t_unlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regress/lib/libc/sys/t_unlink.c b/regress/lib/libc/sys/t_unlink.c
index 2b1170ead7d..be1529b6ad9 100644
--- a/regress/lib/libc/sys/t_unlink.c
+++ b/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);