Re: Get 6 FAIL on testsuites - have figured cause for 3 of them.

David Leonard via busybox <[email protected]> Tue, 5 May 2026 13:19:11 +1000 (AEST)
Newsgroups gmane.linux.busybox
Message-ID <[email protected]>
On Sun, 3 May 2026, Michael D. Setzer II via busybox wrote:

> First is cat date-works | head -n 5
> dt=`busybox date`
> # Expected format: Fri Apr 25 03:47:55 CEST 2008
> dt=`echo "$dt" | sed 's/^[^ ][^ ][^ ] [^ ][^ ][^ ] [ 0123][0-9]
> [012][0-9]:[0-5][0-9]:[0-6][0-9] [A-Z][A-Z]* [012][0-9][0-9][0-9]$/OK/'`
> test x"$dt" = x"OK"
>
> Issue is the test is looking for the first to letters of Timezone to be
> in Caps? But in Guam the timezone has second letter as lower case.
>
> # date
> Sun May  3 11:10:51 PM ChST 2026
> # busybox date
> Sun May  3 23:11:14 ChST 2026
>
> Changing the [A-Z][A-Z] to one of these has it work.
> [A-Z][A-Za-z]
> [A-Z][A-Zh]
> [A-Z][[:alpha:]]
>
> As far as I can tell ChST is only timezone with a lower case letter??
>
> So cosmetic and only seems to effect someone using ChST?

I feel such a test should probably be run with specific timezones
like TZ=UTC0 or TZ=xyz10 to make it a bit less fragile with environment
changes.

POSIX.1-2024 says that the timezone designator in $TZ should be

| All characters between these quoting characters shall be alphanumeric
| characters from the portable character set in the current locale, the
| <plus-sign> ('+') character, or the <hyphen-minus> ('-') character.

https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap08.html

So the most accommodating regex I suppose is: [[-+:alnum:]]+

> Other two are ls-s-works  and ls-l-works
>
> Both note the missing total line at top, but there also seems
> difference with an SELINUX . "x." or "-.", and spacing.
> On Fedora 43 machine get.
>
> # LC_ALL=C ls -l ".." | head -n 5
> total 1048
> -rw-r--r--. 1 root root  2052 May  3 03:33 README
> -rw-r--r--. 1 root root   983 May  3 03:33 TODO
> -rwxr-xr-x. 1 root root  2703 May  3 03:33 all_sourcecode.tests
> -rwxr-xr-x. 1 root root   747 May  3 03:33 ar.tests
> # LC_ALL=C busybox ls -l ".." | head -n 4
> -rw-r--r--    1 root     root          2052 May  3 03:33 README
> -rw-r--r--    1 root     root           983 May  3 03:33 TODO
> -rwxr-xr-x    1 root     root          2703 May  3 03:33
> all_sourcecode.tests
> -rwxr-xr-x    1 root     root           747 May  3 03:33 ar.tests
>
> Not sure they should be FAIL?

POSIX.1-2024 permits a single non-space character after permissions:

| The <optional alternate access method flag> shall be the empty string if
| there is no alternate or additional access control method associated with
| the file; otherwise, it shall be a string containing a single printable
| character that is not a <blank>.
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/ls.html

The tests should probably accommodate that.


I think the spacing tests should be more flexible. POSIX.1-2024
gives the following format for plain files in ls's long output:

| "%s %u %s %s %u %s %s\n", <file mode>, <number of links>,
|     <owner name>, <group name>, <size>, <date and time>,
|     <pathname>
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/ls.html

and the Rationale section explains how the spaces above are flexible:

| The notation for spaces allows some flexibility for application output.
| Note that an empty character position in format represents one or more
| <blank> characters on the output (not white space, which can include
| <newline> characters).
https://pubs.opengroup.org/onlinepubs/9799919799/xrat/V4_xbd_chap01.html#tag_21_05