* [PATCH] test/triggers: ensure bogus-ioctl has a reasonable fd limit
@ 2024-07-31 15:03 Kris Van Hees
2024-07-31 15:12 ` [DTrace-devel] " Nick Alcock
0 siblings, 1 reply; 3+ messages in thread
From: Kris Van Hees @ 2024-07-31 15:03 UTC (permalink / raw)
To: dtrace, dtrace-devel
The bogus-ioctl trigger has a loop to close all possible fds, and it
was limit by rlim_max. On some systems, that was such a high limit
that the loop was taking too long, causing tests to time out. Set
the limit to 1024, so that the loop will end in reasonable time.
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
---
test/triggers/bogus-ioctl.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/test/triggers/bogus-ioctl.c b/test/triggers/bogus-ioctl.c
index 25933229..f1546445 100644
--- a/test/triggers/bogus-ioctl.c
+++ b/test/triggers/bogus-ioctl.c
@@ -38,7 +38,10 @@ main(void)
sigaction(SIGUSR1, &act, NULL);
getrlimit(RLIMIT_NOFILE, &rl);
- for (i = 0; i < rl.rlim_max; i++)
+ rl.rlim_cur = 1024;
+ setrlimit(RLIMIT_NOFILE, &rl);
+ getrlimit(RLIMIT_NOFILE, &rl);
+ for (i = 0; i < rl.rlim_cur; i++)
close(i);
n = 0;
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [DTrace-devel] [PATCH] test/triggers: ensure bogus-ioctl has a reasonable fd limit
2024-07-31 15:03 [PATCH] test/triggers: ensure bogus-ioctl has a reasonable fd limit Kris Van Hees
@ 2024-07-31 15:12 ` Nick Alcock
2024-07-31 15:19 ` Nick Alcock
0 siblings, 1 reply; 3+ messages in thread
From: Nick Alcock @ 2024-07-31 15:12 UTC (permalink / raw)
To: Kris Van Hees via DTrace-devel; +Cc: dtrace, Kris Van Hees
On 31 Jul 2024, Kris Van Hees via DTrace-devel spake thusly:
> The bogus-ioctl trigger has a loop to close all possible fds, and it
> was limit by rlim_max. On some systems, that was such a high limit
> that the loop was taking too long, causing tests to time out. Set
> the limit to 1024, so that the loop will end in reasonable time.
Boggle. I guess this has grown a lot with time :)
> Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
(in practice, probably closing the first three would work almost all the
time. I can't imagine any shell weird enough to leave a thousand fds
open on entry!)
--
NULL && (void)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [DTrace-devel] [PATCH] test/triggers: ensure bogus-ioctl has a reasonable fd limit
2024-07-31 15:12 ` [DTrace-devel] " Nick Alcock
@ 2024-07-31 15:19 ` Nick Alcock
0 siblings, 0 replies; 3+ messages in thread
From: Nick Alcock @ 2024-07-31 15:19 UTC (permalink / raw)
To: Nick Alcock; +Cc: Kris Van Hees via DTrace-devel, dtrace, Kris Van Hees
On 31 Jul 2024, Nick Alcock uttered the following:
> On 31 Jul 2024, Kris Van Hees via DTrace-devel spake thusly:
>
>> The bogus-ioctl trigger has a loop to close all possible fds, and it
>> was limit by rlim_max. On some systems, that was such a high limit
>> that the loop was taking too long, causing tests to time out. Set
>> the limit to 1024, so that the loop will end in reasonable time.
>
> Boggle. I guess this has grown a lot with time :)
>
>> Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
>
> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Er, I mean
Reviewed-by: Nick Alcock <nick.alcock@oracle.com> of course.
The heat is clearly destroying my mind...
--
NULL && (void)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-31 15:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-31 15:03 [PATCH] test/triggers: ensure bogus-ioctl has a reasonable fd limit Kris Van Hees
2024-07-31 15:12 ` [DTrace-devel] " Nick Alcock
2024-07-31 15:19 ` Nick Alcock
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox