From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 0717E3858424 for ; Fri, 5 Apr 2024 08:35:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0717E3858424 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0717E3858424 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712306113; cv=none; b=ifE5O8SQ5DJq4U5+hNgl5n1jgarT40U6P/GOqxx01txiytx3DTzpLLEZMPj462Z9+/vV8Ix0PmATg1UDXQwHzIvZYagXSnB4+2jyh/9AHdRl2o3hL6abpEY95r9E0lXE6GQ5S9LFcSoyQySA/zAKhBr42REs31TvAN84bvg8jdk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712306113; c=relaxed/simple; bh=5sWX1jMrb2VGFCgkJRRIzCeyEY32xZN+G+R9dDGDcVE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=BEYbEE0D4TIpOz1VrgVpveM/ZB/qTFp4P1I40XcylVdAiw3RLa/9J6E22hSGvhYwnBmdYEFm+wUIyu4upnSgvPvd8kFFSfVwFmzo7ZXFyaoIqYSjW6i1GgeMGNmTU4OVFEeo8TzttswodJu63ZBTg6QRJHGTc7IB8MR2hdYtNXA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712306106; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+Da5XdUb91tp/b5GK7D/YZZR1CX/WLpx5nyeEWbgc+I=; b=WjoGVbVCxr/ybOepuoBB8xZSXeSrUwNs8bfPQUCgEgrlEK2FEKMsDjHQF58EuiQtW9GMXl a/nIumLqMflPAJwHbhQ6sYj0nsX+10+s0Nzga/mAnId7WGlOFooXURh64IqwhsaMzX2BgX fgeMf5D3a2xeliWtMi0DDoyqP+leh0E= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-104-2KxOSBh9Oium3ZE7RxDlzw-1; Fri, 05 Apr 2024 04:34:59 -0400 X-MC-Unique: 2KxOSBh9Oium3ZE7RxDlzw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0D7873826117; Fri, 5 Apr 2024 08:34:59 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.14]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8D81D20239F3; Fri, 5 Apr 2024 08:34:58 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 4358Yqsk2443319 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 5 Apr 2024 10:34:52 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 4358Yqfx2443318; Fri, 5 Apr 2024 10:34:52 +0200 Date: Fri, 5 Apr 2024 10:34:51 +0200 From: Jakub Jelinek To: Jan Hubicka , Richard Biener , =?iso-8859-1?Q?J=F8rgen?= Kvalsvik Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite: Fix up error on gcov1.d Message-ID: Reply-To: Jakub Jelinek References: <20240223111800.1209438-1-j@lambda.is> <20240223111800.1209438-2-j@lambda.is> MIME-Version: 1.0 In-Reply-To: <20240223111800.1209438-2-j@lambda.is> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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: On Fri, Feb 23, 2024 at 12:18:00PM +0100, Jørgen Kvalsvik wrote: > This is a mostly straight port from the gcov-19.c tests from the C test > suite. The only notable differences from C to D are that D flips the > true/false outcomes for loop headers, and the D front end ties loop and > ternary conditions to slightly different locus. > > The test for >64 conditions warning is disabled as it either needs > support from the testing framework or a something similar to #pragma GCC > diagnostic push to not cause a test failure from detecting a warning. > > gcc/testsuite/ChangeLog: > > * gdc.dg/gcov.exp: New test. > * gdc.dg/gcov1.d: New test. Unfortunately, this doesn't work. I see PASS: gdc.dg/gcov1.d execution test ERROR: (DejaGnu) proc "run-gcov conditions { --conditions gcov1.d }" does not exist. The error code is TCL LOOKUP COMMAND run-gcov The info on the error is: invalid command name "run-gcov" while executing "::tcl_unknown run-gcov conditions { --conditions gcov1.d }" ("uplevel" body line 1) invoked from within "uplevel 1 ::tcl_unknown $args" ERROR: gdc.dg/gcov1.d : error executing dg-final: invalid command name "run-gcov" both on x86_64-linux and i686-linux. The problem is that the test hasn't been added to a new directory, but to a directory already covered by a different *.exp file - dg.exp. Now, usually either one has a test directory like gcc.misc-tests where there are many *.exp files but each *.exp file globs for its own tests, or there is one *.exp per directory and covers everything in there. By having both dg.exp and gcov.exp in the same directory with dg.exp covering all *.d files in there and gcov gcov*.d in there, the gcov*.d tests are tested twice, once using the dg.exp driver and once using gcov.exp driver. With the latter, they do work properly, with the former they don't because gcov.exp lib file isn't loaded and so run-gcov isn't available. The following patch fixes that similarly how g++.dg/modules/modules.exp, gcc.target/s390/s390.exp or gcc.target/i386/i386.exp deal with that, by pruning some tests based on glob patterns from the list. Tested on x86_64-linux with make -j32 check-d, ok for trunk? 2024-04-05 Jakub Jelinek * gdc.dg/dg.exp: Prune gcov*.d from the list of tests to run. * gdc.dg/gcov.exp: Update copyright years. --- gcc/testsuite/gdc.dg/dg.exp.jj 2024-01-03 22:33:38.249693029 +0100 +++ gcc/testsuite/gdc.dg/dg.exp 2024-04-05 10:20:13.518823037 +0200 @@ -30,7 +30,8 @@ dg-init # Main loop. gdc-dg-runtest [lsort \ - [glob -nocomplain $srcdir/$subdir/*.d ] ] "" $DEFAULT_DFLAGS + [prune [glob -nocomplain $srcdir/$subdir/*.d ] \ + $srcdir/$subdir/gcov*.d ] ] "" $DEFAULT_DFLAGS # All done. dg-finish --- gcc/testsuite/gdc.dg/gcov.exp.jj 2024-04-04 21:45:56.025155257 +0200 +++ gcc/testsuite/gdc.dg/gcov.exp 2024-04-05 10:20:23.678682559 +0200 @@ -1,4 +1,4 @@ -# Copyright (C) 1997-2023 Free Software Foundation, Inc. +# Copyright (C) 1997-2024 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by Jakub