libc: Add one more check in new fmemopen test

Reported by:	jrtc27
Fixes: 0953460ce1 ("libc: fix access mode tests in fmemopen(3)")
This commit is contained in:
Ed Maste 2024-10-23 13:28:55 -04:00
parent 0953460ce1
commit 6b9f7133ab

View file

@ -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);