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

DAOS-15744 ddb: Fixes for Coverity Issues #14275

Merged
merged 5 commits into from
May 14, 2024

Conversation

ryon-jensen
Copy link
Contributor

@ryon-jensen ryon-jensen commented Apr 29, 2024

2555532
2555534
2555543
2555544
2555546
2555540
2555528
2555522
2555521
2555518

Required-githooks: true

Signed-off-by: Ryon Jensen [email protected]

Skip-func-hw-test: true

Before requesting gatekeeper:

  • Two review approvals and any prior change requests have been resolved.
  • Testing is complete and all tests passed or there is a reason documented in the PR why it should be force landed and forced-landing tag is set.
  • Features: (or Test-tag*) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.
  • Commit messages follows the guidelines outlined here.
  • Any tests skipped by the ticket being addressed have been run and passed in the PR.

Gatekeeper:

  • You are the appropriate gatekeeper to be landing the patch.
  • The PR has 2 reviews by people familiar with the code, including appropriate owners.
  • Githooks were used. If not, request that user install them and check copyright dates.
  • Checkpatch issues are resolved. Pay particular attention to ones that will show up on future PRs.
  • All builds have passed. Check non-required builds for any new compiler warnings.
  • Sufficient testing is done. Check feature pragmas and test tags and that tests skipped for the ticket are run and now pass with the changes.
  • If applicable, the PR has addressed any potential version compatibility issues.
  • Check the target branch. If it is master branch, should the PR go to a feature branch? If it is a release branch, does it have merge approval in the JIRA ticket.
  • Extra checks if forced landing is requested
    • Review comments are sufficiently resolved, particularly by prior reviewers that requested changes.
    • No new NLT or valgrind warnings. Check the classic view.
    • Quick-build or Quick-functional is not used.
  • Fix the commit message upon landing. Check the standard here. Edit it to create a single commit. If necessary, ask submitter for a new summary.

Copy link

github-actions bot commented Apr 29, 2024

Ticket title is 'Resolve DDB Coverity Issues'
Status is 'In Review'
Labels: 'ddb'
Errors are Unknown component
https://daosio.atlassian.net/browse/DAOS-15744

2555532
2555534
2555543
2555544
2555546
2555540
2555528
2555522
2555521
2555518

Also added 'ddb' to VALID_COMPONENTS for jira query. After moving ddb into
 utils dir 'ddb' isn't automatically a valid component.

Required-githooks: true

Signed-off-by: Ryon Jensen <[email protected]>

Skip-func-hw-test: true
2555532
2555534
2555543
2555544
2555546
2555540
2555528
2555522
2555521
2555518

Also added 'ddb' to VALID_COMPONENTS for jira query. After moving ddb into
 utils dir 'ddb' isn't automatically a valid component.

Required-githooks: true

Signed-off-by: Ryon Jensen <[email protected]>

Skip-func-hw-test: true
@ryon-jensen ryon-jensen force-pushed the ryon-jensen/DdbCoverityFixes.DAOS-15744 branch from d94592d to 85e2c10 Compare April 29, 2024 18:32
Required-githooks: true

Signed-off-by: Ryon Jensen <[email protected]>

Skip-func-hw-test: true
@ryon-jensen
Copy link
Contributor Author

I'm not sure why the Jira Report is still failing. I added 'ddb' as a VALID_COMPONENT.

@ryon-jensen ryon-jensen marked this pull request as ready for review May 1, 2024 14:26
@ryon-jensen ryon-jensen added the forced-landing The PR has known failures or has intentionally reduced testing, but should still be landed. label May 6, 2024
@ryon-jensen ryon-jensen requested review from a team and removed request for a team May 6, 2024 14:04
@ryon-jensen ryon-jensen removed the forced-landing The PR has known failures or has intentionally reduced testing, but should still be landed. label May 6, 2024
@brianjmurrell brianjmurrell removed their request for review May 6, 2024 15:16
…rityFixes.DAOS-15744

Required-githooks: true

Test-tag: ddb_cmd
@daosbuild1
Copy link
Collaborator

Test stage Functional on EL 8.8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-14275/4/execution/node/1167/log

Copy link
Contributor

@Nasf-Fan Nasf-Fan left a comment

Choose a reason for hiding this comment

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

The change seems fine for me. Not sure whether the -DER_BUSY error from DDB test cases are potentially related with the changes or not, although I cannot establish the relationship between them.

src/utils/ddb/tests/ddb_parse_tests.c Show resolved Hide resolved
@daosbuild1
Copy link
Collaborator

Test stage Functional on EL 8.8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-14275/5/execution/node/479/log

@ryon-jensen
Copy link
Contributor Author

I'm not sure what the test failures from earlier runs were caused by, but the last couple runs have passed. I believe this is ready to land.

@ryon-jensen ryon-jensen requested a review from a team May 14, 2024 14:53
@mchaarawi
Copy link
Contributor

is test-tag appropriate here? no other PR tests are affected or execute the ddb core code?

@ryon-jensen
Copy link
Contributor Author

is test-tag appropriate here? no other PR tests are affected or execute the ddb core code?

ddb is a standalone executable. Nothing else uses it.

fail_msg("Test not setup correctly");
return -DER_UNKNOWN;
Copy link
Contributor

Choose a reason for hiding this comment

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

I understand this is just test code, but DER_UNKNOWN is not friendly for debugging or triaging purposes. please consider changing that in a follow on

fail_msg("Test not setup correctly");
return -DER_UNKNOWN;
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@mchaarawi mchaarawi merged commit 1c80f20 into master May 14, 2024
51 of 74 checks passed
@mchaarawi mchaarawi deleted the ryon-jensen/DdbCoverityFixes.DAOS-15744 branch May 14, 2024 16:08
char *pool_uuid = "12345678-1234-1234-1234-123456789012";
int mkdir_result;

if (strlen(tctx->dvt_pmem_file) == 0) {
char dir[64] = {0};

sprintf(dir, "/mnt/daos/%s", pool_uuid);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should also use snprintf here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

7 participants