-
Notifications
You must be signed in to change notification settings - Fork 21
Change directory for qcrypto and kselftest #164
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
Merged
Merged
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
164 changes: 82 additions & 82 deletions
164
...aseport/qcom_crypto/README_qcom_crypto.md → ...aseport/qcom_crypto/README_qcom_crypto.md
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,83 +1,83 @@ | ||
Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. | ||
SPDX-License-Identifier: BSD-3-Clause-Clear | ||
# Qualcomm Crypto (qcom_crypto) Functionality Test Script | ||
# Overview | ||
The qcom_crypto test script validates the basic functionality of cryptographic operations using the kcapi tool. It ensures that encryption, decryption, and HMAC-SHA256 operations are correctly executed and verified against expected outputs. | ||
## Features | ||
- Environment Initialization: Robustly locates and sources the init_env file from the directory hierarchy. | ||
- Dependency Check: Verifies the presence of required tools like kcapi. | ||
- Crypto Validation: Performs AES-CBC encryption/decryption and HMAC-SHA256 operations. | ||
- Automated Result Logging: Outputs test results to a .res file for automated result collection. | ||
- Modular Integration: Designed to work within a larger test framework using functestlib.sh. | ||
## Prerequisites | ||
Ensure the following components are present on the target device: | ||
- `kcapi` (Kernel Crypto tool) Available in /usr/bin | ||
- `libkcapi.so.1` (Kernel Crypto library) Available in /usr/lib | ||
## Directory Structure | ||
``` | ||
Runner/ | ||
├── suites/ | ||
│ ├── Kernel/ | ||
│ │ ├── FunctionalArea/ | ||
│ │ │ ├── baseport/ | ||
│ │ │ │ ├── qcom_crypto/ | ||
│ │ │ │ │ ├── run.sh | ||
``` | ||
## Usage | ||
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 the ```/<user-defined-location>``` directory on the target device. | ||
2. Verify Transfer: Ensure that the repo have been successfully copied to the ```/<user-defined-location>``` directory on the target device. | ||
3. Run Scripts: Navigate to the ```/<user-defined-location>``` directory on the target device and execute the scripts as needed. | ||
--- | ||
Quick Example | ||
``` | ||
git clone <this-repo> | ||
cd <this-repo> | ||
scp -r common Runner user@target_device_ip:/<user-defined-location> | ||
ssh user@target_device_ip | ||
cd /<user-defined-location>/Runner && ./run-test.sh qcom_crypto | ||
Sample output: | ||
sh-5.2# ./run-test.sh qcom_crypto | ||
[Executing test case: qcom_crypto] 1970-01-01 05:44:18 - | ||
[INFO] 1970-01-01 05:44:18 - ----------------------------------------------------------------------------------------- | ||
[INFO] 1970-01-01 05:44:18 - -------------------Starting qcom_crypto Testcase---------------------------- | ||
[INFO] 1970-01-01 05:44:18 - === Test Initialization === | ||
[INFO] 1970-01-01 05:44:18 - Checking if dependency binary is available | ||
[INFO] 1970-01-01 05:44:18 - Running encryption test | ||
[INFO] 1970-01-01 05:44:18 - Encryption test passed | ||
[INFO] 1970-01-01 05:44:18 - Running decryption test | ||
[INFO] 1970-01-01 05:44:18 - Decryption test passed | ||
[INFO] 1970-01-01 05:44:18 - Running HMAC-SHA256 test | ||
[INFO] 1970-01-01 05:44:18 - HMAC-SHA256 test passed | ||
[PASS] 1970-01-01 05:44:18 - qcom_crypto : All tests passed | ||
[PASS] 1970-01-01 05:44:18 - qcom_crypto passed | ||
[INFO] 1970-01-01 05:44:18 - ========== Test Summary ========== | ||
PASSED: | ||
qcom_crypto | ||
FAILED: | ||
None | ||
SKIPPED: | ||
None | ||
[INFO] 1970-01-01 05:44:18 - ================================== | ||
``` | ||
4. Results will be available in the `/<user-defined-location>/Runner/suites/Kernel/FunctionalArea/baseport/qcom_crypto/` directory. | ||
## Notes | ||
- It uses kcapi to validate AES-CBC encryption/decryption and HMAC-SHA256 hashing. | ||
Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. | ||
SPDX-License-Identifier: BSD-3-Clause-Clear | ||
|
||
# Qualcomm Crypto (qcom_crypto) Functionality Test Script | ||
# Overview | ||
|
||
The qcom_crypto test script validates the basic functionality of cryptographic operations using the kcapi tool. It ensures that encryption, decryption, and HMAC-SHA256 operations are correctly executed and verified against expected outputs. | ||
|
||
## Features | ||
|
||
- Environment Initialization: Robustly locates and sources the init_env file from the directory hierarchy. | ||
- Dependency Check: Verifies the presence of required tools like kcapi. | ||
- Crypto Validation: Performs AES-CBC encryption/decryption and HMAC-SHA256 operations. | ||
- Automated Result Logging: Outputs test results to a .res file for automated result collection. | ||
- Modular Integration: Designed to work within a larger test framework using functestlib.sh. | ||
|
||
## Prerequisites | ||
|
||
Ensure the following components are present on the target device: | ||
|
||
- `kcapi` (Kernel Crypto tool) Available in /usr/bin | ||
- `libkcapi.so.1` (Kernel Crypto library) Available in /usr/lib | ||
|
||
## Directory Structure | ||
``` | ||
Runner/ | ||
├── suites/ | ||
│ ├── Kernel/ | ||
│ │ ├── Baseport/ | ||
│ │ │ ├── qcom_crypto/ | ||
│ │ │ │ ├── run.sh | ||
|
||
``` | ||
## Usage | ||
|
||
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 the ```/<user-defined-location>``` directory on the target device. | ||
|
||
2. Verify Transfer: Ensure that the repo have been successfully copied to the ```/<user-defined-location>``` directory on the target device. | ||
|
||
3. Run Scripts: Navigate to the ```/<user-defined-location>``` directory on the target device and execute the scripts as needed. | ||
|
||
--- | ||
Quick Example | ||
``` | ||
git clone <this-repo> | ||
cd <this-repo> | ||
scp -r common Runner user@target_device_ip:/<user-defined-location> | ||
ssh user@target_device_ip | ||
cd /<user-defined-location>/Runner && ./run-test.sh qcom_crypto | ||
|
||
Sample output: | ||
sh-5.2# ./run-test.sh qcom_crypto | ||
[Executing test case: qcom_crypto] 1970-01-01 05:44:18 - | ||
[INFO] 1970-01-01 05:44:18 - ----------------------------------------------------------------------------------------- | ||
[INFO] 1970-01-01 05:44:18 - -------------------Starting qcom_crypto Testcase---------------------------- | ||
[INFO] 1970-01-01 05:44:18 - === Test Initialization === | ||
[INFO] 1970-01-01 05:44:18 - Checking if dependency binary is available | ||
[INFO] 1970-01-01 05:44:18 - Running encryption test | ||
[INFO] 1970-01-01 05:44:18 - Encryption test passed | ||
[INFO] 1970-01-01 05:44:18 - Running decryption test | ||
[INFO] 1970-01-01 05:44:18 - Decryption test passed | ||
[INFO] 1970-01-01 05:44:18 - Running HMAC-SHA256 test | ||
[INFO] 1970-01-01 05:44:18 - HMAC-SHA256 test passed | ||
[PASS] 1970-01-01 05:44:18 - qcom_crypto : All tests passed | ||
[PASS] 1970-01-01 05:44:18 - qcom_crypto passed | ||
|
||
[INFO] 1970-01-01 05:44:18 - ========== Test Summary ========== | ||
PASSED: | ||
qcom_crypto | ||
|
||
FAILED: | ||
None | ||
|
||
SKIPPED: | ||
None | ||
[INFO] 1970-01-01 05:44:18 - ================================== | ||
``` | ||
4. Results will be available in the `/<user-defined-location>/Runner/suites/Kernel/FunctionalArea/baseport/qcom_crypto/` directory. | ||
|
||
## Notes | ||
|
||
- It uses kcapi to validate AES-CBC encryption/decryption and HMAC-SHA256 hashing. | ||
- If any test fails, the script logs the expected vs actual output and exits with a failure code. | ||
File renamed without changes.
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.