summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2017-06-23 17:19:02 +0800
committerChase Qi <chase.qi@linaro.org>2017-06-23 17:19:02 +0800
commit7ff2c8933af1d44175ad4f38e69fba8eba9c5565 (patch)
tree44640a23cacb078d2db875afef79c6c45f356f43
parent2c4416c7515d0f4b740a6b71ad7ecd9b18f01b58 (diff)
linux: openssl: fix line break within awk statement
The current direct line break within single quotes causes the following strange output, only the last two lines are expected. Using backslash for line break solves this issue. rsa2048-sign pass in sign/s rsa2048-verify pass 10.00s verify/s rsa2048-sign pass in sign/s rsa2048-verify pass 10.00s verify/s rsa2048-sign pass May sign/s rsa2048-verify pass 2016 verify/s rsa2048-sign pass 00:08:40 sign/s rsa2048-verify pass 2017 verify/s rsa2048-sign pass aes(partial) sign/s rsa2048-verify pass blowfish(ptr) verify/s rsa2048-sign pass -Wa,--noexecstack sign/s rsa2048-verify pass -Wall verify/s rsa2048-sign pass sign/s sign/s rsa2048-verify pass verify/s verify/s rsa 2048 bits 0.008347s 0.000209s 119.8 4789.6 rsa2048-sign pass 119.8 sign/s rsa2048-verify pass 4789.6 verify/s Change-Id: I4d68a95f3db0ec5b2c7c67d9ff236a834f8723af Signed-off-by: Chase Qi <chase.qi@linaro.org>
-rwxr-xr-xautomated/linux/openssl/openssl-speed.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/automated/linux/openssl/openssl-speed.sh b/automated/linux/openssl/openssl-speed.sh
index a70db1b..a846508 100755
--- a/automated/linux/openssl/openssl-speed.sh
+++ b/automated/linux/openssl/openssl-speed.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+# shellcheck disable=SC1004
+# shellcheck disable=SC1091
. ../../lib/sh-test-lib
OUTPUT="$(pwd)/output"
@@ -37,8 +39,8 @@ for test in ${cipher_commands}; do
case "${test}" in
# Parse asymmetric encryption output.
rsa2048|dsa2048)
- awk -v test_case_id="${test}" 'match($1$2, test_case_id)
- {printf("%s-sign pass %s sign/s\n", test_case_id, $(NF-1));
+ awk -v test_case_id="${test}" 'match($1$2, test_case_id) \
+ {printf("%s-sign pass %s sign/s\n", test_case_id, $(NF-1)); \
printf("%s-verify pass %s verify/s\n", test_case_id, $NF)}' \
"${OUTPUT}/${test}-output.txt" | tee -a "${RESULT_FILE}"
;;