forked from freebsd/freebsd-src
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Despite looking trivial, it requires proper split of exports from libsys and libc, proper filtering work in rtld, and operational libsys. Reviewed by: emaste, imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44075
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/*- | ||
* Copyright (c) 2024 The FreeBSD Foundation | ||
* | ||
* SPDX-License-Identifier: BSD-2-Clause | ||
* | ||
* This software were developed by Konstantin Belousov <kib@FreeBSD.org> | ||
* under sponsorship from the FreeBSD Foundation. | ||
*/ | ||
|
||
#include <errno.h> | ||
#include <unistd.h> | ||
|
||
#include <atf-c.h> | ||
|
||
ATF_TC(errno_basic); | ||
ATF_TC_HEAD(errno_basic, tc) | ||
{ | ||
atf_tc_set_md_var(tc, "descr", | ||
"Verify basic functionality of errno"); | ||
} | ||
|
||
ATF_TC_BODY(errno_basic, tc) | ||
{ | ||
int res; | ||
|
||
res = unlink("/non/existent/file"); | ||
ATF_REQUIRE(res == -1); | ||
ATF_REQUIRE(errno == ENOENT); | ||
} | ||
|
||
ATF_TP_ADD_TCS(tp) | ||
{ | ||
ATF_TP_ADD_TC(tp, errno_basic); | ||
|
||
return (atf_no_error()); | ||
} |