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

ctest checks return code instead of PASS or FAIL output #93

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

grnydawn
Copy link

Omega CTest checks the return code of each Omega unit test instead of using "PASS" or "FAIL" output.

This PR updates all unit tests to properly generate return codes.

This PR correctly detected an IO segfault even though the unit test outputs "PASS".

...
3: [2024-06-18 08:20:05.461] [info] [IOTest.cpp:78] IOTest: Default decomp retrieval PASS
7: [2024-06-18 08:20:05.462] [info] [IOTest.cpp:78] IOTest: Default decomp retrieval PASS
srun: error: nid003609: task 1: Segmentation fault
srun: Terminating StepId=26913868.9
0: slurmstepd: error: *** STEP 26913868.9 ON nid003609 CANCELLED AT 2024-06-18T15:20:06 ***
srun: error: nid003609: tasks 2-3,6-7: Segmentation fault
srun: error: nid003609: tasks 0,5: Segmentation fault
srun: error: nid003609: task 4: Segmentation fault

...

93% tests passed, 1 tests failed out of 15

Total Test time (real) =  57.75 sec

The following tests FAILED:
	 10 - IO_TEST (Failed)
Errors while running CTest

Checklist

  • Testing
    • CTest unit tests for new features have been added per the approved design.

@grnydawn grnydawn added Omega CMake CMake-related issues labels Jun 18, 2024
@grnydawn grnydawn requested a review from philipwjones June 18, 2024 15:42
@mark-petersen mark-petersen changed the title ctest checks return code insteand PASS or FAIL output ctest checks return code instead of PASS or FAIL output Jun 19, 2024
@sbrus89
Copy link

sbrus89 commented Jun 19, 2024

@grnydawn, thanks for making these changes. Do we want to include tests in omega/test/ocn as well?

@grnydawn
Copy link
Author

@sbrus89 , That is my bad. I forgot to update the unit tests in the ocn directory. I will fix it soon. Thanks!

Copy link

@philipwjones philipwjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @grnydawn , this looks good and should be more robust to other errors. Tests pass on Frontier GPU/CPU and a Chrysalis test is waiting. Will merge as soon as that test completes.

@philipwjones philipwjones merged commit c0b9566 into E3SM-Project:develop Jun 28, 2024
2 checks passed
@grnydawn grnydawn deleted the ykim/omega/ctest branch September 27, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake CMake-related issues Omega
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants