public inbox for bunsen@sourceware.org
 help / color / mirror / Atom feed
* Automake dist-check and log extraction: runtest --outdir
@ 2023-01-17 23:00 Arsen Arsenović
  2023-01-17 23:51 ` Frank Ch. Eigler
  0 siblings, 1 reply; 4+ messages in thread
From: Arsen Arsenović @ 2023-01-17 23:00 UTC (permalink / raw)
  To: bunsen, builder

[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]

Hi there,

The make_distcheck_test_suite_step uses a logfiles= keyword arg, which
in turn uses inotify (presumably) to watch a file for a logfile creatd
on it, and to collect info from it.

To my awareness, this has not failed Sourceware yet - however, it is a
fragile mechanism.

DejaGnu provides a way for the directory in which log and sum files are
stored to be altered, see --outdir in
https://www.gnu.org/software/dejagnu/manual/Invoking-runtest.html

This variable is modifiable both through flags passed to runtest and via
Tcl, see
https://gnu.org/s/dejagnu/manual/Command-line-option-variables.html

To test this, I made an adjustment to my ~/.dejagnurc, and ran the GNU
poke testsuite:

  $ cat ~/.dejagnurc 
  set outdir "/tmp/outtest"
  $ make -j17 distcheck
  ...

This, indeed, resulted in a poke.log and poke.sum in the /tmp/outtest
directory.

I believe we should replace the inotify-based mechanism with this method
of redirecting logs.

What do you think?  And, apologies about the lack of patch - I won't be
free for any involved effort at least until the weekend.

Thanks in advance, have a lovely night.
-- 
Arsen Arsenović

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 381 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Automake dist-check and log extraction: runtest --outdir
  2023-01-17 23:00 Automake dist-check and log extraction: runtest --outdir Arsen Arsenović
@ 2023-01-17 23:51 ` Frank Ch. Eigler
  2023-01-17 23:57   ` Arsen Arsenović
  0 siblings, 1 reply; 4+ messages in thread
From: Frank Ch. Eigler @ 2023-01-17 23:51 UTC (permalink / raw)
  To: Arsen Arsenović; +Cc: bunsen, builder

Hi -

> The make_distcheck_test_suite_step uses a logfiles= keyword arg, which
> in turn uses inotify (presumably) to watch a file for a logfile creatd
> on it, and to collect info from it.

buildbot buildbot_worker runprocess.py appears to use fstat
ctime/mtime/size polling to query in-progress files.

bunsen only collects final files.

> [...]
> DejaGnu provides a way for the directory in which log and sum files are
> stored to be altered, see --outdir in
> [...]
> This, indeed, resulted in a poke.log and poke.sum in the /tmp/outtest
> directory.
> I believe we should replace the inotify-based mechanism with this method
> of redirecting logs.

I'm afraid I don't quite understand how this should improve on
anything, even if buildbot-worker were to use inotify instead of fstat
polling.  It's just a different pathname for the files.

- FChE


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Automake dist-check and log extraction: runtest --outdir
  2023-01-17 23:51 ` Frank Ch. Eigler
@ 2023-01-17 23:57   ` Arsen Arsenović
  2023-01-18 15:01     ` Frank Ch. Eigler
  0 siblings, 1 reply; 4+ messages in thread
From: Arsen Arsenović @ 2023-01-17 23:57 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: bunsen, builder

[-- Attachment #1: Type: text/plain, Size: 1946 bytes --]


"Frank Ch. Eigler" <fche@redhat.com> writes:

> Hi -
>
>> The make_distcheck_test_suite_step uses a logfiles= keyword arg, which
>> in turn uses inotify (presumably) to watch a file for a logfile creatd
>> on it, and to collect info from it.
>
> buildbot buildbot_worker runprocess.py appears to use fstat
> ctime/mtime/size polling to query in-progress files.

Ah, okay.  I couldn't find where exactly it was implemented, so I took
that shot in the dark :)

> bunsen only collects final files.
>
>> [...]
>> DejaGnu provides a way for the directory in which log and sum files are
>> stored to be altered, see --outdir in
>> [...]
>> This, indeed, resulted in a poke.log and poke.sum in the /tmp/outtest
>> directory.
>> I believe we should replace the inotify-based mechanism with this method
>> of redirecting logs.
>
> I'm afraid I don't quite understand how this should improve on
> anything, even if buildbot-worker were to use inotify instead of fstat
> polling.  It's just a different pathname for the files.

Yes, but they could, as a result, land outside of distchecks rm -r
jurisdiction.

I didn't mean to emphasize the role of inotify at all, rather the role
of distchecks cleanup of the build directory, which acts as a limit on
the lifetime of the testsuite results file.

The builder could avoid testsuite files being deleted altogether by
specifying an outdir outside of distchecks temporary directory.

... but maybe I'm overthinking this.  The buildbot worker holds the file
open and just reads new data as it gets appended to the file, which
should be enough to keep the file alive after rm gets to it, so the only
edge case might be that distcheck could somehow conclude in less time
than the polling period, assuming that LoopingCall#start delays first
invocation, or otherwise that the log files might be created and cleaned
up inbetween poll intervals.
-- 
Arsen Arsenović

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 381 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Automake dist-check and log extraction: runtest --outdir
  2023-01-17 23:57   ` Arsen Arsenović
@ 2023-01-18 15:01     ` Frank Ch. Eigler
  0 siblings, 0 replies; 4+ messages in thread
From: Frank Ch. Eigler @ 2023-01-18 15:01 UTC (permalink / raw)
  To: Arsen Arsenović; +Cc: bunsen, builder

Hi -

> [...]
> I didn't mean to emphasize the role of inotify at all, rather the role
> of distchecks cleanup of the build directory, which acts as a limit on
> the lifetime of the testsuite results file.
> 
> The builder could avoid testsuite files being deleted altogether by
> specifying an outdir outside of distchecks temporary directory.

Ah yes, we have encountered this annoying behaviour before.  OK, so
those build jobs that run "make distcheck" in anger could use
"make distcheck RUNTESTFLAGS=--outdir=../foobar" to preserve
test results across the implicit "make distclean".

- FChE


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-18 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-17 23:00 Automake dist-check and log extraction: runtest --outdir Arsen Arsenović
2023-01-17 23:51 ` Frank Ch. Eigler
2023-01-17 23:57   ` Arsen Arsenović
2023-01-18 15:01     ` Frank Ch. Eigler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).