Skip to content

Added CTI, TGU, and Node Access DEBUG Suites#307

Open
Rohan-in-Qualcomm wants to merge 1 commit intoqualcomm-linux:mainfrom
Rohan-in-Qualcomm:debug-cti-tgu-nodes
Open

Added CTI, TGU, and Node Access DEBUG Suites#307
Rohan-in-Qualcomm wants to merge 1 commit intoqualcomm-linux:mainfrom
Rohan-in-Qualcomm:debug-cti-tgu-nodes

Conversation

@Rohan-in-Qualcomm
Copy link

@Rohan-in-Qualcomm Rohan-in-Qualcomm commented Feb 20, 2026

This PR adds new DEBUG suites for CTI, TGU, and Node Access testing.

Added folders

  • DEBUG/CTI-Enable-Disable
  • DEBUG/CTI-Test
  • DEBUG/Node-Access
  • DEBUG/TGU-Enable-Disable

Purpose

These suites extend the kernel debugging and trace validation coverage for CTI, TGU, and node-level operations.

Commit is independent of other DEBUG-related PRs.

@Rohan-in-Qualcomm Rohan-in-Qualcomm changed the title Add CTI, TGU, and Node Access DEBUG Suites Added CTI, TGU, and Node Access DEBUG Suites Feb 20, 2026
@smuppand
Copy link
Contributor

@Rohan-in-Qualcomm Please provide a clear commit message explaining the reason for your changes. Also, rebase your patch, as it currently shows commits from others. #304

Please also resolve the issues identified by shelllint and ensure that the execute bit permissions are set correctly.

@Rohan-in-Qualcomm Rohan-in-Qualcomm force-pushed the debug-cti-tgu-nodes branch 2 times, most recently from 183837a to 5562584 Compare March 5, 2026 06:51
- CTI-Enable-Disable: tests for enabling/disabling Cross Trigger Interface
- CTI-Test: functional validation of CTI trigger channels
- Node-Access: verifies QDSS debug node accessibility via sysfs
- TGU-Enable-Disable: tests for Trigger Generation Unit enable/disable flow

Signed-off-by: Rohan Dutta <rohadutt@qti.qualcomm.com>
* **Disable**: Writes `0` to the `enable` file.
* **Verify**: Reads the `enable` file; expects `0`.
4. **Cleanup**: Resets all devices to disabled state.

Copy link
Contributor

Choose a reason for hiding this comment

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

please add the sample output while executing the run.sh and steps to run the file. please see other README for the same


res_file="./$TESTNAME.res"
rm -f "$res_file"
touch "$res_file"
Copy link
Contributor

Choose a reason for hiding this comment

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

is this really required?


reset_devices() {
log_info "Resetting Coresight devices..."
if [ -f "$CS_BASE/tmc_etf0/enable_sink" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

what if any or all of the paths are not present? Can you handle that aswell?

done
fi

reset_devices
Copy link
Contributor

Choose a reason for hiding this comment

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

This is wrong, you will have to reset to state to the values before reset_devices is called


if [ "$FAIL_COUNT" -eq 0 ]; then
log_pass "CTI Enable/Disable Test Completed Successfully"
echo "$TESTNAME PASS" >> "$res_file"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please give > instead of >>

echo "$TESTNAME PASS" >> "$res_file"
else
log_fail "CTI Enable/Disable Test Failed ($FAIL_COUNT errors)"
echo "$TESTNAME FAIL" >> "$res_file"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please give > instead of >>

[ -e "$_dev" ] || continue
CTI_LIST="$CTI_LIST $(basename "$_dev")"
done
CTI_LIST="${CTI_LIST# }"
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this required?


if [ -z "$CTI_LIST" ]; then
log_fail "No CTI devices found."
FAIL_COUNT=$((FAIL_COUNT + 1))
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we exit and mark fail if there are no CTI devices?

@@ -0,0 +1,20 @@
metadata:
name: CTI-Trigger-Map
description: "Validates Coresight Cross Trigger Interface (CTI) by mapping and unmapping triggers to channels."
Copy link
Contributor

@vnarapar vnarapar Mar 13, 2026

Choose a reason for hiding this comment

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

Below are needed aswell
name: <>
format: "Lava-Test Test Definition 1.0"
description: <>
maintainer:
- <>

@@ -0,0 +1,20 @@
metadata:
name: CTI-Enable-Disable
description: "Verifies that all Coresight CTI devices can be successfully enabled and disabled via sysfs."
Copy link
Contributor

Choose a reason for hiding this comment

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

Below are needed aswell
name: <>
format: "Lava-Test Test Definition 1.0"
description: <>
maintainer:

  • <>

run:
steps:
- REPO_PATH=$PWD
- cd Runner/suites/Kernel/DEBUG/CTI-Test
Copy link
Contributor

Choose a reason for hiding this comment

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

Append || true


run:
steps:
- REPO_PATH=$PWD
Copy link
Contributor

Choose a reason for hiding this comment

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

Append || true


run:
steps:
- REPO_PATH=$PWD
Copy link
Contributor

Choose a reason for hiding this comment

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

Append || true

run:
steps:
- REPO_PATH=$PWD
- cd Runner/suites/Kernel/DEBUG/CTI-Enable-Disable
Copy link
Contributor

Choose a reason for hiding this comment

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

Append || true

* **Attach**: writes `channel trigger` to `trigin_attach` / `trigout_attach`.
* **Verify**: Reads back via `chan_xtrigs_sel` and `chan_xtrigs_in`/`out` to confirm mapping.
* **Detach**: Unmaps the trigger and confirms the entry is cleared.
6. **Cleanup**: Restores the original LPM sleep setting.
Copy link
Contributor

Choose a reason for hiding this comment

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

please add the sample output while executing the run.sh and steps to run the file. please see other README for the same

* Performs a `cat` operation.
* Repeats the process for the `mgmt/` subdirectory if it exists.
6. **Verification**: Any read failure (exit code non-zero) increments the failure counter.

Copy link
Contributor

Choose a reason for hiding this comment

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

please add the sample output while executing the run.sh and steps to run the file. please see other README for the same

* **Verify**: Checks the exit code of the write operation.
* **Disable**: Writes `0` to `enable_tgu`.
* **Verify**: Checks the exit code.
4. **Cleanup**: Disables the sink before the next iteration.
Copy link
Contributor

Choose a reason for hiding this comment

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

please add the sample output while executing the run.sh and steps to run the file. please see other README for the same


res_file="./$TESTNAME.res"
rm -f "$res_file"
touch "$res_file"
Copy link
Contributor

Choose a reason for hiding this comment

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

i dont think this is required


CTI_MAX_TRIGGERS=8
CTI_MAX_CHANNELS=4
# CTI_TRIGGERS_TO_TEST=1
Copy link
Contributor

Choose a reason for hiding this comment

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

can be removed if not used?

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.

3 participants