From patchwork Thu Oct 9 12:34:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: max X-Patchwork-Id: 398013 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8E6691400B8 for ; Thu, 9 Oct 2014 23:35:11 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=OssLeJ2yYaKaDvvOpjL4RqyEjslVG59RnkEfA5VQzU9 SCxoLMbBXDTeIMbMkeKB8LKPY9j3/4zh0wY8Due6dShScWiketqDPHaJZXuWa4L8 BLzt0uafBKzbQbCcwdqLescdm2+APKL13S1KaQnQzhcjTjlTxrt8DNvQMY5sBSWU = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=5bv+wRShaUrxHA0fm5usz4AVQfE=; b=lKdDuj4wbx+oXx+P+ DAl1LTBSCKH9FupdGqjEcCPsB1svJVurcyX/LBFYIIBOlMBZJYKIeyTvnlOFPo0A NCXsNXIDJk6dSVZ2Aa05GctXzMbt4+RmFNVMvuuYIpEa06bT9kpTDq28+qgmk0II VqW6pu/KNRVE55YS4KVLKlZ8VE= Received: (qmail 8423 invoked by alias); 9 Oct 2014 12:34:58 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 8412 invoked by uid 89); 9 Oct 2014 12:34:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, HDRS_LCASE, SPF_HELO_PASS, T_MANY_HDRS_LCASE, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mailout2.w1.samsung.com Received: from mailout2.w1.samsung.com (HELO mailout2.w1.samsung.com) (210.118.77.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (DES-CBC3-SHA encrypted) ESMTPS; Thu, 09 Oct 2014 12:34:56 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0ND6005J2GETIJ70@mailout2.w1.samsung.com> for gcc-patches@gcc.gnu.org; Thu, 09 Oct 2014 13:37:41 +0100 (BST) Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 21.94.25543.BE086345; Thu, 09 Oct 2014 13:34:51 +0100 (BST) Received: from [106.109.128.198] by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0ND6007NIGA2RQ20@eusync1.samsung.com>; Thu, 09 Oct 2014 13:34:51 +0100 (BST) Message-id: <543680EA.6070500@partner.samsung.com> Date: Thu, 09 Oct 2014 16:34:50 +0400 From: Maxim Ostapenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-version: 1.0 To: GCC Patches Cc: Marcus Shawcroft , Jiong Wang , Yury Gribov , Slava Garbuzov , Maxim Ostapenko Subject: [PATCH] Fix GCC tests fail for installed toolchain due to ASan, UBSan and TSan testsuites drop GCC_EXEC_PREFIX. Content-type: multipart/mixed; boundary=------------070209080503050708090307 X-IsSubscribed: yes Hi, After enabling ASan, TSan and UBSan testsuites for installed toolchain, many tests started to fail. This is caused by wrong logic in {asan, ubsan, tsan}_finish functions. Here, restore_ld_library_path is called, that is wrong, because it drops some env variables ( GCC_EXEC_PREFIX, LD_LIBRARY_PATH, etc) to state that was before gcc-dg.exp initialized testing environment, so installed GCC will be confused to find some needed stuff later. Removing restore_ld_library_path from {asan, ubsan, tsan}_finish seems to fix the issue. Tested on x86_64-pc-linux-gnu, ok to commit? -Maxim gcc/testsuite/ChangeLog: 2014-10-09 Max Ostapenko * lib/asan-dg.exp (asan_finish): Remove restore_ld_library_path_env_vars. * lib/tsan-dg.exp (tsan_finish): Likewise. * lib/ubsan-dg.exp (ubsan_finish): Likewise. diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp index 9769138..c98fd3c 100644 --- a/gcc/testsuite/lib/asan-dg.exp +++ b/gcc/testsuite/lib/asan-dg.exp @@ -132,7 +132,6 @@ proc asan_finish { args } { unset TEST_ALWAYS_FLAGS } } - restore_ld_library_path_env_vars } # Symbolize lines like diff --git a/gcc/testsuite/lib/tsan-dg.exp b/gcc/testsuite/lib/tsan-dg.exp index 54ec404..6f7a4d9 100644 --- a/gcc/testsuite/lib/tsan-dg.exp +++ b/gcc/testsuite/lib/tsan-dg.exp @@ -143,5 +143,4 @@ proc tsan_finish { args } { } else { unset dg-do-what-default } - restore_ld_library_path_env_vars } diff --git a/gcc/testsuite/lib/ubsan-dg.exp b/gcc/testsuite/lib/ubsan-dg.exp index 5a7a653..87c460f 100644 --- a/gcc/testsuite/lib/ubsan-dg.exp +++ b/gcc/testsuite/lib/ubsan-dg.exp @@ -114,5 +114,4 @@ proc ubsan_finish { args } { unset TEST_ALWAYS_FLAGS } } - restore_ld_library_path_env_vars }