@@ -664,7 +664,13 @@ EXAMPLE USAGE
664
664
Build the library:
665
665
mtest
666
666
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:
668
674
mtest shax -A
669
675
670
676
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
678
684
679
685
Report library size, as built by armclang -Oz with TF-M configuration for armv8 thumb2:
680
686
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)
683
689
684
690
Build aes.o multiple times, with every combination of the given options:
685
691
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
686
692
687
- Disassemble cmac.o
693
+ Disassemble cmac.o:
688
694
mtest cmac.o -d
689
695
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
692
698
'''
693
699
694
700
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
699
705
Architectures: { ", " .join (ARM_ISAS )} , armv5, ..., armv8 or e.g. armv7-thumb2
700
706
{ ", " .join (ARCHS )}
701
707
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.
703
710
Iterate over the cross-product of options X,Y,Z by specifying a comma-separated list of config options.
704
711
The original config files will be restored when mtest exits.
705
712
Build targets: build the library by default, or files (e.g. aes.o), programs (e.g. selftest) or tests (as above)'''
0 commit comments