DAOS-18304 ddb: Add Go unit test coverage for remaining commands#18700
Draft
knard38 wants to merge 1 commit into
Draft
DAOS-18304 ddb: Add Go unit test coverage for remaining commands#18700knard38 wants to merge 1 commit into
knard38 wants to merge 1 commit into
Conversation
TestDdb_HelpCmds: add the 24 remaining commands (previously only ls and open were covered), asserting each command's derived 'Usage:' line. TestDdb_Cmds: add argument-passing coverage for the 18 commands listed in the TODO (superblock_dump, value_dump, rm, value_load, ilog_dump, ilog_commit, ilog_clear, dtx_dump, dtx_cmt_clear, smd_sync, vea_dump, vea_update, dtx_act_commit, dtx_act_abort, dtx_act_discard_invalid, dev_list, dev_replace, dtx_stat) plus a prov_mem default (no-flag) case. Depth follows dmg's TestDmg_PoolCommands convention and the newer csum_dump precedent (#18685): one case for commands with nothing to vary (no flags/options), a few extra cases for commands with flags or optional args worth exercising (value_dump, smd_sync, dtx_stat, dtx_dump). Features: recovery Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
|
Ticket title is 'Add unit test to ddb go code' |
Collaborator
|
Test stage Functional Hardware Medium MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-18700/1/execution/node/1787/log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #18086: fills in the two
TODO(follow-up PR)markers it left inddb_commands_test.gofor DAOS-18304. No production code changes — everyddb_run_<cmd>CGo stub hook needed already exists from #18124.TestDdb_HelpCmdsAdds the 24 remaining commands (previously only
lsandopenwere covered), each asserting its derivedUsage:line. Note that grumble auto-adds a-h/--helpflag to every command, so[flags]appears in the usage line even for commands with no command-specific flags.TestDdb_CmdsAdds argument-passing coverage for the 18 commands listed in the TODO —
superblock_dump,value_dump,rm,value_load,ilog_dump,ilog_commit,ilog_clear,dtx_dump,dtx_cmt_clear,smd_sync,vea_dump,vea_update,dtx_act_commit,dtx_act_abort,dtx_act_discard_invalid,dev_list,dev_replace,dtx_stat— plus aprov_memdefault (no-flag) case to complement its existing-s/--tmpfs_sizecase.Steps for the author:
After all prior steps are complete: