Hi Thomas,
Thanks for adding the test.
There's a feature of jtreg that was exposed a couple of month ago that
can be used to deal with running the test too many times.
There can be multiple @test blocks with different @requires.
* @run main/othervm/timeout=300 Basic * @run main/othervm/timeout=300
-Djdk.lang.Process.launchMechanism=fork Basic * * @test * @requires
(os.family == "linux") * @run main/othervm/timeout=300
-Djdk.lang.Process.launchMechanism=posix_spawn Basic
I'll run this through our build system too.
To fully test out using posix_spawn in many more different scenarios the
build system should be augmented to be able to use it as the default for
an entire build/CI/CD/test runs.
Thanks, Roger
On 10/24/2018 10:35 AM, Thomas Stüfe wrote:
Hi all,
version 2 of Davids patch, with test changes:
http://cr.openjdk.java.net/~stuefe/webrevs/JDK-8212828-posix_spawn.patch/webrev.01/webrev/
Executed the test on my local Ubuntu box, works fine. Submit job runs.
About the test: I added a new line:
* @run main/othervm/timeout=300 Basic
* @run main/othervm/timeout=300 -Djdk.lang.Process.launchMechanism=fork Basic
+ * @run main/othervm/timeout=300
-Djdk.lang.Process.launchMechanism=posix_spawn Basic
The way I understand those tests work is that the first line causes
the test to be run with the default launch mechanism, the second line
with jdk.lang.Process.launchMechanism=fork explicitly. The third line,
added by me, will now explicitly test with posix_spawn. I did not
limit the platforms, since posix_spawn should now be available on all
platforms, so it should work on all platforms. But then, on all other
platforms it has already been the default.
This is still a bit iffy: On Windows, jdk.lang.Process.launchMechanism
gets ignored, so we just executed the same test twice (now three
times)? And now we execute the posix_spawn variant twice on all
platforms where this is the default, so line 1 and 3 are the same? You
see I am not a jtreg expert :) Can I specify a @run directive for only
one platform? In that case I would limit the explicit posix_spawn test
to Linux.
Note however that if we really abondon vfork in the future and make
posix_spawn the default, this test becomes simpler too.
Best, Thomas
On Wed, Oct 24, 2018 at 3:36 PM David Lloyd <david.ll...@redhat.com> wrote:
On Wed, Oct 24, 2018 at 1:05 AM Thomas Stüfe <thomas.stu...@gmail.com> wrote:
Review:
- copyright dates need updating on the C-sources
- I opt for "#if defined(__solaris__) || defined(_ALLBSD_SOURCE) ||
defined(_AIX) || defined(__linux__)" to be removed completely from
unix-specific source files. The ifdef now covers all OpenJDK Unix
platforms.
Here's a version with these changes.
--
- DML