coproc/vecaccess/mxaccess/lxaccess: extend test suite and refactor#61
Open
zbelinsk wants to merge 1 commit into
Open
coproc/vecaccess/mxaccess/lxaccess: extend test suite and refactor#61zbelinsk wants to merge 1 commit into
zbelinsk wants to merge 1 commit into
Conversation
Add comprehensive unit tests for mxaccess and lxaccess (previously untested), and replace the vecaccess smoke test with a full path-testing suite. All three tests share the same structure: unit_init with state verification, acquire/release/reuse bounded by a hardware-queried limit, a limit+1 blocking acquire via a second thread, double-release rejection, and a legacy-wrapper check. The tests derive the context limit by calling unit_init first (which latches the hardware style), then using h2_coproc_count() sign to mirror the impl's semaphore init logic for both oldstyle and newstyle hardware. Refactors in the implementation: - h2_coproc_init: fix one-shot regression (re-report OLDSTYLE on every call once latched; set init_done only after the full unit loop succeeds); add h2_coproc_init_result_t enum replacing magic 0/1/-1 - h2_coproc_set: replace per-call bit-scan with O(1) bitpos table lookup built at init time; remove redundant Q6_R_popcount_P call (use pre-computed counts[] array); remove dead `bits` local - h2_coproc: extract coproc_grow() helper, eliminating repeated realloc-assign-null-check pattern across init_entry_contexts and h2_coproc_init - h2_vecaccess/mxaccess/lxaccess release: add double-release guard (check active bit before releasing); fix idx passed to h2_coproc_set (was hardcoded 0); remove redundant h2_hwconfig_extbits call in vecaccess release - h2_vecaccess new-style branch: add missing HVX_64 case; align SILVER/SILVER_MAX sem init to use h2_coproc_count (was h2_info) - h2_vecaccess.h: add H2_VECACCESS_MAX_VLENGTH_BYTES replacing bare 128 Signed-off-by: Zeev Belinsky <zbelinsk@qti.qualcomm.com>
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.
Add comprehensive unit tests for mxaccess and lxaccess (previously untested), and replace the vecaccess smoke test with a full path-testing suite. All three tests share the same structure: unit_init with state verification, acquire/release/reuse bounded by a hardware-queried limit, a limit+1 blocking acquire via a second thread, double-release rejection, and a legacy-wrapper check. The tests derive the context limit by calling unit_init first (which latches the hardware style), then using h2_coproc_count() sign to mirror the impl's semaphore init logic for both oldstyle and newstyle hardware.
Refactors in the implementation:
bitslocal