From: Siddhesh Poyarekar <siddhesh@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] Fix core dump test case failure with a ulimit check in gdb.base/auxv.exp
Date: Sat, 17 Mar 2012 07:37:00 -0000 [thread overview]
Message-ID: <20120317073755.GB25580@spoyarek.redhat.com> (raw)
In-Reply-To: <4F63613A.4080501@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 289 bytes --]
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 <siddhesh@redhat.com>
* gdb.base/auxv.exp: Disable corefile checks if ulimit-c is 0.
[-- Attachment #2: fix-test-cases-2.patch --]
[-- Type: text/plain, Size: 1443 bytes --]
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 {
next prev parent reply other threads:[~2012-03-17 7:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 14:29 [PATCH] Fix gdb.base/auxv and gdb.base/cond-eval-mode test cases Siddhesh Poyarekar
2012-03-16 15:50 ` Pedro Alves
2012-03-17 7:27 ` Siddhesh Poyarekar
2012-03-19 9:35 ` [commit] " Jan Kratochvil
2012-03-17 7:37 ` Siddhesh Poyarekar [this message]
2012-03-19 9:43 ` [PATCH] Fix core dump test case failure with a ulimit check in gdb.base/auxv.exp Jan Kratochvil
2012-03-19 15:57 ` Siddhesh Poyarekar
2012-03-19 16:13 ` Jan Kratochvil
2012-03-19 16:39 ` Siddhesh Poyarekar
2012-03-19 18:40 ` [commit] " Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120317073755.GB25580@spoyarek.redhat.com \
--to=siddhesh@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox