Repository navigation
DEBUG/TPDM-Enable-Disable/run.sh: Update TPDM validation to include ETR sinks - #617
Ahamad Shaik (ahamshai137949) wants to merge 1 commit into
Conversation
…TR sinks Existing enables TPDM sources with ETF sinks, this changes enhances the test to enable TPDM sources with ETR sinks. Test fetches ETR path from sysfs nodes and enables ETR sinks before TPDM sources enable/Disable. Signed-off-by: Ahamad Shaik <ahamshai@qti.qualcomm.com>
| if [ -z "$etf_path" ]; then | ||
| log_fail "TMC-ETF sink not found. Cannot proceed." | ||
| etr_path=$(find_path "tmc_etr0" "tmc_etr" "tmc_etr1" "coresight-tmc_etr" "coresight-tmc_etr0") | ||
| if [ -z "$etf_path" ] || [ -z "$etr_path" ]; then |
There was a problem hiding this comment.
[P2] Preserve ETF-only coverage when adding ETR
This now requires both sink types before running any source checks. A configuration with usable TPDM/ETF devices but no registered ETR previously reached the ETF test and now immediately reports FAIL, even though its existing ETF path can still be tested. A focused comparison of the old and new discovery gates confirms that change.
Discover the sink types independently and run the available, reachable sink subcases. Report an unavailable optional ETR subcase as SKIP without dropping ETF coverage. If ETR is meant to be mandatory for a particular target, make that requirement explicit rather than imposing it on every invocation. Update the README applicability accordingly.
| [ -f "$sink_path/enable_sink" ] && echo 0 > "$sink_path/enable_sink" 2>/dev/null | ||
| reset_devices |
There was a problem hiding this comment.
[P2] Include ETR cleanup failures in the final result
The new ETR phase ignores both the sink-clear status and the reset outcome. If source toggling succeeds but clearing ETR fails and reset does not recover it, fail remains zero and the suite reports PASS while ETR is still selected for subsequent source operations. Fault-injecting rejected cleanup operations into the extracted teardown/final-result path reproduces that PASS.
Check the sink write and verify the final enable_sink readback, then include an unrecovered cleanup failure in the aggregate result. Use the same checked sink-state handling before each phase as well. The current reset_devices helper has no reliable aggregate success contract, so simply checking its last command's return code is not sufficient.
Summary:
Update the TPDM Enable/Disable test documentation to include validation of TPDM source toggling with ETR sinks enabled.
Changes: