This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix core dump test case failure with a ulimit check in gdb.base/auxv.exp


On Mon, Mar 19, 2012 at 10:42:18AM +0100, Jan Kratochvil wrote:
> And as 'ulimit -c unlimited' in this case would be complicated - or at least
> ot well compatible across platforms, there should be IMO setrlimit in the .c
> file instead.  It should be protected by #ifdef and the compilation should be
> tried with and without it, as I guess setrlimit is also not well compatible
> across platforms.
> 

Thanks for your review. I have redone this fix according to your
suggestion, by implementing setrlimit in the code. To check whether
setrlimit and sys/resource.h exist, I added an auto-header feature to
the testsuite configure script and got it to generate lib/config.h
with the necessary #defines, which auxv.c now uses. This should be
usable across other test cases too.

Updated patch attached.

Regards,
Siddhesh

testsuite/ChangeLog:

2012-03-19  Siddhesh Poyarekar  <siddhesh@redhat.com>

	* Makefile.in: Add abs_builddir to CFLAGS_FOR_TARGET in
	site.exp.
	* configure.ac: Add check for setrlimit and sys/resource.h.
	Generate config.h for test cases to use.
	* gdb.base/auxv.c: Include config.h.
	(func2): setrlimit to infinity to enable core dumps.
	* configure: Regenerate.
	* lib/config.in: New file autogenerated by autoheader-2.64

Attachment: 0001-Fix-test-case-failure-for-core-dumps.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]