From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20119 invoked by alias); 29 Oct 2007 22:55:09 -0000 Received: (qmail 20100 invoked by uid 22791); 29 Oct 2007 22:55:07 -0000 X-Spam-Check-By: sourceware.org Received: from mu-out-0910.google.com (HELO mu-out-0910.google.com) (209.85.134.186) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 29 Oct 2007 22:55:04 +0000 Received: by mu-out-0910.google.com with SMTP id g7so2275420muf for ; Mon, 29 Oct 2007 15:55:01 -0700 (PDT) Received: by 10.82.138.6 with SMTP id l6mr12026643bud.1193698499823; Mon, 29 Oct 2007 15:54:59 -0700 (PDT) Received: from ?78.130.29.130? ( [78.130.29.130]) by mx.google.com with ESMTPS id f7sm1730343nfh.2007.10.29.15.54.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 29 Oct 2007 15:54:58 -0700 (PDT) Message-ID: <4726649E.2060201@portugalmail.pt> Date: Mon, 29 Oct 2007 23:36:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [testsuite] Use [string compare] instead of eq and ne Content-Type: multipart/mixed; boundary="------------060304090805050405010204" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00783.txt.bz2 This is a multi-part message in MIME format. --------------060304090805050405010204 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 300 Hi, My kubuntu 6.06 comes with a version of expect that doesn't understand eq or ne operators. I can't see them being used anywhere else in the whole testsuite, so I take it they shouldn't really be used. Without this patch, the sepdebug.exp was untested due to tcl errors. Cheers, Pedro Alves --------------060304090805050405010204 Content-Type: text/x-diff; name="sepdebug.exp.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sepdebug.exp.diff" Content-length: 2031 2007-10-29 Pedro Alves * lib/gdb.exp, gdb.base/sepdebug.exp: Replace usage of eq and ne with [string compare]. --- gdb/testsuite/gdb.base/sepdebug.exp | 6 +++--- gdb/testsuite/lib/gdb.exp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) Index: src/gdb/testsuite/gdb.base/sepdebug.exp =================================================================== --- src.orig/gdb/testsuite/gdb.base/sepdebug.exp 2007-10-29 20:33:26.000000000 +0000 +++ src/gdb/testsuite/gdb.base/sepdebug.exp 2007-10-29 20:34:20.000000000 +0000 @@ -955,7 +955,7 @@ test_different_dir debuglink "${objdir}/ # NT_GNU_BUILD_ID / .note.gnu.build-id test: set build_id_debug_filename [build_id_debug_filename_get $binfile] -if {$build_id_debug_filename eq ""} { +if ![string compare $build_id_debug_filename ""] then { unsupported "build-id is not supported by the compiler" # Spare debug files may confuse testsuite runs in the future. @@ -964,10 +964,10 @@ if {$build_id_debug_filename eq ""} { set build_id_debugself_filename [build_id_debug_filename_get $debugfile] set test "build-id support by binutils" set xfail 0 - if {$build_id_debugself_filename eq ""} { + if ![string compare $build_id_debugself_filename ""] then { unsupported $test set xfail 1 - } elseif {$build_id_debugself_filename ne $build_id_debug_filename} { + } elseif {[string compare $build_id_debugself_filename $build_id_debug_filename] != 0} then { fail $test } else { pass $test Index: src/gdb/testsuite/lib/gdb.exp =================================================================== --- src.orig/gdb/testsuite/lib/gdb.exp 2007-10-29 20:33:14.000000000 +0000 +++ src/gdb/testsuite/lib/gdb.exp 2007-10-29 20:33:30.000000000 +0000 @@ -2505,7 +2505,7 @@ proc build_id_debug_filename_get { exec set data [read $fi] close $fi file delete $tmp - if {$data eq ""} { + if ![string compare $data ""] then { return "" } # Convert it to hex. --------------060304090805050405010204--