git: 6b9f7133aba4 - main - libc: Add one more check in new fmemopen test
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 23 Oct 2024 17:31:16 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=6b9f7133aba44189d9625c352bc2c2a59baf18ef
commit 6b9f7133aba44189d9625c352bc2c2a59baf18ef
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-10-23 17:28:55 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-10-23 17:29:34 +0000
libc: Add one more check in new fmemopen test
Reported by: jrtc27
Fixes: 0953460ce149 ("libc: fix access mode tests in fmemopen(3)")
---
lib/libc/tests/stdio/fmemopen2_test.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/libc/tests/stdio/fmemopen2_test.c b/lib/libc/tests/stdio/fmemopen2_test.c
index 4a7242ee6b2f..a558ff3515e9 100644
--- a/lib/libc/tests/stdio/fmemopen2_test.c
+++ b/lib/libc/tests/stdio/fmemopen2_test.c
@@ -296,6 +296,7 @@ ATF_TC_BODY(test_rdonly_wronly, tc)
fclose(fp);
fp = fmemopen(buf_orig, sizeof(buf), "w");
+ ATF_REQUIRE(fp != NULL);
sz = fread(buf, sizeof(buf), 1, fp);
ATF_REQUIRE(sz == 0);
ATF_REQUIRE(errno == EBADF);