From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by sourceware.org (Postfix) with ESMTPS id 73AC83858D1E for ; Mon, 5 Feb 2024 14:54:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 73AC83858D1E 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 73AC83858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::529 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707144873; cv=none; b=Qb/ag4iBob57fYJ7d8n6Aw1wU71Bfqf7W5DNXTUORMu6Ec/ddiAQwE0cym9Ek9cF3NJIx0/GX2k/JC4HoATPAkls5DSxOxZY8u6VN0GTAId8dSj8S9iP1FaHY/yDf0rM28DxZmpvNr3nCC/yaeAOSTYxbLgQdSP6XI8tKhpGDkE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707144873; c=relaxed/simple; bh=jLIsVD0t0ju+2E40wlGQimUVSHGv8bVWxkkCTtowz00=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=nQAjVrt3Zvb8jWgLIN7+BAVBrs3QBj64IVOpUuFfjyp75hLjQWuZnN8ttmUaLd2WeotoIJuprMO996iDBGgHQjOaMz1eQ6za45LC/YPl8iUyIHbsLGNjcVUcTQr6Esk51IKG2LHqLZI/NrYT83N+ijTj/oTgC5XwIi3Wx7K9iUg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-5d81b08d6f2so4160117a12.0 for ; Mon, 05 Feb 2024 06:54:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707144870; x=1707749670; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=oN41Bp0fWNEyLGmYjsF4zYfp/O/uIOuZ8q+stZlw+4Y=; b=S9Sp3yoOMz8pWAFmgQ48ZN0zKmtpVwOS1ewdAGgcSLhAc8VmfFhFG1Q5Z59FnoM4c4 +JuEp8MUAAI8eZKsgNGeHKlGWyOo0AjxYOOqzi9uKMMn8HctXd6kACLo+UFp7cYxAXkr NrShlBceCz4n3qpUrCeTtSdxRlUoPQRzGY3LumZZz0IWBc/vVRyl5NqhHfvGwjupJrUp J8imc+J82NDZt2l7wkt8Szic/kbdkhrgx2DE2zYXEA5XH3708mLVYJ4WCHMtQ1ZR2LkJ UhxK/n+T2FfT7Hkl+SRNfVSxZDlxKRdPBb2kOKrqU7VFXJPJXu3Hi6AMQTdL6U/x3xRQ 5Ocw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707144870; x=1707749670; h=content-transfer-encoding:in-reply-to:organization:from:references :cc: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=oN41Bp0fWNEyLGmYjsF4zYfp/O/uIOuZ8q+stZlw+4Y=; b=PWGzH05dkWyQFD9HOVutitt0HI3Y0FCo98Td43SODqG+sCy1X5o25Osqc3P0SCdYin 33oREQTcffU9eiUbWVbcY4ngRXX2qKi0bVDhFDnYYfHipTm+hkCnE3OueJIjaDDbj5u0 nATBWmxJXoewKuC1jj/1LhT9bD0vCpkbRHSbKV/EC8V5sjZkh1HYWHpGgq0pVw/56bK/ MW3rbQVjT0AV9n5nv08N3sfhTB9CkJkBZHpWpXKbiMrYQKPyymrgTd6TYfRoL7jsGwei 3PoI2JuLmOqM7iPizW1ozIaQjUsYvAG1HcdBmRSg1GB/P5abiK9eZ8y/qCl0zXh2xTBR Autw== X-Gm-Message-State: AOJu0YwOIqd3oc07NbVBIhmYKFbiXt1qj6y+CL+eD2NKpaKXwqio9DTQ JvFbYEDBpR4Kk0BCkZlPgu4xlLShtsP+9TWGjhzxTyjgqXKHVitAo6l38dNy75Epd7JZi4NaL1C d X-Google-Smtp-Source: AGHT+IFgNZQhekDRTqwNKCRRgOXgOfXWGEjk/Dc7jVzD1N3wOIQ1Z9yaDZlnqgPdTVyT60zuVNg9rg== X-Received: by 2002:a05:6a20:6f8b:b0:19c:99f1:bd5 with SMTP id gv11-20020a056a206f8b00b0019c99f10bd5mr16451795pzb.11.1707144870344; Mon, 05 Feb 2024 06:54:30 -0800 (PST) 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 p42-20020a056a0026ea00b006e040d6665bsm2525165pfw.77.2024.02.05.06.54.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Feb 2024 06:54:28 -0800 (PST) Message-ID: <4aa7f243-fd42-486d-9251-63d42cc3600f@linaro.org> Date: Mon, 5 Feb 2024 11:54:26 -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" Cc: libc-alpha@sourceware.org References: <20240204185531.2816341-1-hjl.tools@gmail.com> <19a63ffb-388b-4b7d-8cc3-63157e40659c@linaro.org> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.6 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 05/02/24 11:41, H.J. Lu wrote: > On Mon, Feb 5, 2024 at 5:55 AM Adhemerval Zanella Netto > wrote: >> >> >> >> 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 using > > $ make check test-wrapper=$(PWD)/test-sde.sh > > to test glibc compiled with Intel APX under APX emulator (SDE). SDE > doesn't work with container. SDE doesn't require any code changes. > I don't think we can detect it in container. Also GDB and LD_PELOAD > tests don't work. I don't know how to detect them either. Right, but what kind of error does the SDE emulator trigger with container tests? It is something similar to qemu-user where it emulates the syscall or is it running a underlying kernel like qemu-system? > >> 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 >>> > > >