Skip to content

d4n: Update suite and test programs - #66070

Merged
samarahu merged 3 commits into
ceph:mainfrom
samarahu:rgw-d4n-unit-test-fix
Dec 8, 2025
Merged

samarahu merged 3 commits into
ceph:mainfrom
samarahu:rgw-d4n-unit-test-fix

Conversation

@samarahu

@samarahu samarahu commented Oct 27, 2025 •

Copy link
Copy Markdown
Contributor

https://tracker.ceph.com/issues/73618#change-323827

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@samarahu

samarahu commented Nov 6, 2025

Copy link
Copy Markdown
Contributor Author

@samarahu

Copy link
Copy Markdown
Contributor Author

jenkins test docs

@samarahu
samarahu force-pushed the rgw-d4n-unit-test-fix branch 2 times, most recently from 8f6f032 to 9c9754a Compare November 18, 2025 17:21
@samarahu

Copy link
Copy Markdown
Contributor Author

@samarahu

Copy link
Copy Markdown
Contributor Author

jenkins test dashboard

@samarahu

Copy link
Copy Markdown
Contributor Author

RGW suite run: https://pulpito.ceph.com/suriarte-2025-11-25_14:12:04-rgw-rgw-d4n-unit-test-fix-distro-default-smithi/
Results match those on main, aside from varied multisite failures, which are not exact (multisite failures are occurring on main as well, but the failed tests are inconsistent across runs).

Comment thread src/test/rgw/test_d4n_policy.cc Resolved
Comment thread src/test/rgw/test_d4n_policy.cc Resolved
bufferlist attrVal;
attrVal.append(std::to_string(bl.length()));
attrs.insert({"accounted_size", attrVal});
buffer::list attrVal;

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 does the test exactly do, can you briefly explain

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It creates a victim block that is the block to be evicted and uploads it into the directory, cache, and policy instances. It then creates a block to be "uploaded" and calls eviction using the block's size. Since the cache driver being used is the TestRedisDriver, which overwrites get_free_space, the eviction call should successfully evict the victim block. There are checks for this at the end of the test.

ASSERT_GE(lfuda(env->dpp, block, cacheDriver, yield), 0);

cacheDriver->shutdown();
EXPECT_EQ(policyDriver.get_cache_policy()->eviction(env->dpp, block->size, optional_yield{yield}), 0);

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.

after eviction, how are you verifying that the victim block was actually evicted

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Line 272 in the test file checks to make sure the entry does not exist in the cache, but I'll add checks for the policy driver and directory as well.

@pritha-srivastava

Copy link
Copy Markdown
Contributor

can you update the commit message of the first commit from "Debug policy failure" to what is actually being done or maybe add that explanation below the message? And isn't that "Debug policy unit test failure"

@samarahu
samarahu force-pushed the rgw-d4n-unit-test-fix branch from ccdbe09 to c07d37d Compare December 1, 2025 20:10
@samarahu samarahu changed the title rgw/d4n: Debug policy failure rgw/d4n: Update suite and test programs Dec 2, 2025
@samarahu

samarahu commented Dec 3, 2025

Copy link
Copy Markdown
Contributor Author

jenkins test dashboard

@samarahu samarahu changed the title rgw/d4n: Update suite and test programs d4n: Update suite and test programs Dec 4, 2025
@cbodley
cbodley marked this pull request as ready for review December 4, 2025 19:53
@cbodley
cbodley requested a review from a team as a code owner December 4, 2025 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants