From patchwork Thu Sep 25 07:52:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 2966 Received: (qmail 19787 invoked by alias); 25 Sep 2014 07:57:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 19775 invoked by uid 89); 25 Sep 2014 07:57:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 25 Sep 2014 07:57:27 +0000 Received: from svr-orw-fem-02x.mgc.mentorg.com ([147.34.96.206] helo=SVR-ORW-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XX3vY-0001MX-71 from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Thu, 25 Sep 2014 00:57:24 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.3.181.6; Thu, 25 Sep 2014 00:57:23 -0700 From: Yao Qi To: Subject: [PATCH] Skip dlopen-libpthread.exp in cross testing Date: Thu, 25 Sep 2014 15:52:51 +0800 Message-ID: <1411631571-30769-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes I see the following fails on arm-linux-gnueabi, result of ldd build-git/arm/gdb/testsuite/gdb.threads/dlopen-libpthread.so is 1 output of ldd build-git/arm/gdb/testsuite/gdb.threads/dlopen-libpthread.so is not a dynamic executable child process exited abnormally FAIL: gdb.threads/dlopen-libpthread.exp: ldd dlopen-libpthread.so FAIL: gdb.threads/dlopen-libpthread.exp: ldd dlopen-libpthread.so output contains libs the test script invokes ldd (on host) for the target libraries, which is wrong. ldd can't be cross because it invokes dynamic linker with LD_TRACE_LOADED_OBJECTS and gets the dependent libraries. My first reaction to this problem is to execute ld.so on the target (like remote_exec target). When I start to hack proc build_executable_own_libs, I find it has assumptions here and there that the native testing is performed. Then I check the callers of build_executable_own_libs, and they are all skipped if isnative is false. It is reasonable to do the same in dlopen-libpthread.exp too. gdb/testsuite: 2014-09-25 Yao Qi * gdb.threads/dlopen-libpthread.exp: Skip it if isnative is false. --- gdb/testsuite/gdb.threads/dlopen-libpthread.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.threads/dlopen-libpthread.exp b/gdb/testsuite/gdb.threads/dlopen-libpthread.exp index f0e3358..265eb5d 100644 --- a/gdb/testsuite/gdb.threads/dlopen-libpthread.exp +++ b/gdb/testsuite/gdb.threads/dlopen-libpthread.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if {![istarget *-linux*] || [skip_shlib_tests]} { +if {![isnative] || ![istarget *-linux*] || [skip_shlib_tests]} { return 0 }