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

[5.0 -> main] make resource monitor plugin tests deterministic by using fixed fc::temp_directory instead of dynamic /tmp #1828

Merged
merged 3 commits into from
Oct 26, 2023

Conversation

linh2931
Copy link
Member

Several resource monitor plugin tests use native /tmp as a monitored directory for testing. However, subdirectories in /tmp on test machine can be removed during a test run, causing file_space_handler::add_file_system to assert when doing get_stat on a removed directory, as shown by following failure:

/__w/leap/leap/plugins/resource_monitor_plugin/test/test_resmon_plugin.cpp(147): fatal error: in "resmon_plugin_tests/startupNormal": unexpected exception thrown by plugin_startup({"/tmp"})

I manually simulated a removed directory and reproduced the same failure.

This PR

  • uses a fixed temp directory provided by fc::temp_directory instead of /tmp.
  • removes a non-necessary no-value provided test.

Merges release/5.0 into main including #1826

Resolves #1824

linh2931 and others added 3 commits October 26, 2023 10:27
fc::temp_directory instead of dynamic /tmp
[5.0] make resource monitor plugin tests deterministic by using fixed fc::temp_directory instead of dynamic /tmp
@linh2931 linh2931 requested review from greg7mdp and heifner October 26, 2023 17:21
@linh2931 linh2931 merged commit cc9993c into main Oct 26, 2023
29 checks passed
@linh2931 linh2931 deleted the resmon_deterministic_tests_main branch October 26, 2023 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test Failure: test_resmon_plugin
3 participants