From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lxmtout1.gsi.de (lxmtout1.gsi.de [140.181.3.111]) by sourceware.org (Postfix) with ESMTPS id 5D71A398BC1B; Wed, 27 Jan 2021 20:42:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5D71A398BC1B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gsi.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=M.Kretz@gsi.de Received: from localhost (localhost [127.0.0.1]) by lxmtout1.gsi.de (Postfix) with ESMTP id 84C862050D05; Wed, 27 Jan 2021 21:42:39 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at lxmtout1.gsi.de Received: from lxmtout1.gsi.de ([127.0.0.1]) by localhost (lxmtout1.gsi.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5rKbsaZECgJA; Wed, 27 Jan 2021 21:42:39 +0100 (CET) Received: from srvex3.campus.gsi.de (srvex3.campus.gsi.de [10.10.4.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by lxmtout1.gsi.de (Postfix) with ESMTPS id 6CE1A2050D00; Wed, 27 Jan 2021 21:42:39 +0100 (CET) Received: from excalibur.localnet (140.181.3.12) by srvex3.campus.gsi.de (10.10.4.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2106.2; Wed, 27 Jan 2021 21:42:39 +0100 From: Matthias Kretz To: , Subject: [PATCH 12/16] Support timeout and timeout-factor options Date: Wed, 27 Jan 2021 21:42:38 +0100 Message-ID: <7726077.7O1Wp1SQZX@excalibur> Organization: GSI Helmholtzzentrum =?UTF-8?B?ZsO8cg==?= Schwerionenforschung In-Reply-To: <4667217.5jz8CO7rxU@excalibur> References: <4667217.5jz8CO7rxU@excalibur> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Originating-IP: [140.181.3.12] X-ClientProxiedBy: SRVEX2.campus.gsi.de (10.10.4.15) To srvex3.campus.gsi.de (10.10.4.16) X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, BODY_8BITS, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2021 20:42:42 -0000 =46rom: Matthias Kretz libstdc++-v3/ChangeLog: * testsuite/experimental/simd/driver.sh: Abstract reading test options into read_src_option function. Read skip, only, expensive, and xfail via read_src_option. Add timeout and timeout-factor options and adjust timeout variable accordingly. * testsuite/experimental/simd/tests/loadstore.cc: Set timeout-factor 2. =2D-- .../testsuite/experimental/simd/driver.sh | 38 +++++++++++++------ .../experimental/simd/tests/loadstore.cc | 1 + 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/libstdc++-v3/testsuite/experimental/simd/driver.sh b/libstdc++- v3/testsuite/experimental/simd/driver.sh index 719e4db8e68..71e0c7d5ee8 100755 =2D-- a/libstdc++-v3/testsuite/experimental/simd/driver.sh +++ b/libstdc++-v3/testsuite/experimental/simd/driver.sh @@ -214,35 +214,43 @@ trap "rm -f '$log' '$sum' $exe; exit" INT rm -f "$log" "$sum" touch "$log" "$sum" =20 =2Dskip=3D"$(head -n25 "$src" | grep '^//\s*skip: ')" =2Dif [ -n "$skip" ]; then =2D skip=3D"$(echo "$skip" | sed -e 's/^.*:\s*//' -e 's/ \+/ /g')" +read_src_option() { + local key tmp var + key=3D"$1" + var=3D"$2" + [ -z "$var" ] && var=3D"$1" + local tmp=3D"$(head -n25 "$src" | grep "^//\\s*${key}: ")" + if [ -n "$tmp" ]; then + tmp=3D"$(echo "${tmp#//*${key}: }" | sed -e 's/ \+/ /g' -e 's/^ //' -e= 's/=20 $//')" + eval "$var=3D\"$tmp\"" + else + return 1 + fi +} + +if read_src_option skip; then if test_selector "$skip"; then # silently skip this test exit 0 fi fi =2Donly=3D"$(head -n25 "$src" | grep '^//\s*only: ')" =2Dif [ -n "$only" ]; then =2D only=3D"$(echo "$only" | sed -e 's/^.*:\s*//' -e 's/ \+/ /g')" +if read_src_option only; then if ! test_selector "$only"; then # silently skip this test exit 0 fi fi + if ! $run_expensive; then =2D expensive=3D"$(head -n25 "$src" | grep '^//\s*expensive: ')" =2D if [ -n "$expensive" ]; then =2D expensive=3D"$(echo "$expensive" | sed -e 's/^.*:\s*//' -e 's/ \+/ /= g')" + if read_src_option expensive; then if test_selector "$expensive"; then unsupported "skip expensive tests" exit 0 fi fi fi =2Dxfail=3D"$(head -n25 "$src" | grep '^//\s*xfail: ')" =2Dif [ -n "$xfail" ]; then =2D xfail=3D"$(echo "$xfail" | sed -e 's/^.*:\s*//' -e 's/ \+/ /g')" + +if read_src_option xfail; then if test_selector "${xfail#* }"; then xfail=3D"${xfail%% *}" else @@ -250,6 +258,12 @@ if [ -n "$xfail" ]; then fi fi =20 +read_src_option timeout + +if read_src_option timeout-factor factor; then + timeout=3D$(awk "BEGIN { print int($timeout * $factor) }") +fi + log_output() { if $verbose; then maxcol=3D${1:-1024} diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/loadstore.cc b/ libstdc++-v3/testsuite/experimental/simd/tests/loadstore.cc index dd7d6c30e8c..cd27c3a7426 100644 =2D-- a/libstdc++-v3/testsuite/experimental/simd/tests/loadstore.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/loadstore.cc @@ -16,6 +16,7 @@ // . =20 // expensive: * [1-9] * * +// timeout-factor: 2 #include "bits/verify.h" #include "bits/make_vec.h" #include "bits/conversions.h" =2D-=20 =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.de std::experimental::simd https://github.com/VcDevel/std-simd =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80