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

[1.0] Add test case to demonstrate the weak masking issue #622

Merged
merged 9 commits into from
Aug 26, 2024

Conversation

greg7mdp
Copy link
Contributor

@greg7mdp greg7mdp commented Aug 23, 2024

Resolves #544.

Branch gh_544_check created off commit 7beaa20 prior to PR #537 (implementing the FSI changes to avoid the issue) has the new test failing.

@arhag arhag linked an issue Aug 23, 2024 that may be closed by this pull request
@greg7mdp greg7mdp requested review from arhag and heifner August 23, 2024 20:01
unittests/savanna_cluster.hpp Outdated Show resolved Hide resolved
unittests/savanna_cluster.hpp Outdated Show resolved Hide resolved
unittests/savanna_cluster.hpp Outdated Show resolved Hide resolved
@ericpassmore
Copy link
Contributor

Note:start
group: STABILITY
category: TEST
summary: Add test case to demonstrate weak masking issue.
Note:end

@ericpassmore
Copy link
Contributor

nice ascii graph in unittests/savanna_misc_tests.cpp

// -------------------
void print(const char* name, const signed_block_ptr& b) const {
if (_debug_mode)
std::cout << name << " ts = " << b->timestamp.slot << ", id = " << b->calculate_id().str().substr(8, 16)
Copy link
Member

Choose a reason for hiding this comment

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

As this is in debug mode, you can just print out the whole ID.

Copy link
Member

Choose a reason for hiding this comment

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

I missed this cout, use ilog and then you can enable via unittest -- --verbose and you don't need the _debug_mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually like this better because I print only what is relevant for the test.

BOOST_FIXTURE_TEST_CASE(weak_masking_issue, savanna_cluster::cluster_t) try {
auto& A=_nodes[0]; auto& B=_nodes[1]; auto& C=_nodes[2]; auto& D=_nodes[3];
using vote_t = savanna_cluster::node_t::vote_t;
//_debug_mode = true;
Copy link
Member

Choose a reason for hiding this comment

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

Remove this commented out line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like having it here personally.

@greg7mdp greg7mdp merged commit 005eb5d into release/1.0 Aug 26, 2024
36 checks passed
@greg7mdp greg7mdp deleted the gh_544 branch August 26, 2024 18:01
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.

Add test case to demonstrate the weak masking issue
4 participants