Skip to content

Conversation

@crusaderky
Copy link

@crusaderky crusaderky commented Jan 19, 2026

Unit test and reproducer for

AI disclaimer

I used AI to produce the initial draft of this PR. I then proceeded to thoroughly audit and tweak the changes by hand.


Important

Add tests for can_apply and set_local callbacks in dataset filters, introducing new filters and verifying behavior for variable-length datasets.

  • Tests:
    • Add test_can_apply_skips_cbs and test_can_apply_skips_cbs_vlen to verify can_apply callback skips set_local and filter callbacks when returning 0.
    • Add test_set_local_updates_cd and test_set_local_updates_cd_vlen to verify set_local callback updates cd_values before filter execution.
  • Filters:
    • Introduce H5Z_CAN_APPLY_BOGUS4 and H5Z_SET_LOCAL_UPDATE_CD_VALUES filters in dsets.c.
    • Implement can_apply_bogus4, set_local_bogus4, filter_bogus4, set_local_update_cd_values, and filter_update_cd_values functions.
  • Constants:
    • Add H5Z_FILTER_BOGUS4 and H5Z_FILTER_UPDATE_CD_VALUES constants.
    • Define UPDATED_CD_VALUE for set_local_update_cd_values.

This description was created by Ellipsis for 7e0dede. You can customize this summary. It will automatically update as commits are pushed.

@github-project-automation github-project-automation bot moved this to To be triaged in HDF5 - TRIAGE & TRACK Jan 19, 2026
@crusaderky crusaderky marked this pull request as draft January 19, 2026 18:29
@crusaderky crusaderky changed the title DNM Filters: test can_apply and set_local for vlen datasets DNM Filters: Demonstrate failures in can_apply and set_local Jan 19, 2026
*
*-------------------------------------------------------------------------
*/
static herr_t
Copy link
Author

Choose a reason for hiding this comment

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

There is a lot of redundant boilerplate from this point on.
This was done to keep tests as stupid as possible.
Please advise if you would instead prefer to deduplicate the boilerplate through helper functions.

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

Labels

None yet

Projects

Status: To be triaged

Development

Successfully merging this pull request may close these issues.

1 participant