Skip to content

Commit 859df92

Browse files
committed
Improve help
Signed-off-by: Dave Rodgman <[email protected]>
1 parent 09e5bdf commit 859df92

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

tools/bin/mtest

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,13 @@ EXAMPLE USAGE
664664
Build the library:
665665
mtest
666666
667-
Test sha functions under ASAN
667+
Build with modified configuration:
668+
mtest MBEDTLS_CIPHER_MODE_XTS -MBEDTLS_CIPHER_MODE_CTR # enable XTS, and disable CTR
669+
mtest config-thread # use "configs/config-thread.h"
670+
mtest baremetal # use baremetal preset from config.py
671+
mtest baremetal -MBEDTLS_CIPHER_MODE_CBC # baremetal, with CBC disabled
672+
673+
Test sha functions under ASAN:
668674
mtest shax -A
669675
670676
Build and run all the aes tests, with clang and gcc, with MBEDTLS_AESCE_C set and MBEDTLS_AESNI_C unset:
@@ -678,17 +684,17 @@ mtest -k alignment
678684
679685
Report library size, as built by armclang -Oz with TF-M configuration for armv8 thumb2:
680686
mtest -S
681-
mtest -S clang # as above, but use clang instead of the default armclang
682-
mtest -S MBEDTLS_P256M_EXAMPLE_DRIVER_ENABLED # as above, but modify TF-M config with given option(s)
687+
mtest -S clang-16 # as above, but use clang-16 instead of the default armclang
688+
mtest -S MBEDTLS_P256M_EXAMPLE_DRIVER_ENABLED # as above, but modify TF-M config with given option(s)
683689
684690
Build aes.o multiple times, with every combination of the given options:
685691
mtest aes.o MBEDTLS_AES_SETKEY_ENC_ALT,MBEDTLS_AES_DECRYPT_ALT,MBEDTLS_AES_ROM_TABLES,MBEDTLS_AES_ENCRYPT_ALT,MBEDTLS_AES_SETKEY_DEC_ALT,MBEDTLS_AES_FEWER_TABLES,MBEDTLS_PADLOCK_C
686692
687-
Disassemble cmac.o
693+
Disassemble cmac.o:
688694
mtest cmac.o -d
689695
690-
Disassemble mbedtls_xor for arm, built with clang -Os
691-
mtest -d mbedtls_xor -Os clang arm
696+
Disassemble mbedtls_xor for arm, built with gcc-12 -Os:
697+
mtest -d mbedtls_xor -Os gcc-12 arm
692698
'''
693699

694700
REST_HELP = f'''Optional list of tests, compilers, flags, architectures, config options and build targets.
@@ -699,7 +705,8 @@ Flags: anything starting with a '-' will get passed to CFLAGS if not recognised
699705
Architectures: {", ".join(ARM_ISAS)}, armv5, ..., armv8 or e.g. armv7-thumb2
700706
{", ".join(ARCHS)}
701707
Config options: individual options are set with e.g. MBEDTLS_AESCE_C, or unset with e.g. -PSA_WANT_ALG_MD5.
702-
Options recognised by scripts/config.py are permitted (e.g. "baremetal"), or any ".h" file.
708+
Options recognised by scripts/config.py are permitted (e.g. "baremetal").
709+
Passing a file from configs/ (e.g. "config-tfm") or any ".h" file will replace the existing config file.
703710
Iterate over the cross-product of options X,Y,Z by specifying a comma-separated list of config options.
704711
The original config files will be restored when mtest exits.
705712
Build targets: build the library by default, or files (e.g. aes.o), programs (e.g. selftest) or tests (as above)'''

0 commit comments

Comments
 (0)