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
test/ceph_test_objectstore: make settings update and restore less error prone #21145
Conversation
9946e3f
to
545ad35
Compare
retest this please |
1 similar comment
retest this please |
@liewegas - mind reviewing? |
// we keep this stuff 'unsafe' out of test case scope to be able to update ANY | ||
// config settings. Hence setting it to 'safe' here to proceed with the test | ||
// case | ||
g_conf->set_safe_to_start_threads(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bit confuses me.. if we set it here, then a SetVal() in the test case may not work, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liewegas - the idea and rationale of this stuff is to provide a way to adjust config settings that are prohibited in run-time, primarily bluestore_min_alloc_size.
Instead of introducing some additional flags/options to md_config_t I decided to rely on this flag. The idea is to clear it out of test case scope - see main() and TeadDown and set in SetUp. Once cleared it allows to set desired config parameters - that we tend to do prior to SetUp in relevant test cases, see StartDeferred() stuff. And setting it here forbids config updates from test case body as it was before. Moreover that didn't and wouldn't work anyway. And new SetVal allows to detect such issues by using set_value_or_die.
So long story short - this way we're able to update that 'protected' parameters out of test case only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok!
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
prone. Signed-off-by: Igor Fedotov <ifedotov@suse.com>
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
test case run. Signed-off-by: Igor Fedotov <ifedotov@suse.com>
545ad35
to
fe51200
Compare
retest this please |
retest this please |
StoreTextFixture provides stack to preserve previously settings and automatically restores them on text case tear down.