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

Changes to test-framework introduced during last 2 days of debugging. #845

Merged
merged 6 commits into from
Aug 18, 2021

Conversation

JackAtGaia
Copy link

@JackAtGaia JackAtGaia commented Aug 18, 2021

Various small changes:

  • install_sdk_build.sh updated to check ps for any instances of gaia database before installing
  • added test/utils/monitor_lsof.sh to package up the FD tracking used for Tobin (also to establish a good pattern for these)
  • added new test/utils directory to lint.sh
  • added rough "wait timeout" detection to mink.cpp, will break the test on purpose as the timeout should never occur
  • standardizing rulesets to allow for a single expected_output.json for smoke test comparison

@@ -71,6 +71,20 @@ parse_command_line() {
done
}

# Make sure that we do not have any instances running, not even as
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is test not under production? All production-related tests should be under production folder, not under a top-level test folder?

Any test should be located under the folder of the specific product that is being tested, not separated from that.

Copy link
Author

Choose a reason for hiding this comment

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

these are tests that overarch the entire project. Based on previous conversations with @bill-42 and @daxhaw , it was decided this folder was the best place to put it.

@@ -421,6 +421,10 @@ int wait_for_processing_to_complete(bool is_explicit_pause, int rule_1_sample_ba
const int no_delta_count_before_break = 300 / c_processing_pause_in_microseconds;
int current_no_delta_attempt = 0;

char buffer[4096];
int space_left = 1024;
char * start_pointer = buffer;
Copy link
Contributor

Choose a reason for hiding this comment

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

Because test is not under production, this code is not subject to the cleanup we do via clang-tidy. One of the benefits of having this code under production is that all formatting issues that can be handled automatically by clang-tidy, actually do get handled by it.

Copy link
Author

Choose a reason for hiding this comment

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

which is why I have ./lint.sh which I run before each commit. are you spotting a formatting error that it missed?

test/mink.cpp Outdated Show resolved Hide resolved
test/proposal.md Outdated
@@ -0,0 +1,93 @@
# Directory Reset Proposal

Based on feedback provided by Dax, I have thought very
Copy link
Contributor

Choose a reason for hiding this comment

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

Check the production README guidelines for md files. In particular, we should not break long lines.

Copy link
Author

Choose a reason for hiding this comment

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

this is a temporary file, and should not have been included in the commit.

Copy link
Contributor

Choose a reason for hiding this comment

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

That is fine, but you should still check the guidelines for future reference. :)

Copy link
Contributor

@LaurentiuCristofor LaurentiuCristofor left a comment

Choose a reason for hiding this comment

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

All this code should be moved under `production\tests, which would also add the benefit of running clang-tidy on the code.

@JackAtGaia JackAtGaia merged commit ad5fcbb into master Aug 18, 2021
@JackAtGaia JackAtGaia deleted the jack/reset-db branch August 18, 2021 22:16
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.

2 participants