config-patches
[Top][All Lists]
Advanced

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

Re: [musl] Re: OS detection wrong on Alpine Linux 3.10


From: Bruno Haible
Subject: Re: [musl] Re: OS detection wrong on Alpine Linux 3.10
Date: Sun, 20 Sep 2020 21:21:48 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-189-generic; KDE/5.18.0; x86_64; ; )

Rich,

POSIX — like many other standard — allows different implementations to
behave differently. For example, iconv_open() and setlocale() behave
differently in different POSIX-compliant libc implementations. This is
OK. There is nothing wrong with it on either side.

Unit tests [1] need to take into account the actual behaviour of the
software. It is normal that a unit test's core function produces a
different result with musl than with glibc. The "expected outcome"
part of the unit test, in this case, needs to be different. This is
an actual, practical need to know whether the config triple ends in
linux-gnu vs. linux-musl.

> There is one kinda legitimate purpose for detecting specifically musl:

It is not your role to tell us which code we write is "legitimate" and
which code is not. I am a grown-up programmer.

Bruno

[1] https://en.wikipedia.org/wiki/Unit_testing




reply via email to

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