Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scripts/mbedtls_framework/psa_compliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ def main(psa_arch_tests_ref: str,
expected_failures_list = expected_failures

if args.patch_directory:
patch_files = glob.glob(os.path.join(args.patch_directory, '*.patch'))
patch_file_glob = os.path.join(args.patch_directory, '*.patch')
patch_files = sorted(glob.glob(patch_file_glob))
Comment on lines +181 to +182
Copy link
Contributor

@bensze01 bensze01 Sep 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This allows users to pass a patch_directory containing literal glob characters, which might lead to unexpected results.

glob.glob also silently ignores non-existent patch directories

Something like

patch_files = sorted(pathlib.Path(patch_directory).glob('*.patch'))

Would allow us to separate the glob from the user input

else:
patch_files = []

Expand Down