coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests: mktemp: add tests for invalid Unicode options


From: Pádraig Brady
Subject: Re: [PATCH] tests: mktemp: add tests for invalid Unicode options
Date: Mon, 5 Jan 2026 12:54:06 +0000
User-agent: Mozilla Thunderbird Beta

On 05/01/2026 00:54, Collin Funk wrote:
* init.cfg (bad_unicode): New function, copied from
tests/fold/fold-characters.sh with the NUL removed.
* tests/fold/fold-characters.sh (bad_unicode): Rename to
bad_unicode_with_nul. Reformat long line.
* tests/mktemp/bad-unicode.sh: New test.
* tests/local.mk (all_tests): Add the new test.

There were a few issues with this:

It's actually creating files, and theoretically some file systems
may reject the bad unicode, which would induce a false failure.

Also it's better to use a cleanup_() function to remove files etc.
to handle the case where a test is terminated early.

Both the above issues can be avoided by passing -u to mktemp,
so that it only does internal processing.

There were typos with --tempdir and test -z.

The tests/misc/mktemp.pl should be moved to
the tests/mktemp dir as part of this.

I've attached the updated test I was checking with.

cheers,
Padraig

Attachment: bad-unicode.sh
Description: application/shellscript


reply via email to

[Prev in Thread] Current Thread [Next in Thread]