<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/tools/test.py, branch devsnek-patch-1</title>
<subtitle>github.com: nodejs/node.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/'/>
<entry>
<title>test: add Actions annotation output</title>
<updated>2020-08-07T03:07:49+00:00</updated>
<author>
<name>Mary Marchini</name>
<email>mmarchini@netflix.com</email>
</author>
<published>2020-08-01T04:40:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=46bef7b7716b377055260490bb6f713ffb593672'/>
<id>46bef7b7716b377055260490bb6f713ffb593672</id>
<content type='text'>
It's possible to annotate failures in Actions by printing
"::error file={},line={},col={}::{message}". This methos is preferrable
over using a problem matcher because problem matchers only allow
single-line messages, whereas ::error allows multi-line messages.

PR-URL: https://github.com/nodejs/node/pull/34590
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's possible to annotate failures in Actions by printing
"::error file={},line={},col={}::{message}". This methos is preferrable
over using a problem matcher because problem matchers only allow
single-line messages, whereas ::error allows multi-line messages.

PR-URL: https://github.com/nodejs/node/pull/34590
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: decrease timeout in test.py</title>
<updated>2020-04-18T02:29:45+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2020-04-15T18:40:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=1ce906c16ba09885fb372962a3a56ce64ef06a20'/>
<id>1ce906c16ba09885fb372962a3a56ce64ef06a20</id>
<content type='text'>
This fixes the following crash on Windows for me. I don't know
why this I only started to see this now, but anyway, the new timeout
value is still longer than a week and a half.

    File "tools/test.py", line 1725, in &lt;module&gt;
        sys.exit(Main())
    File "tools/test.py", line 1701, in Main
        if RunTestCases(cases_to_run, options.progress, \
          options.j, options.flaky_tests):
    File "tools/test.py", line 923, in RunTestCases
        return progress.Run(tasks)
    File "tools/test.py", line 145, in Run
        thread.join(timeout=10000000)
    File "C:\Users\anna\AppData\Local\Programs\Python\Python38-32\ \
      lib\threading.py", line 1015, in join
        self._wait_for_tstate_lock(timeout=max(timeout, 0))
    File "C:\Users\anna\AppData\Local\Programs\Python\Python38-32\ \
      lib\threading.py", line 1027, in _wait_for_tstate_lock
        elif lock.acquire(block, timeout):
    OverflowError: timeout value is too large

PR-URL: https://github.com/nodejs/node/pull/32868
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Jeremiah Senkpiel &lt;fishrock123@rocketmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Zeyu Yang &lt;himself65@outlook.com&gt;

Reviewed-By: Bartosz Sosnowski &lt;bartosz@janeasystems.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes the following crash on Windows for me. I don't know
why this I only started to see this now, but anyway, the new timeout
value is still longer than a week and a half.

    File "tools/test.py", line 1725, in &lt;module&gt;
        sys.exit(Main())
    File "tools/test.py", line 1701, in Main
        if RunTestCases(cases_to_run, options.progress, \
          options.j, options.flaky_tests):
    File "tools/test.py", line 923, in RunTestCases
        return progress.Run(tasks)
    File "tools/test.py", line 145, in Run
        thread.join(timeout=10000000)
    File "C:\Users\anna\AppData\Local\Programs\Python\Python38-32\ \
      lib\threading.py", line 1015, in join
        self._wait_for_tstate_lock(timeout=max(timeout, 0))
    File "C:\Users\anna\AppData\Local\Programs\Python\Python38-32\ \
      lib\threading.py", line 1027, in _wait_for_tstate_lock
        elif lock.acquire(block, timeout):
    OverflowError: timeout value is too large

PR-URL: https://github.com/nodejs/node/pull/32868
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Jeremiah Senkpiel &lt;fishrock123@rocketmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Zeyu Yang &lt;himself65@outlook.com&gt;

Reviewed-By: Bartosz Sosnowski &lt;bartosz@janeasystems.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: add extended embedder cctest</title>
<updated>2020-03-21T09:58:28+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2020-03-12T12:11:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=2061c336709939fec9549254d6d8b072b3685fbd'/>
<id>2061c336709939fec9549254d6d8b072b3685fbd</id>
<content type='text'>
Add an embedder cctest that also covers a multi-Environment situation,
including worker_threads-style inspector support.

Co-authored-by: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;

PR-URL: https://github.com/nodejs/node/pull/30467
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add an embedder cctest that also covers a multi-Environment situation,
including worker_threads-style inspector support.

Co-authored-by: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;

PR-URL: https://github.com/nodejs/node/pull/30467
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: fix unit test logging with python3</title>
<updated>2020-01-08T15:43:55+00:00</updated>
<author>
<name>Adam Majer</name>
<email>amajer@suse.de</email>
</author>
<published>2020-01-02T13:41:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=f2a089a754046c1bd950cebefd8bdb2960fdce32'/>
<id>f2a089a754046c1bd950cebefd8bdb2960fdce32</id>
<content type='text'>
A logfile must be opened as a text file and encoding is specified.
Then it can accept a string. Current behaviour we get,

 Message: 'ok 2834 sequential/test-worker-prof'
 Arguments: ()
 --- Logging error ---
 Traceback (most recent call last):
   File "/usr/lib64/python3.7/logging/__init__.py", line 1037, in emit
     stream.write(msg + self.terminator)
 TypeError: a bytes-like object is required, not 'str'
 Call stack:
   File "tools/test.py", line 1734, in &lt;module&gt;
     sys.exit(Main())
   File "tools/test.py", line 1710, in Main
     if RunTestCases(cases_to_run, options.progress, options.j, options.flaky_tests):
   File "tools/test.py", line 933, in RunTestCases
     return progress.Run(tasks)
   File "tools/test.py", line 141, in Run
     self.RunSingle(False, 0)
   File "tools/test.py", line 202, in RunSingle
     self.HasRun(output)
   File "tools/test.py", line 365, in HasRun
     logger.info('  ---')

PR-URL: https://github.com/nodejs/node/pull/31156
Reviewed-By: Christian Clauss &lt;cclauss@me.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: David Carlier &lt;devnexen@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Daijiro Wachi &lt;daijiro.wachi@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A logfile must be opened as a text file and encoding is specified.
Then it can accept a string. Current behaviour we get,

 Message: 'ok 2834 sequential/test-worker-prof'
 Arguments: ()
 --- Logging error ---
 Traceback (most recent call last):
   File "/usr/lib64/python3.7/logging/__init__.py", line 1037, in emit
     stream.write(msg + self.terminator)
 TypeError: a bytes-like object is required, not 'str'
 Call stack:
   File "tools/test.py", line 1734, in &lt;module&gt;
     sys.exit(Main())
   File "tools/test.py", line 1710, in Main
     if RunTestCases(cases_to_run, options.progress, options.j, options.flaky_tests):
   File "tools/test.py", line 933, in RunTestCases
     return progress.Run(tasks)
   File "tools/test.py", line 141, in Run
     self.RunSingle(False, 0)
   File "tools/test.py", line 202, in RunSingle
     self.HasRun(output)
   File "tools/test.py", line 365, in HasRun
     logger.info('  ---')

PR-URL: https://github.com/nodejs/node/pull/31156
Reviewed-By: Christian Clauss &lt;cclauss@me.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: David Carlier &lt;devnexen@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Daijiro Wachi &lt;daijiro.wachi@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: fix Python 3 deprecation warning in test.py</title>
<updated>2019-11-03T16:56:00+00:00</updated>
<author>
<name>Loris Zinsou</name>
<email>lzinsou@protonmail.com</email>
</author>
<published>2019-11-01T16:28:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=bdee976d541696122eaa5e9b877c0d52e26df010'/>
<id>bdee976d541696122eaa5e9b877c0d52e26df010</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/30208
Reviewed-By: Christian Clauss &lt;cclauss@me.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
Reviewed-By: David Carlier &lt;devnexen@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/30208
Reviewed-By: Christian Clauss &lt;cclauss@me.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
Reviewed-By: David Carlier &lt;devnexen@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: fix test runner for Python 3 on Windows</title>
<updated>2019-10-20T14:06:39+00:00</updated>
<author>
<name>Michaël Zasso</name>
<email>targos@protonmail.com</email>
</author>
<published>2019-10-18T09:56:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=a4e075f66833d08fc426c9406eb3894ec56326c1'/>
<id>a4e075f66833d08fc426c9406eb3894ec56326c1</id>
<content type='text'>
Explicitly open files with utf8 encoding, otherwise the system could use
another encoding such as latin1 by default.

PR-URL: https://github.com/nodejs/node/pull/30023
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Christian Clauss &lt;cclauss@me.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Explicitly open files with utf8 encoding, otherwise the system could use
another encoding such as latin1 by default.

PR-URL: https://github.com/nodejs/node/pull/30023
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Christian Clauss &lt;cclauss@me.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: fix test runner in presence of NODE_REPL_EXTERNAL_MODULE</title>
<updated>2019-10-13T20:41:25+00:00</updated>
<author>
<name>Gus Caplan</name>
<email>me@gus.host</email>
</author>
<published>2019-10-13T19:43:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=ea3d5ff785e5f7b327942f9b47b3bd958e77c51f'/>
<id>ea3d5ff785e5f7b327942f9b47b3bd958e77c51f</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/29956
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/29956
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: use unique tmpdirs for each test</title>
<updated>2019-08-11T02:21:26+00:00</updated>
<author>
<name>João Reis</name>
<email>reis@janeasystems.com</email>
</author>
<published>2019-07-25T19:20:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=d3f20a47255a0f88fa85ee4f9c18a77aeb8f7475'/>
<id>d3f20a47255a0f88fa85ee4f9c18a77aeb8f7475</id>
<content type='text'>
Tests can leave processes running blocking the tmpdir. This does not
yet prevent tests from doing that, but prevents failures on
subsequent tests.

PR-URL: https://github.com/nodejs/node/pull/28858
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tests can leave processes running blocking the tmpdir. This does not
yet prevent tests from doing that, but prevents failures on
subsequent tests.

PR-URL: https://github.com/nodejs/node/pull/28858
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: fix pty test hangs on aix</title>
<updated>2019-07-14T22:12:38+00:00</updated>
<author>
<name>Ben Noordhuis</name>
<email>info@bnoordhuis.nl</email>
</author>
<published>2019-07-08T18:52:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=5bed327a34625e7e60ac67970771556093a3d7bf'/>
<id>5bed327a34625e7e60ac67970771556093a3d7bf</id>
<content type='text'>
Some pty tests persistently hung on the AIX CI buildbots. Fix that by
adding a helper script that properly sets up the pty before spawning
the script under test.

On investigation I discovered that the test runner hung when it tried
to close the slave pty's file descriptor, probably due to a bug in
AIX's pty implementation. I could reproduce it with a short C program.
The test runner also leaked file descriptors to the child process.

I couldn't convince python's `subprocess.Popen()` to do what I wanted
it to do so I opted to move the logic to a helper script that can do
fork/setsid/etc. without having to worry about stomping on state in
tools/test.py.

In the process I also uncovered some bugs in the pty module of the
python distro that ships with macOS 10.14, leading me to reimplement
a sizable chunk of the functionality of that module.

And last but not least, of course there are differences between ptys
on different platforms and the helper script has to paper over that.
Of course.

Really, this commit took me longer to put together than I care to admit.

Caveat emptor: this commit takes the hacky ^D feeding to the slave out
of tools/test.py and puts it in the *.in input files. You can also feed
other control characters to tests, like ^C or ^Z, simply by inserting
them into the corresponding input file. I think that's nice.

Fixes: https://github.com/nodejs/build/issues/1820
Fixes: https://github.com/nodejs/node/issues/28489

PR-URL: https://github.com/nodejs/node/pull/28600
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Sam Roberts &lt;vieuxtech@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some pty tests persistently hung on the AIX CI buildbots. Fix that by
adding a helper script that properly sets up the pty before spawning
the script under test.

On investigation I discovered that the test runner hung when it tried
to close the slave pty's file descriptor, probably due to a bug in
AIX's pty implementation. I could reproduce it with a short C program.
The test runner also leaked file descriptors to the child process.

I couldn't convince python's `subprocess.Popen()` to do what I wanted
it to do so I opted to move the logic to a helper script that can do
fork/setsid/etc. without having to worry about stomping on state in
tools/test.py.

In the process I also uncovered some bugs in the pty module of the
python distro that ships with macOS 10.14, leading me to reimplement
a sizable chunk of the functionality of that module.

And last but not least, of course there are differences between ptys
on different platforms and the helper script has to paper over that.
Of course.

Really, this commit took me longer to put together than I care to admit.

Caveat emptor: this commit takes the hacky ^D feeding to the slave out
of tools/test.py and puts it in the *.in input files. You can also feed
other control characters to tests, like ^C or ^Z, simply by inserting
them into the corresponding input file. I think that's nice.

Fixes: https://github.com/nodejs/build/issues/1820
Fixes: https://github.com/nodejs/node/issues/28489

PR-URL: https://github.com/nodejs/node/pull/28600
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Sam Roberts &lt;vieuxtech@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: python: ignore instead of select flake8 rules</title>
<updated>2019-04-14T00:33:06+00:00</updated>
<author>
<name>Refael Ackermann</name>
<email>refack@gmail.com</email>
</author>
<published>2019-04-13T22:09:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=1fc425522192bb66292104dc5cf6fd8e05cb2146'/>
<id>1fc425522192bb66292104dc5cf6fd8e05cb2146</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/25614
Reviewed-By: Sakthipriyan Vairamani &lt;thechargingvolcano@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/25614
Reviewed-By: Sakthipriyan Vairamani &lt;thechargingvolcano@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
