![]() |
|
Message-ID: <aN09fTNSGJEY4M8G@pie> Date: Wed, 1 Oct 2025 14:41:01 +0000 From: Yao Zi <ziyao@...root.org> To: musl@...ts.openwall.com Cc: Celeste Liu <uwu@...lacanthus.name> Subject: Re: Running os-test on musl's POSIX headers On Mon, Sep 29, 2025 at 04:34:22PM +0200, Jonas 'Sortie' Termansen wrote: > Hi musl, > > You might be interested in the os-test project I've been building > lately. The new include test suite checks whether the standard library > headers declare everything that POSIX.1-2024 requires, sliced by each > option group: > > https://sortix.org/os-test/include/ for the raw data > https://sortix.org/blog/os-testing-posix-headers/ for a write-up about > the results Nice work! But when I forwarded the link to my friends, she pointed out there're some problems in the Linux (glibc) section of the blog. Precisely saying, about struct flock's definition, it's described as struct flock { /* ... */ int l_whence; int l_type; }; However, glibc does define flock.l_{whence,type} as int[1] on Linux, and passed the corresponding test! It's actually glibc on Hurd[2] failing to do so. Here's her Reported-by: Reported-by: Celeste Liu <uwu@...lacanthus.name> and I CC'ed her, too. I think the statistics listed in the table should be correct, since glibc (on Linux) is correctly listed as passed struct-flock-l_{type,whence} in it. > I'm pleased to say that musl is actually the top scoring libc in terms > of POSIX completeness at 96%, slightly ahead of glibc and Illumos! > musl is also the only libc that doesn't have any incompatible function > type signatures. Musl really does a good work in this! > There are a few feature macros that should adjusted in the headers for > POSIX,1.-2024. The pthread_mutexattr_[gs]etprioceiling functions are > declared but cannot be linked with. Otherwise the interesting results > are basically just missing declarations, generally for new POSIX.1-2024 > stuff. You can also compare with the glibc results or those of other > systems if you're curious. If you're interested using this project to > improve musl interoperability, then please dive into the data and have > a look :) > > This work has been inspired by the methodology of libc-test. os-test > has been funded and next up I'll be working on namespace pollution > and seeing if functions actually work if invoked. > > Jonas > Best regards, Yao Zi [1]: https://github.com/bminor/glibc/blob/a8ad2e9e431bac3ea207be07c64cddb72c290cde/sysdeps/unix/sysv/linux/x86/bits/fcntl.h#L37-L38 [2]: https://sortix.org/os-test/include/fcntl/struct-flock-l_type.hurd.err
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.