summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclaudio <>2023-10-31 07:59:52 +0000
committerclaudio <>2023-10-31 07:59:52 +0000
commit556460865148c7ddf4ec7a2e2e30140d4b711200 (patch)
treedfb205c04f0e5fbe8c48ddcf625c76f792833deb
parent58115f97acec371c97629d89b1aaea65877cbb49 (diff)
downloadopenbsd-556460865148c7ddf4ec7a2e2e30140d4b711200.tar.gz
openbsd-556460865148c7ddf4ec7a2e2e30140d4b711200.tar.bz2
openbsd-556460865148c7ddf4ec7a2e2e30140d4b711200.zip
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@
Diffstat (limited to '')
-rw-r--r--src/regress/lib/libc/sys/t_unlink.c4
1 files changed, 2 insertions, 2 deletions
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 @@
1/* $OpenBSD: t_unlink.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */ 1/* $OpenBSD: t_unlink.c,v 1.3 2023/10/31 07:59:52 claudio Exp $ */
2/* $NetBSD: t_unlink.c,v 1.4 2017/01/14 20:55:26 christos Exp $ */ 2/* $NetBSD: t_unlink.c,v 1.4 2017/01/14 20:55:26 christos Exp $ */
3 3
4/*- 4/*-
@@ -86,7 +86,7 @@ ATF_TC_BODY(unlink_err, tc)
86 (void)memset(buf, 'x', sizeof(buf)); 86 (void)memset(buf, 'x', sizeof(buf));
87 87
88 errno = 0; 88 errno = 0;
89 ATF_REQUIRE_ERRNO(EBUSY, unlink("/") == -1); 89 ATF_REQUIRE(unlink("/") == -1);
90 90
91 errno = 0; 91 errno = 0;
92 ATF_REQUIRE_ERRNO(ENAMETOOLONG, unlink(buf) == -1); 92 ATF_REQUIRE_ERRNO(ENAMETOOLONG, unlink(buf) == -1);