commit | c92b55f50ed74951111d81651c5572638dfd7c7d | [log] [tgz] |
---|---|---|
author | Etienne Carriere <etienne.carriere@linaro.org> | Fri Mar 24 10:28:09 2017 +0100 |
committer | Etienne Carriere <etienne.carriere@linaro.org> | Fri Mar 24 10:28:09 2017 +0100 |
tree | a556e3ac8ff70b858648f7bec9b79f26d2c2da27 | |
parent | d701b29b8c4190d9a84f6e78f7c0b95095886961 [diff] |
xtest: minor cleanups in aes/sha performance tests Fix usage info. Fix timing traces (prefer plain ASCII traces 'us' than UTF-8 'µs'). Remove undefined VERSION info. Remove few trailing spaces and empty lines. Add few spaces for source code layout consistency. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
The optee_test git contains the source code for the TEE sanity testsuite in Linux using the ARM(R) TrustZone(R) technology. It is distributed under the GPLv2 and BSD 2-clause open-source licenses. For a general overview of OP-TEE, please see the Notice.md file.
The client applications (optee_test/host/*
) are provided under the GPL-2.0 license. The user TAs (optee_test/ta/*
) are provided under the BSD 2-Clause license.
xtest test suite comes with a standard test suite, freely available. When installing OP-TEE through the manifest, the build component provides the xtest
target which builds optee_test. It makes use of the following environment variables:
CROSS_COMPILE_HOST
: the cross compiler used to compile the Non-Secure Client Application (host/xtest
)CROSS_COMPILE_TA
: the cross compiler used to compile the Trusted Applications (ta
)TA_DEV_KIT_DIR
: the path to the Trusted Application Dev Kit. It can be found in optee_os repository, once optee_os has been compiled.O
: the output repositoryCFG_ARM32=y
must be set.Developers can purchase the Global Platform Compliance Test suite. This test suite comes with .xml files describing the tests and the Trusted Applications.
Standard tests can be extended with the Global Platform test suite. The user must only:
xml
files in $CFG_GP_PACKAGE_PATH
make patch
(or call make xtest-patch
from the build
repository) before compiling xtest. This must be run a single time after the installation of OP-TEE.This will:
ta/GP_xxx
host/xtest
, as for example xtest_9000.c
xtest_7000.c
, adding new tests.Then the tests must be compiled with CFG_GP_PACKAGE_PATH=<path>
.
# all xtest boot and execute on your target $ ifconfig lo 127.0.0.1 $ tee-supplicant & $ xtest # single xtest boot and execute on your target $ ifconfig lo 127.0.0.1 $ tee-supplicant & $ xtest <testnumber> (i.e.: xtest 1001) # family xtest (i.e.: Family 1000) boot and execute on your target $ ifconfig lo 127.0.0.1 $ tee-supplicant & $ xtest _<family> (i.e.: xtest _1) # running all benchmarks (secured storage, aes/sha) boot and execute on your target $ tee-supplicant & $ xtest -t benchmark # running single benchmark boot and execute on your target $ tee-supplicant & $ xtest -t benchmark <benchmark_number> (i.e. xtest 2001)
It's also possible to run SHA/AES benchmarks by using sha-perf/aes-perf modules within xtest. These modules allow to run custom benchmarks with user-defined params.
# running sha-perf with default params boot and execute on your target $ tee-supplicant & $ xtest --sha-perf # getting usage details and list of possible options for sha-perf $ xtest --sha-perf -h
To be able to see the full command when building you could build using following flag:
$ make V=1
To state where build files are stored use the O
flag.
$ make O=$HOME/foo
By default optee_test
expects that optee_client
is located at the same folder level. However if you build optee_client in another location, then you also would need to use (or export) the following flag:
$ make OPTEE_CLIENT_EXPORT=$HOME/my_new_location/out/export
In this project we are trying to adhere to the same coding convention as used in the Linux kernel (see CodingStyle). We achieve this by running checkpatch from Linux kernel. However there are a few exceptions that we had to make since the code also follows GlobalPlatform standards. The exceptions are as follows:
Since checkpatch is licensed under the terms of GNU GPL License Version 2, we cannot include this script directly into this project. Therefore we have written the Makefile so you need to explicitly point to the script by exporting an environment variable, namely CHECKPATCH. So, suppose that the source code for the Linux kernel is at $HOME/devel/linux
, then you have to export like follows:
$ export CHECKPATCH=$HOME/devel/linux/scripts/checkpatch.pl
thereafter it should be possible to use one of the different checkpatch targets in the Makefile. There are targets for checking all files, checking against latest commit, against a certain base-commit etc. For the details, read the Makefile.