Skip to content

Commit 2889cce

Browse files
committed
Add: test script for validating Qualcomm Crypto functionality
Introduces a new test case script `qcom_crypto` to validate cryptographic operations using the `kcapi` tool. The script performs the following tests: - AES-CBC encryption - AES-CBC decryption - HMAC-SHA256 generation Each test compares the actual output with expected values and logs the results. The overall test status is recorded in a result file (`.res`), and appropriate pass/fail messages are logged. This script enhances automated validation of Qualcomm crypto functionality. Signed-off-by: naveenkumar s <[email protected]>
1 parent cefead0 commit 2889cce

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Runner/suites/Kernel/FunctionalArea/baseport/qcom_crypto/README_qcom_crypto.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ git clone <this-repo>
4646
cd <this-repo>
4747
scp -r common Runner user@target_device_ip:/<user-defined-location>
4848
ssh user@target_device_ip
49-
cd /<user-defined-location>/Runner && ./run-test.sh qcom_hwrng
49+
cd /<user-defined-location>/Runner && ./run-test.sh qcom_crypto
5050
5151
Sample output:
5252
sh-5.2# ./run-test.sh qcom_crypto

Runner/suites/Kernel/FunctionalArea/baseport/qcom_crypto/run.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ fi
2929
# shellcheck disable=SC1090,SC1091
3030
. "$TOOLS/functestlib.sh"
3131

32-
#!/bin/bash
33-
3432
TESTNAME="qcom_crypto"
3533
test_path=$(find_test_case_by_name "$TESTNAME")
3634
cd "$test_path" || exit 1
@@ -61,7 +59,7 @@ if [ "$ENCRYPT_OUTPUT" != "$EXPECTED_ENCRYPT" ]; then
6159
log_info "Got : $ENCRYPT_OUTPUT"
6260
TEST_PASSED=false
6361
else
64-
log_info "Encryption test passed"
62+
log_pass "Encryption test passed"
6563
fi
6664

6765
# Decryption Test
@@ -79,7 +77,7 @@ if [ "$DECRYPT_OUTPUT" != "$EXPECTED_DECRYPT" ]; then
7977
log_info "Got : $DECRYPT_OUTPUT"
8078
TEST_PASSED=false
8179
else
82-
log_info "Decryption test passed"
80+
log_pass "Decryption test passed"
8381
fi
8482

8583
# HMAC-SHA256 Test
@@ -98,7 +96,7 @@ if [ "$HMAC_OUTPUT" != "$EXPECTED_HMAC" ]; then
9896
log_info "Got : $HMAC_OUTPUT"
9997
TEST_PASSED=false
10098
else
101-
log_info "HMAC-SHA256 test passed"
99+
log_pass "HMAC-SHA256 test passed"
102100
fi
103101

104102
# Final Result

0 commit comments

Comments
 (0)