Skip to content

selftests/remoteproc: Add selftest suite for sysfs interface#743

Open
bibekpatro wants to merge 1 commit into
qualcomm-linux:qcom-nextfrom
bibekpatro:rproc
Open

selftests/remoteproc: Add selftest suite for sysfs interface#743
bibekpatro wants to merge 1 commit into
qualcomm-linux:qcom-nextfrom
bibekpatro:rproc

Conversation

@bibekpatro

Copy link
Copy Markdown

Add a new selftest suite for the remoteproc framework covering its stable userspace-facing sysfs interface:

  • /sys/class/remoteproc/remoteprocN/ (sysfs attributes)

remoteproc_sysfs covers all sysfs attributes (name, state, firmware, coredump, recovery) with 11 tests: read validity checks, invalid write rejection, read-after-write roundtrips, firmware write while offline, and stop-when-offline noop.

The binary uses kselftest_harness.h with FIXTURE/FIXTURE_TEARDOWN to ensure sysfs state (firmware, coredump, recovery) is restored to its original value after each test regardless of pass or fail.

The binary skips gracefully with KSFT_SKIP when no remoteproc devices are present, making it safe to run in CI environments without remoteproc hardware.

start/stop lifecycle tests and debugfs interfaces are intentionally excluded: the former requires a platform-specific firmware binary that cannot be assumed present in a generic test environment, and the latter is not part of the stable userspace ABI.

Cc: Bjorn Andersson andersson@kernel.org
Cc: Mathieu Poirier mathieu.poirier@linaro.org
Cc: Shuah Khan shuah@kernel.org
Cc: linux-remoteproc@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org

Add a new selftest suite for the remoteproc framework covering its
stable userspace-facing sysfs interface:

  - /sys/class/remoteproc/remoteprocN/ (sysfs attributes)

remoteproc_sysfs covers all sysfs attributes (name, state, firmware,
coredump, recovery) with 11 tests: read validity checks, invalid write
rejection, read-after-write roundtrips, firmware write while offline,
and stop-when-offline noop.

The binary uses kselftest_harness.h with FIXTURE/FIXTURE_TEARDOWN to
ensure sysfs state (firmware, coredump, recovery) is restored to its
original value after each test regardless of pass or fail.

The binary skips gracefully with KSFT_SKIP when no remoteproc devices
are present, making it safe to run in CI environments without
remoteproc hardware.

start/stop lifecycle tests and debugfs interfaces are intentionally
excluded: the former requires a platform-specific firmware binary that
cannot be assumed present in a generic test environment, and the latter
is not part of the stable userspace ABI.

Signed-off-by: Bibek Kumar Patro <bibek.patro@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-remoteproc@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

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.

1 participant