From patchwork Fri Sep 20 19:01:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1988020 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=eMdZvEti; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X9MFD2X13z1y2J for ; Sat, 21 Sep 2024 05:01:51 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 74BBF385842C for ; Fri, 20 Sep 2024 19:01:49 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id EA8B13858D39 for ; Fri, 20 Sep 2024 19:01:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EA8B13858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EA8B13858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1726858893; cv=none; b=YNmSYmoS80P6HGoy9KZsZngMM8z75WhjndTqAo1LKRLDSK9DWzkyyQiyQH1gTPCrR10yDC8sBSGVEGWNaH9XONx0cLHX7t89Z7m6Tcl9W3dijhSPVOH1qwNtBEd0m98/f9oPWxPONk6VtNl/PgR59ktb6je22KyAfWLhp8yHG5I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1726858893; c=relaxed/simple; bh=HHwawtAwiNQgn3Ows8/hOVkCsWvn9H46cVSs/Uv9SCE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=by/a6AschBALPYPSeL3FQfmk2ZmcvLOGkBp5+4BZe3Udqjog/lGkfpu6krwsKwJ3ElG/1jCqWKi9iGC1CBiUqdTGCfKosc0dcCWir6DmuBvq4LWKLU9BguShiPvFZhx+Rt8meiacxBWrIpB5VkDxV+triikhzf4HSpi6pcVx4e8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726858890; 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: content-transfer-encoding:content-transfer-encoding; bh=CGvdS5f5SrtPZ3NKeMRQAuELsqsjAG+RWciSxxqGr3M=; b=eMdZvEtilYBodYA0Yz9AslovwJozAbDpGfqgxxvKOonpy8UZtSSNJG9QHCsBEJTdbDINA4 x6PQEtV+fEfAdeTMQQTpY6cxgJvi8CXoMYHFYFp0llV9HtFxdwEZyIS3ms4Pp3csTZhiBT KAdFwPkKRyjtP4iU8E/0tYG3VI2ZOdM= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-444-oBo9T44xO0m99wBDh001JA-1; Fri, 20 Sep 2024 15:01:29 -0400 X-MC-Unique: oBo9T44xO0m99wBDh001JA-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (unknown [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B45881925389 for ; Fri, 20 Sep 2024 19:01:28 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.45.224.75]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8D1AA30001A1; Fri, 20 Sep 2024 19:01:27 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Cc: Carlos O'Donell Subject: [PATCH v2] Implement run-built-tests=no for make xcheck, always build xtests Date: Fri, 20 Sep 2024 21:01:24 +0200 Message-ID: <87a5g2gnej.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org Previously, the second occurrence of the xtests target expected all xtests to run (as the result of specifying $(xtests)), but these tests have not been run due to the the first xtests target is set up for run-built-tests=no: it only runs tests in $(xtests-special). Consequently, xtests are reported as UNSUPPORTED with “make xcheck run-built-tests=no”. The xtests were not built, either. After this change always, xtests are built regardless of the $(run-built-tests) variable (except for xtests listed in $(tests-unsupported)). To fix the UNSUPPORTED issue, introduce xtests-expected and use that manage test expectations in the second xtests target. Reviewed-by: Carlos O'Donell --- v2: Slightly different approach. Also build xtests unconditionally. Rules | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) base-commit: e64a1e81aadf6c401174ac9471ced0f0125c2912 diff --git a/Rules b/Rules index 27846abf82..713c225d2e 100644 --- a/Rules +++ b/Rules @@ -143,8 +143,9 @@ endif others: $(py-const) ifeq ($(run-built-tests),no) +# The $(xtests) dependency ensures that xtests are always built. tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported), \ - $(tests) $(tests-internal) \ + $(tests) $(tests-internal) $(xtests) \ $(tests-container) \ $(tests-mcheck:%=%-mcheck) \ $(tests-malloc-check:%=%-malloc-check) \ @@ -153,8 +154,10 @@ tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported), \ $(test-srcs)) $(tests-special) \ $(tests-printers-programs) xtests: tests $(xtests-special) -else +else # $(run-built-tests) != no +# The $(xtests) dependency ensures that xtests are always built. tests: $(tests:%=$(objpfx)%.out) $(tests-internal:%=$(objpfx)%.out) \ + $(addprefix $(objpfx),$(filter-out $(tests-unsupported), $(xtests))) \ $(tests-container:%=$(objpfx)%.out) \ $(tests-mcheck:%=$(objpfx)%-mcheck.out) \ $(tests-malloc-check:%=$(objpfx)%-malloc-check.out) \ @@ -162,26 +165,28 @@ tests: $(tests:%=$(objpfx)%.out) $(tests-internal:%=$(objpfx)%.out) \ $(tests-malloc-hugetlb2:%=$(objpfx)%-malloc-hugetlb2.out) \ $(tests-special) $(tests-printers-out) xtests: tests $(xtests:%=$(objpfx)%.out) $(xtests-special) -endif +endif # $(run-built-tests) != no tests-special-notdir = $(patsubst $(objpfx)%, %, $(tests-special)) xtests-special-notdir = $(patsubst $(objpfx)%, %, $(xtests-special)) ifeq ($(run-built-tests),no) tests-expected = -else +xtests-expected = +else # $(run-built-tests) != no tests-expected = $(tests) $(tests-internal) $(tests-printers) \ $(tests-container) $(tests-malloc-check:%=%-malloc-check) \ $(tests-malloc-hugetlb1:%=%-malloc-hugetlb1) \ $(tests-malloc-hugetlb2:%=%-malloc-hugetlb2) \ $(tests-mcheck:%=%-mcheck) -endif +xtests-expected = $(xtests) +endif # $(run-built-tests) != no tests: $(..)scripts/merge-test-results.sh -s $(objpfx) $(subdir) \ $(sort $(tests-expected) $(tests-special-notdir:.out=)) \ > $(objpfx)subdir-tests.sum xtests: $(..)scripts/merge-test-results.sh -s $(objpfx) $(subdir) \ - $(sort $(xtests) $(xtests-special-notdir:.out=)) \ + $(sort $(xtests-expected) $(xtests-special-notdir:.out=)) \ > $(objpfx)subdir-xtests.sum ifeq ($(build-programs),yes)