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

fix linux cmake test disablement and related OOM #2146

Closed
wants to merge 1 commit into from

Conversation

ahornby
Copy link
Contributor

@ahornby ahornby commented Feb 15, 2024

fix linux cmake test disablement and related OOM

Summary:

Fix the folly linux github CI:

  • fix disabling the failing AtomicUnorderedInsertMap.DISABLEDMegaMap test as ctest wasn't filtering it out
  • fix disabling ThreadLocal.SHAREDLibraryTestName when not building shared lib

The first one also fixes OOM that reliably OOM killed my terminal when running tests locally with > 2 jobs

Test Plan:

Run tests locally with:

./build/fbcode_builder/getdeps.py --allow-system-packages test --num-jobs 2 --src-dir=. folly

Before:

Start 1883: atomic_unordered_map_test.AtomicUnorderedInsertMap.DISABLEDMegaMap
1882/3090 Test #1883: atomic_unordered_map_test.AtomicUnorderedInsertMap.DISABLEDMegaMap ...................................***Failed    0.00 sec
Note: Google Test filter = AtomicUnorderedInsertMap.DISABLEDMegaMap
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from AtomicUnorderedInsertMap
[ RUN      ] AtomicUnorderedInsertMap.DISABLEDMegaMap
unknown file: Failure
C++ exception with description "Cannot allocate memory" thrown in the test body.
[  FAILED  ] AtomicUnorderedInsertMap.DISABLEDMegaMap (0 ms)
[----------] 1 test from AtomicUnorderedInsertMap (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (0 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] AtomicUnorderedInsertMap.DISABLEDMegaMap

 1 FAILED TEST
...
1/1 Test #2774: thread_local_test.ThreadLocal.SHAREDLibraryTestName ...***Failed    0.00 sec
Note: Google Test filter = ThreadLocal.SHAREDLibraryTestName
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from ThreadLocal
[ RUN      ] ThreadLocal.SHAREDLibraryTestName
unknown file: Failure
C++ exception with description "missing: folly/test/thread_local_test_lib.so" thrown in the test body.
[  FAILED  ] ThreadLocal.SHAREDLibraryTestName (0 ms)
[----------] 1 test from ThreadLocal (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (0 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] ThreadLocal.SHAREDLibraryTestName

After, works


Stack created with Sapling. Best reviewed with ReviewStack.

Summary:

Fix the folly linux github CI:

   * fix disabling the failing AtomicUnorderedInsertMap.DISABLEDMegaMap test as ctest wasn't filtering it out
   * fix disabling ThreadLocal.SHAREDLibraryTestName when not building shared lib

The first one also fixes OOM that reliably OOM killed my terminal when running tests locally with > 2 jobs

Test Plan:

Run tests locally with:
```
./build/fbcode_builder/getdeps.py --allow-system-packages test --num-jobs 2 --src-dir=. folly
```

Before:
```
Start 1883: atomic_unordered_map_test.AtomicUnorderedInsertMap.DISABLEDMegaMap
1882/3090 Test facebook#1883: atomic_unordered_map_test.AtomicUnorderedInsertMap.DISABLEDMegaMap ...................................***Failed    0.00 sec
Note: Google Test filter = AtomicUnorderedInsertMap.DISABLEDMegaMap
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from AtomicUnorderedInsertMap
[ RUN      ] AtomicUnorderedInsertMap.DISABLEDMegaMap
unknown file: Failure
C++ exception with description "Cannot allocate memory" thrown in the test body.
[  FAILED  ] AtomicUnorderedInsertMap.DISABLEDMegaMap (0 ms)
[----------] 1 test from AtomicUnorderedInsertMap (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (0 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] AtomicUnorderedInsertMap.DISABLEDMegaMap

 1 FAILED TEST
...
1/1 Test #2774: thread_local_test.ThreadLocal.SHAREDLibraryTestName ...***Failed    0.00 sec
Note: Google Test filter = ThreadLocal.SHAREDLibraryTestName
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from ThreadLocal
[ RUN      ] ThreadLocal.SHAREDLibraryTestName
unknown file: Failure
C++ exception with description "missing: folly/test/thread_local_test_lib.so" thrown in the test body.
[  FAILED  ] ThreadLocal.SHAREDLibraryTestName (0 ms)
[----------] 1 test from ThreadLocal (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (0 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] ThreadLocal.SHAREDLibraryTestName

```

After, works
@facebook-github-bot
Copy link
Contributor

@Orvid has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@Orvid merged this pull request in 51c4605.

facebook-github-bot pushed a commit to facebook/hhvm that referenced this pull request Feb 16, 2024
Summary:
fix linux cmake test disablement and related OOM

Fix the folly linux github CI:

   * fix disabling the failing AtomicUnorderedInsertMap.DISABLEDMegaMap test as ctest wasn't filtering it out
   * fix disabling ThreadLocal.SHAREDLibraryTestName when not building shared lib

The first one also fixes OOM that reliably OOM killed my terminal when running tests locally with > 2 jobs

X-link: facebook/folly#2146

Reviewed By: Gownta

Differential Revision: D53830611

Pulled By: Orvid

fbshipit-source-id: c3eac882f2522996f897b29f5bf7d8622c1f6ceb
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.

2 participants