Skip to content

DAOS-19886 dlck: make dlck_test_helper suitable for testing - #19400

Open
janekmi wants to merge 1 commit into
masterfrom
janekmi/DAOS-19886-fix-dlck_test_helper
Open

janekmi wants to merge 1 commit into
masterfrom
janekmi/DAOS-19886-fix-dlck_test_helper

Conversation

@janekmi

@janekmi janekmi commented Oct 29, 2026

Copy link
Copy Markdown
Contributor
  • replace cmocka asserts with standard asserts which are more practicall when trying to pin-point where a problem happened in a regular application in contrast to a test.
  • do not generate random OIDs/dkeys/akeys for every update. Instead, generate a set of OIDs and keys and for every update pick a random subset of them. This change increases an average branching factor for the resulting VOS tree.
  • allow vos_obj_update_ex() to fail with -DER_NO_PERM. This indicates the value already exists and it is of a different type compared to the one you attempt to set right now. This kind of update is not supported. dlck_test_helper allows this to happen to keep the bookkeeping required to avoid this kind of situationminimal.
  • fix dtx_update() so it behaves nicely for both keep_act == false and keep_act == true.
  • move argument parsing to a dedicate compilation unit
  • allow to provide --oids_num, --keys_num and --updates_num from the command line.
  • set default values to keep the VOS tree minmal but interesting enough for testing.

Skip-func-vm: true
Skip-fault-injection-test: true
Skip-test-el-9.6-rpms: true
Skip-test-leap-15-rpms: true
Skip-func-hw-test: true

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).

- replace cmocka asserts with standard asserts which are more practicall
  when trying to pin-point where a problem happened in a regular
application in contrast to a test.
- do not generate random OIDs/dkeys/akeys for every update. Instead,
  generate a set of OIDs and keys and for every update pick a random
subset of them. This change increases an average branching factor for
the resulting VOS tree.
- allow vos_obj_update_ex() to fail with -DER_NO_PERM. This indicates
  the value already exists and it is of a different type compared to the
one you attempt to set right now. This kind of update is not supported.
dlck_test_helper allows this to happen to keep the bookkeeping required
to avoid this kind of situationminimal.
- fix dtx_update() so it behaves nicely for both keep_act == false and
  keep_act == true.
- move argument parsing to a dedicate compilation unit
- allow to provide --oids_num, --keys_num and --updates_num from the
  command line.
- set default values to keep the VOS tree minmal but interesting enough
  for testing.

Skip-func-vm: true
Skip-fault-injection-test: true
Skip-test-el-9.6-rpms: true
Skip-test-leap-15-rpms: true
Skip-func-hw-test: true

Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
@janekmi
janekmi requested review from Nasf-Fan and grom72 October 29, 2026 23:26
@janekmi
janekmi requested review from a team as code owners October 29, 2026 23:26
@github-actions

Copy link
Copy Markdown

Ticket title is 'dlck: refine dlck_test_helper so it produduces contents which is suitable for testing purposes'
Status is 'In Progress'
https://daosio.atlassian.net/browse/DAOS-19886

if (rc == -DER_NO_PERM) {
/** Current implementation does not track already used paths so the same path may be
* reused with a different data type which is not allowed. */
return;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please dtx_end() before return.

rc = parse_unsigned(arg, &args->oids_num, state);
break;
case KEY_WORKLOAD_KEYS_NUM:
rc = parse_unsigned(arg, &args->keys_num, state);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What will happen if keys_num is zero?

This branch has not been deployed

No deployments
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.

2 participants