From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id 792C13853817 for ; Wed, 5 Apr 2023 14:06:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 792C13853817 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wm1-x336.google.com with SMTP id j18-20020a05600c1c1200b003ee5157346cso23816776wms.1 for ; Wed, 05 Apr 2023 07:06:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1680703585; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=zCZC3xHACqHMlCWfqnr+JlV98oSyoB9gbvAMgMf9+VE=; b=eyNmOq16VwK6d0kwD7Ay8wsTKgy/Tjq358KXESB426Dg4lMyBlm8MiSfi5zMayiHJU O8WpsBjtbgp61JXZePw4Al3qH07LTlpMTWlXYYh/XHZqraVN7upzgtDXUZbuc2pbAydi J4oJZ2oI88Ung2f/cVUeSMcg/PwFGrho+XO3WjYDduCcZBHyHXlrIsevxAHZb7+8JZZh 4ADfph/ippywHFJ64Mc31dcDORlhp15fgKA9CelFmVfXbuxuYQi88uI4RTw/Mi5XOKxz Xu0lBMoVWDBYZr4AFFO1R4h0GxBlGqx6nABiH7aGruu6tDFTd2Yaxmyn+pxt8kF5LRzb 0I8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680703585; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=zCZC3xHACqHMlCWfqnr+JlV98oSyoB9gbvAMgMf9+VE=; b=mRFUMGM7mvk46toPrmYsmXgwbUBMrSY3/r4tIdNXSZdyCl57k/sW2rdRdOnMJDhv+s ASBnIEa0ojTCpIekdAk90QhqmAx5GqreXwrz3qZQJmn1eQ7pXJAOjSBFD86lz/cIVKJo fLUCZnSrqQ+AkN+LeuuA+BxX9EME4pSAHZG+aQo5B6pwVtg8vc76C/UBjQxON42rUqEL hY3f04YgnWqETcrg+brV4AZbuywwZ1A0CJ2k5ReRt9rE2iXxff+Cy+2CwNhMBMgdBWnC P+BP/BUJXkgUTS9zaGqLHWZFGFTTRskkwfYvN0VwgpNSdYnb6v/CPD0wpaYZKAkzI2hZ SR2w== X-Gm-Message-State: AAQBX9e7WR6XwEDA0RPtT46RBXs6nzIit5G5r1DfbA+dlvYenTLhX6ln OPQbTg5Yfy+TzUZIWnwDmlH9 X-Google-Smtp-Source: AKy350b+9hbXkBi8lStmit3Rk+mN4qsuAC00kQotq9Yr6zLyD5Au7PZ6wECZDzE35dFWww3o0m1Erg== X-Received: by 2002:a7b:c5cd:0:b0:3ea:d611:f8 with SMTP id n13-20020a7bc5cd000000b003ead61100f8mr4903692wmk.38.1680703585074; Wed, 05 Apr 2023 07:06:25 -0700 (PDT) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id ay8-20020a05600c1e0800b003edddae1068sm2330150wmb.9.2023.04.05.07.06.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 07:06:24 -0700 (PDT) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Thomas Schwinge Subject: [committed 81/88] gccrs: Fix up DejaGnu directives in 'rust/compile/issue-1830_{bytes,str}.rs' test cases [#1838] Date: Wed, 5 Apr 2023 16:04:05 +0200 Message-Id: <20230405140411.3016563-82-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230405140411.3016563-1-arthur.cohen@embecosm.com> References: <20230405140411.3016563-1-arthur.cohen@embecosm.com> Reply-To: arthur.cohen@embecosm.com MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.5 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 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: From: Thomas Schwinge 'dg-excess-errors' "indicates that the test is expected to fail due to compiler messages that are not handled by 'dg-error', [etc.]". It's argument doesn't specify the message to match but just just a comment. Here, however, we'd like to match specific compiler messages, so we should use 'dg-error', etc. Use the magic line number zero as the compiler error diagnostic doesn't tell which line the error occurred on (separate issue to resolve). This gives us: -XFAIL: rust/compile/issue-1830_str.rs (test for excess errors) +PASS: rust/compile/issue-1830_bytes.rs at line 8 (test for errors, line ) +PASS: rust/compile/issue-1830_bytes.rs (test for excess errors) -XFAIL: rust/compile/issue-1830_bytes.rs (test for excess errors) +PASS: rust/compile/issue-1830_str.rs at line 8 (test for errors, line ) +PASS: rust/compile/issue-1830_str.rs (test for excess errors) Fix-up for recent GCC/Rust master branch #1838 commit cf9ed4001eec6a22686d19a13f7de8ac94f9cb2a "testsuite: Add empty string macro test". gcc/testsuite/ * rust/compile/issue-1830_bytes.rs: Fix up DejaGnu directives. * rust/compile/issue-1830_str.rs: Likewise. --- gcc/testsuite/rust/compile/issue-1830_bytes.rs | 3 ++- gcc/testsuite/rust/compile/issue-1830_str.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/rust/compile/issue-1830_bytes.rs b/gcc/testsuite/rust/compile/issue-1830_bytes.rs index dcc53b73b19..997d4ca0cdc 100644 --- a/gcc/testsuite/rust/compile/issue-1830_bytes.rs +++ b/gcc/testsuite/rust/compile/issue-1830_bytes.rs @@ -4,5 +4,6 @@ macro_rules! include_bytes { } fn main() { - include_bytes!(""); // { dg-excess-errors "Is a directory" } + include_bytes!(""); + // { dg-error {cannot open filename [^\n\r]+: Is a directory} {} { target *-*-* } 0 } } diff --git a/gcc/testsuite/rust/compile/issue-1830_str.rs b/gcc/testsuite/rust/compile/issue-1830_str.rs index 6cf835ba9bd..fcf2dc988d3 100644 --- a/gcc/testsuite/rust/compile/issue-1830_str.rs +++ b/gcc/testsuite/rust/compile/issue-1830_str.rs @@ -4,5 +4,6 @@ macro_rules! include_str { } fn main() { - include_str!(""); // { dg-excess-errors "Is a directory" } + include_str!(""); + // { dg-error {cannot open filename [^\n\r]+: Is a directory} {} { target *-*-* } 0 } } -- 2.40.0