git: 3136ff55276a - stable/14 - tests/inotify: Make an error message more useful

Mark Johnston <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a7353e5.4602f.18294db7__34481.1821983726$1785943320$gmane$org@gitrepo.freebsd.org>
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=3136ff55276a7c109066112ab9df6cbd5d00bf13

commit 3136ff55276a7c109066112ab9df6cbd5d00bf13
Author:     Mark Johnston <[email protected]>
AuthorDate: 2026-07-08 17:09:42 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2026-08-05 15:15:16 +0000

    tests/inotify: Make an error message more useful
    
    MFC after:      3 days
    
    (cherry picked from commit 836a76ad95be2fcf2cd116d754c5888a731d57aa)
---
 tests/sys/kern/inotify_test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/sys/kern/inotify_test.c b/tests/sys/kern/inotify_test.c
index bf0af87f0a0c..f16e9aa2abae 100644
--- a/tests/sys/kern/inotify_test.c
+++ b/tests/sys/kern/inotify_test.c
@@ -95,7 +95,8 @@ consume_event_cookie(int ifd, int wd, unsigned int event, unsigned int flags,
 	ATF_REQUIRE(ev != NULL);
 
 	n = read(ifd, ev, evsz);
-	ATF_REQUIRE_MSG(n >= 0, "failed to read event %s", ev2name(event));
+	ATF_REQUIRE_MSG(n >= 0, "failed to read event %s: %s",
+	    ev2name(event), strerror(errno));
 	ATF_REQUIRE((size_t)n >= sizeof(*ev));
 	ATF_REQUIRE((size_t)n == sizeof(*ev) + ev->len);
 	ATF_REQUIRE((size_t)n == evsz);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.