Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the --gtest_filter=${porttest_filter} option for porttest #6487

Merged
merged 2 commits into from
Apr 29, 2022

Conversation

babsingh
Copy link
Contributor

@babsingh babsingh commented Apr 20, 2022

  1. Remove the --gtest_filter=${porttest_filter} option for porttest

    When ${porttest_filter} is an empty string, no tests from porttest are
    run. ${porttest_filter} is never set in OMR so it will always be an
    empty string. Also, --gtest_filter=${porttest_filter} conflicts with
    the GTEST_FILTER environment variable used by omrbuild.groovy. To avoid
    the conflict and correctly run porttest, the --gtest_filter=${porttest_filter}
    option is removed. porttest should consistently rely upon the GTEST_FILTER
    environment variable.

    Changed --gtest_filter="Cuda*" to --gtest_filter=*Cuda*. 0 tests are run.
    This allows cuda_porttest to work correctly.

  2. Disable *_create_dump_* tests for the "x86-64 Linux" job in Azure

    These tests are disabled because core files cannot be generated on Linux
    in the Azure pipeline.

Fixes: #6486

Signed-off-by: Babneet Singh [email protected]

@babsingh
Copy link
Contributor Author

babsingh commented Apr 20, 2022

I used the following reference: https://github.com/google/googletest/blob/main/docs/advanced.md#running-a-subset-of-the-tests. The intent of adding an asterisks at the start and end is to increase test coverage: *Cuda* and *${porttest_filter}*. This will allow tests to be named and filters to be enforced more flexibly.

@babsingh
Copy link
Contributor Author

jenkins build all

@babsingh
Copy link
Contributor Author

eclipse.omr (x86-64 Linux) https://dev.azure.com/eclipse-omr/omr/_build/results?buildId=5433&view=logs&j=196c4937-6990-58b5-7d18-234ac2f0888b&t=66cbe35e-0143-5803-340e-78910b4c9fcb

@AdamBrousseau @jdekonin Are the OMR machines configured to generate core files correctly?

The following tests FAILED:
	 31 - porttest (Failed)

31: [  FAILED  ] PortDumpTest.dump_test_create_dump_with_NO_name
31: [  FAILED  ] PortDumpTest.dump_test_create_dump_with_name
31: [  FAILED  ] PortDumpTest.dump_test_create_dump_from_signal_handler

31: /home/vsts/work/1/s/fvtest/porttest/omrdumpTest.cpp line  173: omrdump_test_create_dump_with_NO_name omrdump_create returned: 1, with filename: The core file created by child process with pid = 16910 was not found. Expected to find core file with name "core"

@babsingh
Copy link
Contributor Author

babsingh commented Apr 20, 2022

https://ci.eclipse.org/omr/job/PullRequest-win_x86-64/3231/

sysinfo_test_get_tmp3 is excluded on Windows. omrbuild.groovy sets the GTEST_FILTER environment variable. Setting --gtest_filter=* in fvtest/porttest/CMakeLists.txt conflicts with the environment variable, and reincludes sysinfo_test_get_tmp3 on Windows.

15:28:23  The following tests FAILED:
15:28:23  	 13 - porttest (Failed)

15:26:59  13: [  FAILED  ] PortSysinfoTest.sysinfo_test_get_tmp3 (0 ms)

'GTEST_FILTER=-*dump_test_create_dump_*:*NumaSetAffinity:*NumaSetAffinitySuspended:PortSysinfoTest.sysinfo_test_get_tmp3:ThreadExtendedTest.TestOtherThreadCputime',

@babsingh babsingh changed the title Fix the --gtest_filter option for omrporttest Remove the --gtest_filter=${porttest_filter} option for omrporttest Apr 20, 2022
@babsingh babsingh changed the title Remove the --gtest_filter=${porttest_filter} option for omrporttest Remove the --gtest_filter=${porttest_filter} option for porttest Apr 20, 2022
@babsingh
Copy link
Contributor Author

jenkins build all

@jdekonin
Copy link
Contributor

Are the OMR machines configured to generate core files correctly?

The bulk of the existing systems in jenkins were setup prior to either @AdamBrousseau or my involvement with the OMR project. A quick spot check of a few would have me answer no, I don't believe they are and that needs an issue for deeper review. Can you please open an issue to track?

@AdamBrousseau
Copy link
Contributor

If you're asking about the machines on azure, we don't own those resources. I'm not sure if we have the ability to control things like core settings on those. Someone would have to look at the azure doc.

@babsingh babsingh force-pushed the fix_porrtest branch 2 times, most recently from ec96fb5 to 68e52e0 Compare April 21, 2022 00:58
@babsingh
Copy link
Contributor Author

babsingh commented Apr 21, 2022

I tried to add the below cmds in azure-pipelines.yml:

### For core file generation
     sudo echo "core.%p" > /proc/sys/kernel/core_pattern
     sudo echo "kernel.core_pattern=core.%p" >> /etc/sysctl.conf
     sudo systemctl disable apport
     ulimit -c unlimited
     ulimit -n 1048576
     ulimit -u unlimited

### Does not work: privileged cmds cannot be invoked
     /home/vsts/work/_temp/788c8a55-2e55-4912-9795-f8c5bedd2b80.sh: line 1: /proc/sys/kernel/core_pattern: Permission denied
     /home/vsts/work/_temp/788c8a55-2e55-4912-9795-f8c5bedd2b80.sh: line 2: /etc/sysctl.conf: Permission denied
     apport.service is not a native service, redirecting to systemd-sysv-install.

@babsingh babsingh force-pushed the fix_porrtest branch 2 times, most recently from c7082af to 0a13c43 Compare April 21, 2022 14:29
@babsingh
Copy link
Contributor Author

jenkins build all

@babsingh
Copy link
Contributor Author

babsingh commented Apr 21, 2022

With these changes, porttest and cuda_porttest are correctly run.

Run from this PR: https://ci.eclipse.org/omr/job/PullRequest-linux_x86-64/3270/consoleFull

12:14:04        Start 31: porttest
12:14:04  
12:14:04  31: Test command: /home/jenkins/workspace/Build/build/fvtest/porttest/omrporttest "--gtest_output=xml:/home/jenkins/workspace/Build/build/fvtest/porttest/omrporttest-results.xml"
12:14:04  31: Test timeout computed to be: 9.99988e+06
12:14:04  31: [==========] Running 254 tests from 22 test cases.
12:14:04  31: [----------] 1 test from PortInitializationTest
12:14:04  31: [----------] 1 test from PortInitializationTest (0 ms total)
12:14:04  31: 
12:14:04  31: [----------] 2 tests from PortFileTest
12:14:04  31: [----------] 2 tests from PortFileTest (1 ms total)
12:14:04  31: 
12:14:04  31: [----------] 8 tests from PortHeapTest
12:14:06  31: [----------] 8 tests from PortHeapTest (1723 ms total)
12:14:06  31: 
12:14:06  31: [----------] 8 tests from PortTest
12:14:06  31: [----------] 8 tests from PortTest (2 ms total)
12:14:06  31: 
12:14:06  31: [----------] 10 tests from PortMemTest
12:14:07  31: [----------] 10 tests from PortMemTest (617 ms total)
...
...
12:14:41  31: [==========] 254 tests from 22 test cases ran. (36652 ms total)
12:14:41  31: [  PASSED  ] 254 tests.
12:14:41  31: [  ALL TESTS PASSED  ] 

12:14:41        Start 32: cuda_porttest
12:14:41  
12:14:41  32: Test command: /home/jenkins/workspace/Build/build/fvtest/porttest/omrporttest "--gtest_output=xml:/home/jenkins/workspace/Build/build/fvtest/porttest/omrporttest-results.xml" "--gtest_filter=*Cuda*" "-earlyExit"
12:14:41  32: Test timeout computed to be: 9.99988e+06
12:14:41  32: Note: Google Test filter = *Cuda*
12:14:41  32: [==========] Running 17 tests from 2 test cases.
12:14:41  32: [----------] 1 test from CudaTest
12:14:41  32:   omrcuda: found 0 devices
12:14:41  32: [----------] 1 test from CudaTest (6 ms total)
12:14:41  32: 
12:14:41  32: [----------] 16 tests from CudaDeviceTest
12:14:41  32: [----------] 16 tests from CudaDeviceTest (0 ms total)
12:14:41  32: 
12:14:41  32: [==========] 17 tests from 2 test cases ran. (8 ms total)
12:14:41  32: [  PASSED  ] 17 tests.
12:14:41  32: [  ALL TESTS PASSED  ] 

Another PR build: https://ci.eclipse.org/omr/job/PullRequest-linux_x86-64/3269/consoleFull

11:28:01        Start 31: porttest
11:28:01  
11:28:01  31: Test command: /home/jenkins/workspace/Build/build/fvtest/porttest/omrporttest "--gtest_output=xml:/home/jenkins/workspace/Build/build/fvtest/porttest/omrporttest-results.xml" "--gtest_filter="
11:28:01  31: Test timeout computed to be: 9.99988e+06
11:28:01  31: Note: Google Test filter = 
11:28:01  31: [==========] Running 0 tests from 0 test cases.
11:28:01  31: [==========] 0 tests from 0 test cases ran. (0 ms total)
11:28:01  31: [  PASSED  ] 0 tests.
11:28:01  31: [  ALL TESTS PASSED  ] 
11:28:01  31/48 Test #31: porttest ............................   Passed    0.01 sec

11:28:01        Start 32: cuda_porttest
11:28:01  
11:28:01  32: Test command: /home/jenkins/workspace/Build/build/fvtest/porttest/omrporttest "--gtest_output=xml:/home/jenkins/workspace/Build/build/fvtest/porttest/omrporttest-results.xml" "--gtest_filter="Cuda*"" "-earlyExit"
11:28:01  32: Test timeout computed to be: 9.99988e+06
11:28:01  32: Note: Google Test filter = "Cuda*"
11:28:01  32: [==========] Running 0 tests from 0 test cases.
11:28:01  32: [==========] 0 tests from 0 test cases ran. (0 ms total)
11:28:01  32: [  PASSED  ] 0 tests.
11:28:01  32: [  ALL TESTS PASSED  ] 

When ${porttest_filter} is an empty string, no tests from porttest are
run. ${porttest_filter} is never set in OMR so it will always be an
empty string. Also, --gtest_filter=${porttest_filter} conflicts with
the GTEST_FILTER environment variable used by omrbuild.groovy. To avoid
the conflict and correctly run porttest, the --gtest_filter=${porttest_filter}
option is removed. porttest should consistently rely upon the GTEST_FILTER
environment variable.

Changed --gtest_filter="Cuda*" to --gtest_filter=*Cuda*. 0 tests are run.
This allows cuda_porttest to work correctly.

Fixes: eclipse#6486

Signed-off-by: Babneet Singh <[email protected]>
These tests are disabled because core files cannot be generated on Linux
in the Azure pipeline.

Signed-off-by: Babneet Singh <[email protected]>
@babsingh
Copy link
Contributor Author

jenkins build all

@babsingh
Copy link
Contributor Author

@janvrany Can you provide feedback on these changes since --gtest_filter=${porttest_filter} was added by you in bd501fb?

@0xdaryl Requesting your feedback as well. In the current state, porttest runs 0 tests. Open PRs, such as #6465 and #6479, with port library changes cannot be merged since they will need changes from this PR to enable testing in PR builds.

@janvrany
Copy link
Contributor

@babsingh : LGTM. Thanks!

It actually seems to me that --gtest_filter option was overlooked leftover from some attempt to run at least some port tests under QEMU before we gave up.

@babsingh
Copy link
Contributor Author

This PR needs to be merged. It is preventing cgroup v2 PRs from being tested:

Cgroup v2 support is targeted for OpenJ9's 0.33 release. D-cut is end of May 22. More PRs for cgroup v2 support will follow. So, we should avoid cgroup v2 PRs from piling up.

fyi @pshipton @tajila

@0xdaryl
Copy link
Contributor

0xdaryl commented Apr 29, 2022

Jenkins build zos

@0xdaryl 0xdaryl merged commit 81b7940 into eclipse:master Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

porttest running 0 tests
5 participants