From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 002B22E09E for ; Fri, 6 Sep 2024 17:52:20 +0200 (CEST) Received: (qmail 25719 invoked by uid 550); 6 Sep 2024 15:52:16 -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 25684 invoked from network); 6 Sep 2024 15:52:15 -0000 Date: Fri, 6 Sep 2024 17:46:26 +0200 From: Szabolcs Nagy To: "Gardner, Ryan P" Cc: "musl@lists.openwall.com" Message-ID: <20240906154626.GB2724612@port70.net> Mail-Followup-To: "Gardner, Ryan P" , "musl@lists.openwall.com" References: <5f0aa778c8744d6fa08cda40e553ee4b@boeing.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5f0aa778c8744d6fa08cda40e553ee4b@boeing.com> Subject: Re: [musl] Storing common macros and function stubs in libc-test * Gardner, Ryan P [2024-09-06 01:36:17 +0000]: > Hello, > > I am currently writing some test cases to contribute to libc-test. > In regards to reusing common macros and function stubs, where would > be the most appropriate place to put these? Should these be added > to `test.h`? Would a new `utils.h` header file be more appropriate? > A new file would ensure no rework/unexpected redefines with already > existing tests. Or should the macros needed for a given test be > defined within that test file, even if many tests use the same > macros. For example #define TEST(c, ...). if the macro definition is relatively simple then keep it in the test so users can more easily use the test outside the test system. otherwise if you need a lot of shared macros then utils.h is fine.