Kernel intpool h2 test fix#22
Open
andreykarpenko-qc wants to merge 1 commit into
Open
Conversation
c1ff3d0 to
96c6567
Compare
- Constrain interrupt range to INT_START..INT_START+NUM_INT (16 ints)
and compute expected bitmask via calc_expected_mask() instead of
hardcoding ~0, fixing spurious failures from out-of-range interrupts.
- Mark stop_threads as volatile int and seen_0/seen_1 as volatile
unsigned int to prevent the compiler from eliding cross-thread reads.
- Add graceful shutdown: set stop_threads flag, re-enable intpool and
raise INT_START twice to unblock worker threads, then pthread_join
all three threads (timeout, worker0, worker1).
- Timeout and worker threads check stop_threads and exit cleanly
instead of spinning forever or calling FAIL().
- Guard pthread_detach calls under USE_DETACHED_THREADS (disabled by
default) to document the alternative threading model.
- Use h2_atomic_swap32() for atomic seen = 0 assignments.
- Re-enable kernel/event/intpool/test_h2 in testlist.v61 and testlist.v81.
Signed-off-by: Andrey Karpenko <andreyk@qti.qualcomm.com>
96c6567 to
1a941fd
Compare
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.
intpool/test_h2: fix reliability and re-enable in testlists
and compute expected bitmask via calc_expected_mask() instead of
hardcoding ~0, fixing spurious failures from out-of-range interrupts.
unsigned int to prevent the compiler from eliding cross-thread reads.
raise INT_START twice to unblock worker threads, then pthread_join
all three threads (timeout, worker0, worker1).
instead of spinning forever or calling FAIL().
default) to document the alternative threading model.
Signed-off-by: Andrey Karpenko andreyk@qti.qualcomm.com