Skip to content

DAOS-18304 ddb: Add Go unit test coverage for remaining commands#18700

Draft
knard38 wants to merge 1 commit into
masterfrom
ckochhof/fix/master/daos-18304/patch-004
Draft

DAOS-18304 ddb: Add Go unit test coverage for remaining commands#18700
knard38 wants to merge 1 commit into
masterfrom
ckochhof/fix/master/daos-18304/patch-004

Conversation

@knard38

@knard38 knard38 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #18086: fills in the two TODO(follow-up PR) markers it left in ddb_commands_test.go for DAOS-18304. No production code changes — every ddb_run_<cmd> CGo stub hook needed already exists from #18124.

TestDdb_HelpCmds

Adds the 24 remaining commands (previously only ls and open were covered), each asserting its derived Usage: line. Note that grumble auto-adds a -h/--help flag to every command, so [flags] appears in the usage line even for commands with no command-specific flags.

TestDdb_Cmds

Adds 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 to complement its existing -s/--tmpfs_size case.

Steps for the author:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • Appropriate Functional Test Stages were run.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

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>
@knard38 knard38 self-assigned this Jul 22, 2026
@github-actions

Copy link
Copy Markdown

Ticket title is 'Add unit test to ddb go code'
Status is 'In Progress'
https://daosio.atlassian.net/browse/DAOS-18304

@daosbuild3

Copy link
Copy Markdown
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

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.

3 participants