Skip to content

DEBUG/TPDM-Enable-Disable/run.sh: Update TPDM validation to include ETR sinks - #617

Open
Ahamad Shaik (ahamshai137949) wants to merge 1 commit into
qualcomm-linux:mainfrom
ahamshai137949:open_source
Open

Ahamad Shaik (ahamshai137949) wants to merge 1 commit into
qualcomm-linux:mainfrom
ahamshai137949:open_source

Conversation

@ahamshai137949

Copy link
Copy Markdown

Summary:
Update the TPDM Enable/Disable test documentation to include validation of TPDM source toggling with ETR sinks enabled.

Changes:

  • Updated the test goal in README.md.
  • Added ETR sink enablement as part of the TPDM validation criteria.
  • Clarified that TPDM sources must be successfully toggled without causing system hangs or crashes while ETR sinks are active.

…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>

@smuppand Srikanth Muppandam (smuppand) left a comment •

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.

Request changes for the two inline findings: preserve existing ETF coverage when ETR is unavailable, and include failures of the new ETR cleanup in the final result.

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

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.

[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.

Comment on lines +119 to +120
[ -f "$sink_path/enable_sink" ] && echo 0 > "$sink_path/enable_sink" 2>/dev/null
reset_devices

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.

[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.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants