From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4812 invoked from network); 20 Sep 2020 19:22:08 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 20 Sep 2020 19:22:08 -0000 Received: (qmail 9454 invoked by uid 550); 20 Sep 2020 19:22:03 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 9436 invoked from network); 20 Sep 2020 19:22:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1600629711; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=SGFlmvYkRnodZMXAFrHgL+N+M75KDNz84OCJf0ARX+8=; b=MrUzeN1NGPhNQgftM9yzSQ12Pvfgd0DK1NROnb186Y5JKzxkmjZHyr0RnByo04e497 csE9O3d4h/2iMOES7OiXZctdwfQdOq/99XOmxROf3XzyT43P8njJ953vFIAEWojZADqR 2ZqxWH6uxdADGqdIQdu8bZp7961WV9xelHa7ITKIB0i2G+WbCXc3KxmdEUaihwKBiahi ysEpE2xRrBed/A4PfMRNPgS6D+TnUHDTT/h/V9WIHMgCOp92u8o2+o+SyqbRCjCM+Xng x0Hbj7OSDOsl5PVl4e3U9H721ZuYtodRzsEG+N/3A+zKHS0S/6xev/qEVutCqEQIy4Rs ybtQ== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqfyyPs=" X-RZG-CLASS-ID: mo00 From: Bruno Haible To: Rich Felker Cc: "Dmitry V. Levin" , config-patches@gnu.org, musl@lists.openwall.com Date: Sun, 20 Sep 2020 21:21:48 +0200 Message-ID: <2533200.g9kxISXj3W@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-189-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20200920171446.GB3265@brightrain.aerifal.cx> References: <4768019.hHWyC0TzgU@omega> <20200920135629.GI2947641@port70.net> <20200920171446.GB3265@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Subject: Re: [musl] Re: OS detection wrong on Alpine Linux 3.10 Rich, POSIX =E2=80=94 like many other standard =E2=80=94 allows different impleme= ntations 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