From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12370 invoked by alias); 17 Mar 2012 07:37:10 -0000 Received: (qmail 12248 invoked by uid 22791); 17 Mar 2012 07:37:08 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 17 Mar 2012 07:36:55 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2H7asLU012389 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 17 Mar 2012 03:36:54 -0400 Received: from spoyarek.redhat.com (vpn1-5-20.ams2.redhat.com [10.36.5.20]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2H7anlm006117 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Sat, 17 Mar 2012 03:36:53 -0400 Date: Sat, 17 Mar 2012 07:37:00 -0000 From: Siddhesh Poyarekar To: gdb-patches@sourceware.org Subject: [PATCH] Fix core dump test case failure with a ulimit check in gdb.base/auxv.exp Message-ID: <20120317073755.GB25580@spoyarek.redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b5gNqxB1S1yM7hjW" Content-Disposition: inline In-Reply-To: <4F63613A.4080501@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2012-03/txt/msg00649.txt.bz2 --b5gNqxB1S1yM7hjW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 289 Hi, The auxv test case gives a test case failure when ulimit -c is 0. I have added a check to disable the test if ulimit is 0. Regards, Siddhesh testsuite/ChangeLog: 2012-03-16 Siddhesh Poyarekar * gdb.base/auxv.exp: Disable corefile checks if ulimit-c is 0. --b5gNqxB1S1yM7hjW Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="fix-test-cases-2.patch" Content-length: 1443 diff --git a/gdb/testsuite/gdb.base/auxv.exp b/gdb/testsuite/gdb.base/auxv.exp index da10f05..e1b8cb0 100644 --- a/gdb/testsuite/gdb.base/auxv.exp +++ b/gdb/testsuite/gdb.base/auxv.exp @@ -42,8 +42,19 @@ set coredir "${objdir}/${subdir}/coredir.[getpid]" file mkdir $coredir set core_works [expr [isnative] && ! [is_remote target]] -# Run GDB on the test program up to where it will dump core. +global gdb_prompt + +gdb_exit +gdb_start +send_gdb "shell ulimit -c\n" +gdb_expect { + -re "0\r\n$gdb_prompt $" { + warning "ulimit -c is 0, disabling core tests" + set core_works 0 + } +} +# Run GDB on the test program up to where it will dump core. gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir @@ -51,11 +62,9 @@ gdb_load ${binfile} gdb_test_no_output "set print sevenbit-strings" gdb_test_no_output "set width 0" -if {$core_works} { - if {[gdb_test "cd $coredir" ".*Working directory .*" \ - "cd to temporary directory for core dumps"]} { - set core_works 0 - } +if {[gdb_test "cd $coredir" ".*Working directory .*" \ + "cd to temporary directory for core dumps"]} { + set core_works 0 } if { ![runto_main] } then { @@ -154,7 +163,7 @@ if {$core_works} { pass $test } else { set core_works 0 - warning "can't generate a core file - core tests suppressed - check ulimit -c" + warning "can't generate a core file - core tests suppressed" fail $test } } else { --b5gNqxB1S1yM7hjW--