From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by sourceware.org (Postfix) with ESMTPS id 5918D3858D32 for ; Mon, 5 Feb 2024 13:55:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5918D3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5918D3858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1035 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707141340; cv=none; b=uhYSPh0DaFtxc+03xmbAmk6e0UmAdGUkEZD7EMt/KoL9/qY396ABJjzzZfYjRptrUvod4JWt0OPcD7lO+0+0bViStSjJHaWN4LFF4/PRHk6OQIdnH+Un+mnb9HsfFzFZQjsDXVIrBIRa8bjig2iBaDG32EPB/wwEDhj6bI2brIA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707141340; c=relaxed/simple; bh=pm3BJ7HmT8ijtjf0ze29dTLZeuzsdWSmBlyJ9BYuUEg=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=WTuu/mVj37bntSseOcdS8lf4Q2D4HfvtCKTHpQAobn7uXkfp0+mYLeXDhzjxrL8cnuJh1HtTYoLsIrfhXl3e/T+LSoclD35i3dU8bTOAHjeOn56bRT/InQJpMPVDc0TRqjg005BzNgoSGZjddT/b5p+Y/T4lgSAqAOtShQm6Lwc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-29080973530so3601685a91.1 for ; Mon, 05 Feb 2024 05:55:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707141336; x=1707746136; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=+gl8USxxNlqk6U3bBzXC8q9GDCDl/G3dz0J3b1AG1ZA=; b=E8qAcL40x1VCuQHBfOxiVwM1Jr8qoHCQmhQy40dEgcWU41GB+Zgf9ywL/ABYzN8KfU xKDy5fzhrBOCWc5EmXZ5T+DEG9dRO9N67PCjmJvh0KrURLWI0S2x4adrYZk+DfHbHy2O OVZlxItOqWMjsKa8LwdA8Q2Q6UA6mS59m/V5W/wunr9jKtm+Q5i1yKADM83/9FDAQZ8x kwhHoff7z6vxseqlFaFQ6G/Na8Rs4Nge0ZsKeMaWuZxVmAEFcTWfXmzBrHkYBP7Fb5cb Edw4zELx19P+hk38oI0FhUoHpvdTzScN8WFKShTk5TYJQqieleJ6TlqfTEyTl8SCm3xt tAPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707141336; x=1707746136; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+gl8USxxNlqk6U3bBzXC8q9GDCDl/G3dz0J3b1AG1ZA=; b=DbQjWFGbFtPjDptTENCVPgg8E8H6Qr10M2DV5b1d8mkpOWRm884Lhml5QSuaCxRaap Zt+BNypx9qCiTqmLtv1/RV74bTVtQySn+ghytNYhW/Ae3wfCR7NeKTThitUbPpzL1PcD NIBGdKghJ5c293kd0VdV3GBFbKVXX6XIXr5KIs9whMJjCHsBaWfV4bHGPN35ra6iB7QO 8uWYHnySrY6lzUJrJA4MRRwlrPYn9NIyFElblBsAzJpOPRRq+osVXCZRKm5dZ3oclXgd 4hf8JOGpcNdlO6D9+fxOKE0fuDklnX3T0odlTF+1W2cbLHUEVIuIXz84ZUGTrvFSL4uY cBug== X-Gm-Message-State: AOJu0YwuhLx5amgWwwCfc3dkqT+fkzcmSkgyrXTL2Cju0EFsWIcE243Q caPGsPbdarkAzLRvb1mDtao2p77PbRZBvwGkjtbNQ0TFPUo5bfEsbaMH0vYNw08qWyhWTbs7wut 4 X-Google-Smtp-Source: AGHT+IHHr1bFYW2B8XlpJEQVwVqlMhrav5dBNomkbR9GhyHFfVAEkPPe7Rm+KPlzwKVqkwMHRIEmtQ== X-Received: by 2002:a17:903:2782:b0:1d9:a7b9:313a with SMTP id jw2-20020a170903278200b001d9a7b9313amr3740235plb.47.1707141336203; Mon, 05 Feb 2024 05:55:36 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUYZik5hDcpSJVogkylnOS9lVEQQtHR6JNnd4kMQJV0muGHeauD5H6S2HVSmVJmnFXfwgsvXTV9a7GPhEf35W7y8XQCxcMaVIU1 Received: from ?IPV6:2804:1b3:a7c3:574b:f1c3:db83:b701:fe0f? ([2804:1b3:a7c3:574b:f1c3:db83:b701:fe0f]) by smtp.gmail.com with ESMTPSA id mn16-20020a1709030a5000b001d8aa88f59esm6322757plb.110.2024.02.05.05.55.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Feb 2024 05:55:34 -0800 (PST) Message-ID: <19a63ffb-388b-4b7d-8cc3-63157e40659c@linaro.org> Date: Mon, 5 Feb 2024 10:55:32 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Add --disable-test-container to disable test container Content-Language: en-US To: "H.J. Lu" , libc-alpha@sourceware.org References: <20240204185531.2816341-1-hjl.tools@gmail.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20240204185531.2816341-1-hjl.tools@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 List-Id: On 04/02/24 15:55, H.J. Lu wrote: > 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. Which is the failure that running under this simulator throw? Would be possible to detect it on test-container and fail with UNSUPPORTED instead? I am not found on configure switch that disable testing, it seems just extra burden while adding test-container and this decrease test coverage when using this flag. > --- > 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 >