-
Notifications
You must be signed in to change notification settings - Fork 23
Refactored shmbridge test #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vnarapar
wants to merge
1
commit into
qualcomm-linux:main
Choose a base branch
from
vnarapar:shmbridge_change
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,59 +1,57 @@ | ||
| Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. | ||
| SPDX-License-Identifier: BSD-3-Clause-Clear | ||
|
|
||
| # shmbridge Validation Test | ||
| # shmbridge Validation test | ||
|
|
||
| ## Overview | ||
|
|
||
| This test case validates the encryption and access functionality of the `shmbridge` partition by: | ||
| This test case validates the presence and initialization of the Qualcomm Secure Channel Manager (QCOM_SCM) interface on the device. It ensures that: | ||
|
|
||
| - Formatting the partition with ext4 and encryption options | ||
| - Mounting it with `inlinecrypt` | ||
| - Adding an encryption key using `fscryptctl` | ||
| - Setting and verifying an encryption policy | ||
| - Writing and reading a test file to confirm data integrity | ||
| - The kernel is configured with QCOM_SCM support | ||
| - The dmesg logs contain expected `qcom_scm` entries | ||
| - There are no "probe failure" messages in the logs | ||
|
|
||
| ## Usage | ||
|
|
||
| Instructions: | ||
|
|
||
| 1. Copy repo to Target Device: Use scp to transfer the scripts from the host to the target device. The scripts should be copied to any directory on the target device. | ||
| 2. Verify Transfer: Ensure that the repo have been successfully copied to any directory on the target device. | ||
| 3. Run Scripts: Navigate to the directory where these files are copied on the target device and execute the scripts as needed. | ||
| 1. **Copy repo to Target Device**: Use `scp` to transfer the scripts from the host to the target device. The scripts should be copied to any directory on the target device. | ||
| 2. **Verify Transfer**: Ensure that the repo has been successfully copied to the target device. | ||
| 3. **Run Scripts**: Navigate to the directory where these files are copied on the target device and execute the scripts as needed. | ||
|
|
||
| Run a Kernel Baseport shmbridge test using: | ||
| Run the SHM Bridge test using: | ||
| --- | ||
| #### Quick Example | ||
| ``` | ||
| ```sh | ||
| git clone <this-repo> | ||
| cd <this-repo> | ||
| scp -r common Runner user@target_device_ip:<Path in device> | ||
| ssh user@target_device_ip | ||
| cd <Path in device>/Runner && ./run-test.sh shmbridge | ||
| ``` | ||
|
|
||
| --- | ||
| ## Prerequisites | ||
| - `fscryptctl`, `mkfs.ext4` and `mount` must be available | ||
| - Root access is required | ||
| - Partition /dev/disk/by-partlabel/xbl_ramdump_a must exist and be accessible | ||
|
|
||
| ## Result Format | ||
|
|
||
| Test result will be saved in shmbridge.res as: | ||
| #### Pass Criteria | ||
| - Partition is found and formatted | ||
| - Encryption key is added and policy is set | ||
| - Test file is written and read successfully | ||
| - `Test Passed` – if all validations succeed | ||
| <!-- --> | ||
| #### Fail Criteria | ||
| - Partition not found | ||
| - Encryption setup fails | ||
| - Test file cannot be read or content mismatch | ||
| - `Test Failed` – if any check fails | ||
|
|
||
| 1. zcat, grep, and dmesg must be available. | ||
| 2. Root access may be required to write to read kernel logs. | ||
| --- | ||
| ## Result Format | ||
| Test result will be saved in `shmbridge.res` as: | ||
| ## Output | ||
| A .res file is generated in the same directory: | ||
|
|
||
| `PASS shmbridge` OR `FAIL shmbridge` | ||
| `shmbridge PASS` OR `shmbridge FAIL` | ||
|
|
||
| ## Sample Log | ||
| ``` | ||
| Output | ||
|
|
||
| [INFO] 1970-01-01 01:10:01 - ----------------------------------------------------------------------------------------- | ||
| [INFO] 1970-01-01 01:10:01 - -------------------Starting shmbridge Testcase---------------------------- | ||
| [INFO] 1970-01-01 01:10:01 - ==== Test Initialization ==== | ||
| [INFO] 1970-01-01 01:10:01 - Checking if required tools are available | ||
| [INFO] 1970-01-01 01:10:01 - Checking kernel config for QCOM_SCM support... | ||
| [PASS] 1970-01-01 01:10:01 - Kernel config CONFIG_QCOM_SCM is enabled | ||
| [INFO] 1970-01-01 01:10:01 - Scanning dmesg logs for qcom_scm initialization | ||
| [PASS] 1970-01-01 01:10:01 - shmbridge : Test Passed (qcom_scm present and no probe failures) | ||
| [INFO] 1970-01-01 01:10:01 - -------------------Completed shmbridge Testcase---------------------------- | ||
| ``` |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.