git: 7780766b403d - main - stress2: Do not exit the test program without clearing the trace flags Discussed with: kib
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 15 Sep 2025 08:53:53 UTC
The branch main has been updated by pho:
URL: https://cgit.FreeBSD.org/src/commit/?id=7780766b403dd00b04cc597b44b6358010986616
commit 7780766b403dd00b04cc597b44b6358010986616
Author: Peter Holm <pho@FreeBSD.org>
AuthorDate: 2025-09-15 08:48:01 +0000
Commit: Peter Holm <pho@FreeBSD.org>
CommitDate: 2025-09-15 08:48:01 +0000
stress2: Do not exit the test program without clearing the trace flags
Discussed with: kib
---
tools/test/stress2/misc/kevent10.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/test/stress2/misc/kevent10.sh b/tools/test/stress2/misc/kevent10.sh
index b7f74f487cec..cebbd040c37d 100755
--- a/tools/test/stress2/misc/kevent10.sh
+++ b/tools/test/stress2/misc/kevent10.sh
@@ -72,15 +72,15 @@ main(void)
struct kevent events;
char *fn = "/tmp/kevent10.trace";
- if (open(fn, O_RDWR | O_CREAT, 0666) == -1)
- err(1, "%s", fn);
+ if (open(fn, O_RDWR | O_CREAT | O_TRUNC, 0666) == -1)
+ err(1, "open(%s)", fn);
if (ktrace(fn, KTRFLAG_DESCEND | KTROP_SET, KTRFAC_GENIO, 0) == -1)
err(1, "ktrace");
memset(&changes, 0, sizeof(struct kevent));
memset(&events, 0, sizeof(struct kevent));
if (kevent(0, &changes, -1, &events, 1, 0) == -1)
- if (errno != EBADF)
- err(1, "kevent");
+ if (errno != EBADF && errno != EINVAL)
+ warn("kevent");
if (ktrace(fn, KTROP_CLEARFILE, KTRFAC_GENIO, 0) == -1)
err(1, "ktrace clear");