From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 05D59C4345F for ; Thu, 25 Apr 2024 22:41:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hVLkhUbnYpkSr9wmXC6BFG0PrWViIHxpGR95mCFlqD8=; b=ozSILvNE/aclDr uVe2k7KweFWiVfz/+0NJ/ZohvKhcDcIUhSx7iUYq4Xbs4fulTarlml7GfOPhikioeCjbRv2PKP0MM 4eYMhgb3MoJQhmV8lJBbzLBGasEUXbJDN2/CDpj+BgptiVZ+Ot+N1Uh2Q7cgV+PgZZcmxPwAtVYRB xrz2f/VG0edz0si/lKcal82XQV9PWlm+fQWiDsL/3RHhF/xXJQ6PvURCVguO4d9Cner19u0ULTl9P 0oEtHE3471w1zmZo0c89JPS3QCOajP4TdjGQQPqPfCmPH8nWWgYrbyaQ1JzhO1SXfAHnZBRRYIvWX YIyhP77RDGlMiMCwipbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s07mk-0000000AVJ2-1rTx; Thu, 25 Apr 2024 22:41:46 +0000 Received: from out-171.mta1.migadu.com ([95.215.58.171]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s07mh-0000000AVHq-0cS2 for linux-arm-kernel@lists.infradead.org; Thu, 25 Apr 2024 22:41:44 +0000 Date: Thu, 25 Apr 2024 22:41:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1714084898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GCaJfAPaJTJk4qPysJNwA1mMKwjvwJd7/RjWgxHGHyY=; b=flIG79Ky9avijT6lxv6ruTzaWrjTez3ao65sse6mEFWL42L71Fy+HwoaFDVgbhqSQc8Plc 2zVls0Jn+yPxfrWHmLf2RsKd04+qj9yHIh5kAk1zeFvGngWMAknB7HIf4j1elRNjy/VQeD 3uDkbrZxw2MMlKn7IbsrZ3Do8tWuOuc= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Sean Christopherson Cc: Paolo Bonzini , Marc Zyngier , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Muhammad Usama Anjum Subject: Re: [PATCH] KVM: selftest: Define _GNU_SOURCE for all selftests code Message-ID: References: <20240423190308.2883084-1-seanjc@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240423190308.2883084-1-seanjc@google.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240425_154143_551987_27D14E20 X-CRM114-Status: GOOD ( 11.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Apr 23, 2024 at 12:03:08PM -0700, Sean Christopherson wrote: > Define _GNU_SOURCE is the base CFLAGS instead of relying on selftests to > manually #define _GNU_SOURCE, which is repetitive and error prone. E.g. > kselftest_harness.h requires _GNU_SOURCE for asprintf(), but if a selftest > includes kvm_test_harness.h after stdio.h, the include guards result in > the effective version of stdio.h consumed by kvm_test_harness.h not > defining asprintf(): > > In file included from x86_64/fix_hypercall_test.c:12: > In file included from include/kvm_test_harness.h:11: > ../kselftest_harness.h:1169:2: error: call to undeclared function > 'asprintf'; ISO C99 and later do not support implicit function declarations > [-Wimplicit-function-declaration] > 1169 | asprintf(&test_name, "%s%s%s.%s", f->name, > | ^ > > When including the rseq selftest's "library" code, #undef _GNU_SOURCE so > that rseq.c controls whether or not it wants to build with _GNU_SOURCE. > > Reported-by: Muhammad Usama Anjum > Signed-off-by: Sean Christopherson Acked-by: Oliver Upton -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel