[PATCH v2 0/2] fortify: test_fortify.sh: Improve handling of tempfile

From: Nicolas Schier

Date: Wed Jan 14 2026 - 08:57:32 EST


WangYuli reported [1] that the temporary file created by test_fortify.sh
is recognised by git as untracked file, especially if it remains after
non-common exits of test_fortify.sh (e.g. killed by signal).

The following two patches handle that by renaming the temporary file and
by cleaning up the file in more situations.

Link: https://lore.kernel.org/linux-kbuild/20251112114725.287349-1-wangyuli@xxxxxxx/ # [1]
Signed-off-by: Nicolas Schier <nsc@xxxxxxxxxx>
---
Changes in v2:
* Fixed author/trailer inconsistency (Nathan)
* Added review trailers
* Link to v1: https://patch.msgid.link/20251128-fortify-improve-handling-of-tempfile-v1-0-a79d0d3abcac@xxxxxxxxxx

---
Nicolas Schier (2):
fortify: Rename temporary file to match ignore pattern
fortify: Cleanup temp file also on non-successful exit

lib/test_fortify/test_fortify.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
change-id: 20251128-fortify-improve-handling-of-tempfile-2d2ac64ba4aa

Best regards,
--
Nicolas