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,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14955 invoked from network); 20 Sep 2020 20:58:54 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 20 Sep 2020 20:58:54 -0000 Received: (qmail 18386 invoked by uid 550); 20 Sep 2020 20:58:52 -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 18368 invoked from network); 20 Sep 2020 20:58:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1600635520; bh=OP9pxepqAL5BWroWULrMEdZ2bfAOr0kkQgmhXXj/Jek=; h=Date:From:To:Subject:From; b=YBYk54iNW08rqjmf3eXvVNxN3NUYDFpPMDBFf+kg/NonoFFTgfnFg/hs87sgG1g8p HuW+Ssspu3Ag8WDTEJLQZ5eAP/4y9s/Tu2c5S1BcCOvpnRuv9oj8ZhfVne4DNxy7Pf ZOH+RPIhbZxJU7hfgeshRAIBu/kdcFi1v8BfUkBb6ItSHhwLD0+X0cZE3XK4Um4JSz W7A11lPaqVen5cy+GLNcKRSCd7FG2odferizaPjGQVu1P+QYoP0ypESmpvDyWXJ60b MlrNO8O7C5GMqfGEkvSZz0JHQilq6z/v0BN86F4M9/cnVRvRMvqWvUmpE1r5JdK8Co xyWzYK0Q6Rr7Q== Date: Sun, 20 Sep 2020 22:58:31 +0200 From: Hadrien Lacour To: musl@lists.openwall.com Message-ID: <20200920205831.jb2jbkzfvvb2mws4@gentoo-zen2700x> References: <4768019.hHWyC0TzgU@omega> <20200920135629.GI2947641@port70.net> <20200920171446.GB3265@brightrain.aerifal.cx> <2533200.g9kxISXj3W@omega> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2533200.g9kxISXj3W@omega> Subject: Re: [musl] Re: OS detection wrong on Alpine Linux 3.10 On Sun, Sep 20, 2020 at 09:21:48PM +0200, Bruno Haible wrote: > 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 > Sorry to waltz in like this but isn't it bad practice in general to rely on implementation-defined behaviours?