From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id AE62B3857C4D for ; Thu, 28 Apr 2022 11:58:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AE62B3857C4D Received: by mail-wr1-x434.google.com with SMTP id d5so6449947wrb.6 for ; Thu, 28 Apr 2022 04:58:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Yup9/rWV8YkETBBpwvcwEGYlK247E13Prhq89Ktv+wg=; b=q4WiiyQbxt3vba5phm8B/egsov12iiORqdnLdY255K0soHKjND8njQcUOqZrC3X+n6 PXDrDiiUqHX/ItRG4TXUQYOzo0W0BKThrUM6nVREWSBTOVo2r0I/SrODYmqBU6h733Nm aixY+9AtrdbdMKCL+7tNSN4HOBg5nQFmZwdi28J3u+golzzV+TIM820XM1wOQUS9sjmr tuGqxZaDgQnjbZkE2fkrMTke0Erh+Tp/y/gzlflLorJe/PwdlupqoIFQUAckEmlPzXp0 Vus1ecIpkZt0QMpLX4ULVeSUpIHPiQAKCB70MtZqT8RM1wXeNDA21xh67Vx9fCGJ9G9T OKVg== X-Gm-Message-State: AOAM530LCF9h2fi2fV/zUiefFP2h6hEPL5lYyzU/3bEwfSwzMhSyO/WK riYFuXRk0sRjriby0eFDCx89PSP2O4ulO3LW5ro= X-Google-Smtp-Source: ABdhPJxs+Edk7rH8ukfZJ+tAGY+ieIeeaqX2dr9MQliKgwgEaBrpa0xGA1qLCqK6eOZ4ZHK7GHaopr1IxTeBdGkh/3M= X-Received: by 2002:a05:6000:1e05:b0:20a:ecc7:41cf with SMTP id bj5-20020a0560001e0500b0020aecc741cfmr7394855wrb.102.1651147089305; Thu, 28 Apr 2022 04:58:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Thu, 28 Apr 2022 12:57:58 +0100 Message-ID: Subject: Re: Need help building and executing specific run tests for libstdc++ To: Jakob Hasse Cc: "gcc-help@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2022 11:58:14 -0000 On Thu, 28 Apr 2022 at 12:37, Jakob Hasse via Gcc-help wrote: > > Hello, I'm stuck building and running the tests for gcc, in particular th= e run-tests (not compile tests) for just one test case I added myself. > > I found an issue in libstdc++ (https://gcc.gnu.org/bugzilla/show_bug.cgi?= id=3D105387) and now want to write a test for it to prove that the patch I = created works and that the libstdc++ code breaks without the patch. I added= the test application into libstdc++-v3/testsuite/abi/. It should be in testsuite/18_support > Now how do I run this very application and via the test suite and how do = I confirm that it successfully ran? > > I've been looking into the libstdc++ test doc page: libstdc++-v3/doc/html= /manual/test.html in the repository, but it is still not clear to me how to= do the aforementioned task. https://gcc.gnu.org/onlinedocs/libstdc++/manual/test.html#test.run should be clear, no? > After successfully building the entire gcc, I stayed in the build directo= ry and tried this: make check-c++ RUNTESTFLAGS=3D"libstdc++.exp". But all I= got was a bunch of output without any of the files in libstdc++-v3/testsui= te/abi/ listed. That's not what the docs say to do though. You want conformance.exp not libstdc++.exp and it's easier to run it from the $target/libstdc++-v3 directory not the top-level build directory. The test output goes to the logs, not to stdout. > > How do I run the tests (with stdout output, because using gdb is another = story) for a particular .cc file in any of the directories in libstdc++-v3/= testsuite/ ? make check RUNTESTFLAGS=3Dconformance.exp=3Dyourfile.cc You should not rely on stdout output, because that can't be automated. You should #include and use the VERIFY macro, which is equivalent to the standard 'assert' macro. The results can be checked in the testsuite/libstdc++.log file.