From: claudio Date: Tue, 31 Oct 2023 07:59:52 +0000 (+0000) Subject: unlink("/") just needs to error. Checking for a specific errno makes X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e5babc7b13e331b3398c63151ea17c2fd6b357e1;p=openbsd 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@ --- 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);