git: 92ae96d9f38a - stable/15 - tests/inotify: Make an error message more useful

Mark Johnston <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a67ae26.36b69.68a21610__35693.3810327732$1785179703$gmane$org@gitrepo.freebsd.org>
The branch stable/15 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=92ae96d9f38a6a2a9e80d388831a831083873752

commit 92ae96d9f38a6a2a9e80d388831a831083873752
Author:     Mark Johnston <[email protected]>
AuthorDate: 2026-07-08 17:09:42 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2026-07-27 17:34:31 +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 9d5265e71f95..0c2cc260f29e 100644
--- a/tests/sys/kern/inotify_test.c
+++ b/tests/sys/kern/inotify_test.c
@@ -96,7 +96,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.