diff --git a/framework b/framework index 071831e25bd3..bd5aa89e0a87 160000 --- a/framework +++ b/framework @@ -1 +1 @@ -Subproject commit 071831e25bd336baa58bbdf65e985283f56e1b86 +Subproject commit bd5aa89e0a87ad8821f86f31f5745e63ac5454c1 diff --git a/scripts/abi_check.py b/scripts/abi_check.py index f91d80e50410..d3a6a0d100ba 100755 --- a/scripts/abi_check.py +++ b/scripts/abi_check.py @@ -549,7 +549,8 @@ def check_for_abi_changes(self): def run_main(): try: parser = argparse.ArgumentParser( - description=__doc__ + description=__doc__, + allow_abbrev=False ) parser.add_argument( "-v", "--verbose", action="store_true", diff --git a/scripts/assemble_changelog.py b/scripts/assemble_changelog.py index 07e6fc58ac23..6cbf11bec802 100755 --- a/scripts/assemble_changelog.py +++ b/scripts/assemble_changelog.py @@ -499,7 +499,8 @@ def set_defaults(options): def main(): """Command line entry point.""" - parser = argparse.ArgumentParser(description=__doc__) + parser = argparse.ArgumentParser(description=__doc__, + allow_abbrev=False) parser.add_argument('--dir', '-d', metavar='DIR', default='ChangeLog.d', help='Directory to read entries from' diff --git a/scripts/code_size_compare.py b/scripts/code_size_compare.py index 50749b6a8b4b..75c56e28f4d1 100755 --- a/scripts/code_size_compare.py +++ b/scripts/code_size_compare.py @@ -857,7 +857,8 @@ def get_comparision_results(self) -> None: self.gen_code_size_comparison() def main(): - parser = argparse.ArgumentParser(description=(__doc__)) + parser = argparse.ArgumentParser(description=(__doc__), + allow_abbrev=False) group_required = parser.add_argument_group( 'required arguments', 'required arguments to parse for running ' + os.path.basename(__file__)) diff --git a/scripts/code_style.py b/scripts/code_style.py index d3f89d913013..153097fe00c1 100755 --- a/scripts/code_style.py +++ b/scripts/code_style.py @@ -224,7 +224,7 @@ def main() -> int: print("Note: The only supported version is " + UNCRUSTIFY_SUPPORTED_VERSION) - parser = argparse.ArgumentParser() + parser = argparse.ArgumentParser(allow_abbrev=False) parser.add_argument('-f', '--fix', action='store_true', help=('modify source files to fix the code style ' '(default: print diff, do not modify files)')) diff --git a/scripts/config.py b/scripts/config.py index 8704bdb51ea3..e3aee392f74b 100755 --- a/scripts/config.py +++ b/scripts/config.py @@ -494,8 +494,9 @@ def write(self, filename=None): def main(): """Command line mbedtls_config.h manipulation tool.""" parser = argparse.ArgumentParser(description=""" - Mbed TLS configuration file manipulation tool. - """) + Mbed TLS configuration file manipulation tool. + """, + allow_abbrev=False) parser.add_argument('--file', '-f', help="""File to read (and modify if requested). Default: {}. diff --git a/scripts/generate_driver_wrappers.py b/scripts/generate_driver_wrappers.py index 0f0c8c7be1aa..838ef02e3fa1 100755 --- a/scripts/generate_driver_wrappers.py +++ b/scripts/generate_driver_wrappers.py @@ -167,7 +167,7 @@ def main() -> int: """ def_arg_project_root = build_tree.guess_project_root() - parser = argparse.ArgumentParser() + parser = argparse.ArgumentParser(allow_abbrev=False) parser.add_argument('--project-root', default=def_arg_project_root, help='root directory of repo source code') parser.add_argument('--template-dir', diff --git a/scripts/generate_ssl_debug_helpers.py b/scripts/generate_ssl_debug_helpers.py index 600d16096eaa..33470eae10ba 100755 --- a/scripts/generate_ssl_debug_helpers.py +++ b/scripts/generate_ssl_debug_helpers.py @@ -400,7 +400,7 @@ def main(): """ Command line entry """ - parser = argparse.ArgumentParser() + parser = argparse.ArgumentParser(allow_abbrev=False) parser.add_argument('--mbedtls-root', nargs='?', default=None, help='root directory of mbedtls source code') parser.add_argument('output_directory', nargs='?', diff --git a/scripts/min_requirements.py b/scripts/min_requirements.py index b36f90662246..b1b69a13e5a1 100755 --- a/scripts/min_requirements.py +++ b/scripts/min_requirements.py @@ -94,7 +94,8 @@ def install( def main() -> None: """Command line entry point.""" - parser = argparse.ArgumentParser(description=__doc__) + parser = argparse.ArgumentParser(description=__doc__, + allow_abbrev=False) parser.add_argument('--no-act', '-n', action='store_true', help="Don't act, just print what will be done") diff --git a/tests/scripts/analyze_outcomes.py b/tests/scripts/analyze_outcomes.py index 58c17831aede..6a2403120c50 100755 --- a/tests/scripts/analyze_outcomes.py +++ b/tests/scripts/analyze_outcomes.py @@ -723,7 +723,8 @@ def main(): main_results = Results() try: - parser = argparse.ArgumentParser(description=__doc__) + parser = argparse.ArgumentParser(description=__doc__, + allow_abbrev=False) parser.add_argument('outcomes', metavar='OUTCOMES.CSV', help='Outcome file to analyze') parser.add_argument('specified_tasks', default='all', nargs='?', diff --git a/tests/scripts/audit-validity-dates.py b/tests/scripts/audit-validity-dates.py index 3d0924602ce6..ad8579012704 100755 --- a/tests/scripts/audit-validity-dates.py +++ b/tests/scripts/audit-validity-dates.py @@ -385,7 +385,8 @@ def main(): """ Perform argument parsing. """ - parser = argparse.ArgumentParser(description=__doc__) + parser = argparse.ArgumentParser(description=__doc__, + allow_abbrev=False) parser.add_argument('-a', '--all', action='store_true', diff --git a/tests/scripts/check_files.py b/tests/scripts/check_files.py index 2a5d64b79fbb..a354bc812211 100755 --- a/tests/scripts/check_files.py +++ b/tests/scripts/check_files.py @@ -531,7 +531,8 @@ def output_issues(self): def run_main(): - parser = argparse.ArgumentParser(description=__doc__) + parser = argparse.ArgumentParser(description=__doc__, + allow_abbrev=False) parser.add_argument( "-l", "--log_file", type=str, help="path to optional output log", ) diff --git a/tests/scripts/check_names.py b/tests/scripts/check_names.py index 5128dc8e0d1a..59331d84bdd6 100755 --- a/tests/scripts/check_names.py +++ b/tests/scripts/check_names.py @@ -929,7 +929,8 @@ def main(): "This script confirms that the naming of all symbols and identifiers " "in Mbed TLS are consistent with the house style and are also " "self-consistent.\n\n" - "Expected to be run from the Mbed TLS root directory.") + "Expected to be run from the Mbed TLS root directory."), + allow_abbrev=False ) parser.add_argument( "-v", "--verbose", diff --git a/tests/scripts/check_test_cases.py b/tests/scripts/check_test_cases.py index d67e6781b4ef..b53c53872ead 100755 --- a/tests/scripts/check_test_cases.py +++ b/tests/scripts/check_test_cases.py @@ -209,7 +209,8 @@ def process_test_case(self, per_file_state, seen[description] = line_number def main(): - parser = argparse.ArgumentParser(description=__doc__) + parser = argparse.ArgumentParser(description=__doc__, + allow_abbrev=False) parser.add_argument('--list-all', action='store_true', help='List all test cases, without doing checks') diff --git a/tests/scripts/depends.py b/tests/scripts/depends.py index 1990cd21cabf..c831cd79a0ab 100755 --- a/tests/scripts/depends.py +++ b/tests/scripts/depends.py @@ -504,7 +504,8 @@ def main(): "Example usage:\n" r"./tests/scripts/depends.py \!MBEDTLS_SHA1_C MBEDTLS_SHA256_C""\n" "./tests/scripts/depends.py MBEDTLS_AES_C hashes\n" - "./tests/scripts/depends.py cipher_id cipher_chaining\n") + "./tests/scripts/depends.py cipher_id cipher_chaining\n", + allow_abbrev=False) parser.add_argument('--color', metavar='WHEN', help='Colorize the output (always/auto/never)', choices=['always', 'auto', 'never'], default='auto') diff --git a/tests/scripts/generate_server9_bad_saltlen.py b/tests/scripts/generate_server9_bad_saltlen.py index 9af4dd3b6dda..943b9615541a 100755 --- a/tests/scripts/generate_server9_bad_saltlen.py +++ b/tests/scripts/generate_server9_bad_saltlen.py @@ -47,7 +47,7 @@ def build_argparser(parser): def main(): - parser = argparse.ArgumentParser() + parser = argparse.ArgumentParser(allow_abbrev=False) build_argparser(parser) args = parser.parse_args() diff --git a/tests/scripts/generate_tls13_compat_tests.py b/tests/scripts/generate_tls13_compat_tests.py index dde37b765d62..ef75768529c7 100755 --- a/tests/scripts/generate_tls13_compat_tests.py +++ b/tests/scripts/generate_tls13_compat_tests.py @@ -557,7 +557,7 @@ def main(): """ Main function of this program """ - parser = argparse.ArgumentParser() + parser = argparse.ArgumentParser(allow_abbrev=False) parser.add_argument('-o', '--output', nargs='?', default=None, help='Output file path if `-a` was set') diff --git a/tests/scripts/list_internal_identifiers.py b/tests/scripts/list_internal_identifiers.py index b648ce24f254..1dc673789fc5 100755 --- a/tests/scripts/list_internal_identifiers.py +++ b/tests/scripts/list_internal_identifiers.py @@ -26,7 +26,8 @@ def main(): description=( "This script writes a list of parsed identifiers in internal " "headers to \"identifiers\". This is useful for generating a list " - "of names to exclude from API/ABI compatibility checking. ")) + "of names to exclude from API/ABI compatibility checking. "), + allow_abbrev=False) parser.parse_args() diff --git a/tests/scripts/psa_collect_statuses.py b/tests/scripts/psa_collect_statuses.py index 11bbebcc1f00..515ad0f665f4 100755 --- a/tests/scripts/psa_collect_statuses.py +++ b/tests/scripts/psa_collect_statuses.py @@ -100,7 +100,8 @@ def collect_status_logs(options): return data def main(): - parser = argparse.ArgumentParser(description=globals()['__doc__']) + parser = argparse.ArgumentParser(description=globals()['__doc__'], + allow_abbrev=False) parser.add_argument('--clean-after', action='store_true', help='Run "make clean" after rebuilding') diff --git a/tests/scripts/run_demos.py b/tests/scripts/run_demos.py index 6a63d232fe43..32d77d620eef 100755 --- a/tests/scripts/run_demos.py +++ b/tests/scripts/run_demos.py @@ -51,7 +51,8 @@ def run_all_demos(quiet=False): return run_demos(all_demos, quiet=quiet) def main(): - parser = argparse.ArgumentParser(description=__doc__) + parser = argparse.ArgumentParser(description=__doc__, + allow_abbrev=False) parser.add_argument('--quiet', '-q', action='store_true', help="suppress the output of demos") diff --git a/tests/scripts/test_config_script.py b/tests/scripts/test_config_script.py index e500b3362f96..d7d1909e6ba5 100755 --- a/tests/scripts/test_config_script.py +++ b/tests/scripts/test_config_script.py @@ -154,7 +154,8 @@ def run_all(options): def main(): """Command line entry point.""" parser = argparse.ArgumentParser(description=__doc__, - formatter_class=argparse.RawDescriptionHelpFormatter) + formatter_class=argparse.RawDescriptionHelpFormatter, + allow_abbrev=False) parser.add_argument('-d', metavar='DIR', dest='output_directory', required=True, help="""Output directory.""") diff --git a/tests/scripts/test_psa_compliance.py b/tests/scripts/test_psa_compliance.py index f7d18954cada..36e1bb039b17 100755 --- a/tests/scripts/test_psa_compliance.py +++ b/tests/scripts/test_psa_compliance.py @@ -148,7 +148,7 @@ def main(library_build_dir: str): BUILD_DIR = 'out_of_source_build' # pylint: disable=invalid-name - parser = argparse.ArgumentParser() + parser = argparse.ArgumentParser(allow_abbrev=False) parser.add_argument('--build-dir', nargs=1, help='path to Mbed TLS / TF-PSA-Crypto build directory') args = parser.parse_args() diff --git a/tests/scripts/test_psa_constant_names.py b/tests/scripts/test_psa_constant_names.py index 86d9e6f2be14..925614aa1e0a 100755 --- a/tests/scripts/test_psa_constant_names.py +++ b/tests/scripts/test_psa_constant_names.py @@ -159,7 +159,8 @@ def report(self, out: typing_util.Writable) -> None: TEST_SUITES = ['tests/suites/test_suite_psa_crypto_metadata.data'] def main(): - parser = argparse.ArgumentParser(description=globals()['__doc__']) + parser = argparse.ArgumentParser(description=globals()['__doc__'], + allow_abbrev=False) parser.add_argument('--include', '-I', action='append', default=['include'], help='Directory for header files') diff --git a/tests/scripts/translate_ciphers.py b/tests/scripts/translate_ciphers.py index 90514fca150b..0e2631bc9d75 100755 --- a/tests/scripts/translate_ciphers.py +++ b/tests/scripts/translate_ciphers.py @@ -173,7 +173,7 @@ def main(target, names): print(format_ciphersuite_names(target, names)) if __name__ == "__main__": - PARSER = argparse.ArgumentParser() + PARSER = argparse.ArgumentParser(allow_abbrev=False) PARSER.add_argument('target', metavar='TARGET', choices=['o', 'g', 'm']) PARSER.add_argument('names', metavar='NAMES', nargs='+') ARGS = PARSER.parse_args()