From patchwork Sun Feb 4 18:55:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 85286 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E77A73857C51 for ; Sun, 4 Feb 2024 18:55:54 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id BD9043858CDB for ; Sun, 4 Feb 2024 18:55:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD9043858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BD9043858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::436 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707072936; cv=none; b=JjDB+X0HdLGdmROrU40EO1iuep2OQMV+SNqjDTQ0J0dzhnnrGr51LzdHecuI2PPmImoPwVKgGUc36grUt9f+N9ZQbGvM8WiFyxorba2bfc2cd2MqubKdj2iDMWWRhRikN6a3p9uzsXeFvpUIujv9cifuhBV6m0ewdFtWThPs584= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707072936; c=relaxed/simple; bh=Uy5WejrLZOsrqkJJu0Cg00edfoOTkhckH9CcMTlyMCE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=F5R5H2XoS8tekFRIMqaWrVyqLCSleetxPTxsNNfRDYdLnAK7WtQMyXlXq3SvoRNHpWU9biE818SVOdkC5UDDCq1kCiAQ35xMaeY+F7qf1eBemH00h58mAsWvJqJgR9cWwv4ndK3Mh+2DgD7DolBVhSs+gCJ8KYa0prTclEyzLHU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6e02d298334so289625b3a.0 for ; Sun, 04 Feb 2024 10:55:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707072933; x=1707677733; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=7pUE02aaBPeYtog/rrz1rMwb9jBt/3JS35wau5Rf4vw=; b=NGoP5DC/CS8/di5MP5KqJVqGB2R7Z1wOBQCCqymM9Y4JjbvE0TqbwsUqeabFBPurmV wVvEcgeZMjgP083aXkXqxvu9zCbCQZ5K+pd9dXByzZ5AJyZpSiAu61K5yvtNS3rH6+QV yJgeB9Idi/3kKLutLLY4QfIVx65u74vIER6WLL2W4QCzh6MnSLiyLQGDwftrxZ2F+2qa +RhWsUUQlPVPhizQhBHZjtgmUNz7ebmCLuerQ/l+rMY7Y1trysgXCz+BT1wwtJ4dDw5a bkBoCKEHPboaKNfHP2ebuQjduDPcuYYe8HN+JBGc8raQLVoe+VZLMczCkrDPDJNTfxBs 4dyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707072933; x=1707677733; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7pUE02aaBPeYtog/rrz1rMwb9jBt/3JS35wau5Rf4vw=; b=VyaCN+xNZFfAc4UNFZVeSqUKKo+7fzMBE9szRXVV9EXnmfOKEgsLuqydxNbochoiTe xIBfVs4wLUbiEdMvbXH0hU87vkFFvKuUpQ5NKh6bce700Sc/iHOu5h59NU5Mj3W5WuUC 8D8lFWKX1SFLYR1GJgLGUSlEpWCURv/q5ooqOfb0ckYsdDvjwHzP8Q6Y21WjPvR3a1m5 vRIMYO0MWDjdrlndp/qXi7xG+ZqyBlJhAv51qW1KRqueKJeo1ZRIfOn4lrvNinizRggY 6ZbGt+/acNr1SGnTFZXcB8UjFZq/XYR+uraTDGh8DmcHzmtCx7xgdpU830SSy8MGvGSd ke+w== X-Gm-Message-State: AOJu0YyEJBV75OCb/L7jub4PlVV3seNLySqtzEHtTVljvl6W+HxQtpJO cVe1hmJOd7upmEehvqJT/oBotoElpLzxunxsQhK3fqJhB8BDxZy1uXIoJI6D X-Google-Smtp-Source: AGHT+IFAjbwTKRhKcb6mVJUnwTmbDESmxm9/G3jAW3eiONaGjbQvFqlPpZbRoqreTXKaMsQBepn3fQ== X-Received: by 2002:a05:6a00:1ad3:b0:6e0:416c:a0c0 with SMTP id f19-20020a056a001ad300b006e0416ca0c0mr971657pfv.2.1707072933425; Sun, 04 Feb 2024 10:55:33 -0800 (PST) Received: from gnu-cfl-3.localdomain ([172.56.169.51]) by smtp.gmail.com with ESMTPSA id y17-20020a056a00191100b006e02e816f13sm2512851pfi.111.2024.02.04.10.55.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 10:55:32 -0800 (PST) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id A500874014F for ; Sun, 4 Feb 2024 10:55:31 -0800 (PST) From: "H.J. Lu" To: libc-alpha@sourceware.org Subject: [PATCH] Add --disable-test-container to disable test container Date: Sun, 4 Feb 2024 10:55:31 -0800 Message-ID: <20240204185531.2816341-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-3023.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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+patchwork=sourceware.org@sourceware.org It can be difficult to run tests in container under simulator. Add --disable-test-container configure option to disable test container. Container tests are enabled by default. --- Makefile | 2 ++ Rules | 5 +++++ configure | 7 +++++++ configure.ac | 6 ++++++ nss/Makefile | 2 ++ posix/Makefile | 6 +++++- resolv/Makefile | 11 +++++++++-- 7 files changed, 36 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7052b46df8..2ba4a5ecd3 100644 --- a/Makefile +++ b/Makefile @@ -610,6 +610,7 @@ else LINKS_DSO_PROGRAM = links-dso-program endif +ifeq (yes,$(enable-test-container)) $(tests-container) $(addsuffix /tests,$(subdirs)) : \ $(objpfx)testroot.pristine/install.stamp $(objpfx)testroot.pristine/install.stamp : @@ -655,6 +656,7 @@ endif INSTALL_UNCOMPRESSED=yes subdirs='$(sorted-subdirs)' rm -f $(symbolic-link-list) touch $(objpfx)testroot.pristine/install.stamp +endif tests-special-notdir = $(patsubst $(objpfx)%, %, $(tests-special)) tests: $(tests-special) diff --git a/Rules b/Rules index c7db0a4869..787024c729 100644 --- a/Rules +++ b/Rules @@ -142,6 +142,11 @@ endif # Generate constant files for Python pretty printers if required. others: $(py-const) +ifeq (no,$(enable-test-container)) +# Don't run any container tests with --disable-test-container. +tests-container := +endif + ifeq ($(run-built-tests),no) tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported), \ $(tests) $(tests-internal) \ diff --git a/configure b/configure index 59ff1e415d..2ca1fcf43f 100755 --- a/configure +++ b/configure @@ -7852,6 +7852,13 @@ fi config_vars="$config_vars enable-static-pie = $libc_cv_static_pie" +# Enable test-container by default. +if test "x$enable_test_container" = x; then + enable_test_container=yes +fi +config_vars="$config_vars +enable-test-container = $enable_test_container" + # Set the `multidir' variable by grabbing the variable from the compiler. # We do it once and save the result in a generated makefile. libc_cv_multidir=`${CC-cc} $CFLAGS $CPPFLAGS -print-multi-directory` diff --git a/configure.ac b/configure.ac index 65799e5685..e1956b98cc 100644 --- a/configure.ac +++ b/configure.ac @@ -1740,6 +1740,12 @@ if test "$libc_cv_static_pie" = "yes"; then fi LIBC_CONFIG_VAR([enable-static-pie], [$libc_cv_static_pie]) +# Enable test-container by default. +if test "x$enable_test_container" = x; then + enable_test_container=yes +fi +LIBC_CONFIG_VAR([enable-test-container], [$enable_test_container]) + # Set the `multidir' variable by grabbing the variable from the compiler. # We do it once and save the result in a generated makefile. libc_cv_multidir=`${CC-cc} $CFLAGS $CPPFLAGS -print-multi-directory` diff --git a/nss/Makefile b/nss/Makefile index 9331b3308c..ae083a9343 100644 --- a/nss/Makefile +++ b/nss/Makefile @@ -434,9 +434,11 @@ extra-test-objs += nss_test1.os nss_test2.os nss_test_errno.os \ ifeq ($(run-built-tests),yes) ifneq (no,$(PERL)) +ifeq (yes,$(enable-test-container)) tests-special += $(objpfx)mtrace-tst-nss-gai-hv2-canonname.out endif endif +endif generated += mtrace-tst-nss-gai-hv2-canonname.out \ tst-nss-gai-hv2-canonname.mtrace diff --git a/posix/Makefile b/posix/Makefile index a1e84853a8..d3a70ab6b4 100644 --- a/posix/Makefile +++ b/posix/Makefile @@ -462,7 +462,6 @@ endif tests-special += $(objpfx)annexc.out ifeq ($(run-built-tests),yes) tests-special += \ - $(objpfx)bug-ga2-mem.out \ $(objpfx)bug-glob2-mem.out \ $(objpfx)bug-regex14-mem.out \ $(objpfx)bug-regex2-mem.out \ @@ -475,9 +474,14 @@ tests-special += \ $(objpfx)tst-glob-tilde-mem.out \ $(objpfx)tst-pcre-mem.out \ $(objpfx)tst-rxspencer-no-utf8-mem.out \ + # tests-special +ifeq (yes,$(enable-test-container)) +tests-special += \ + $(objpfx)bug-ga2-mem.out \ $(objpfx)tst-vfork3-mem.out \ # tests-special endif +endif include ../Rules diff --git a/resolv/Makefile b/resolv/Makefile index 5f44f5896b..62c81fe998 100644 --- a/resolv/Makefile +++ b/resolv/Makefile @@ -221,8 +221,15 @@ $(inst_libdir)/libnss_dns.so: ifeq ($(run-built-tests),yes) ifneq (no,$(PERL)) -tests-special += $(objpfx)mtrace-tst-leaks.out $(objpfx)mtrace-tst-leaks2.out \ - $(objpfx)mtrace-tst-resolv-res_ninit.out +tests-special += \ + $(objpfx)mtrace-tst-leaks.out \ + $(objpfx)mtrace-tst-resolv-res_ninit.out \ +# tests-special +ifeq (yes,$(enable-test-container)) +tests-special += \ + $(objpfx)mtrace-tst-leaks2.out \ +# tests-special +endif endif endif