From: Doug Evans <xdje42@gmail.com>
To: Sergio Durigan Junior <sergiodj@redhat.com>
Cc: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Improve and fix catch-syscall.exp
Date: Sun, 15 Dec 2013 18:31:00 -0000 [thread overview]
Message-ID: <m3a9g27yr8.fsf@sspiff.org> (raw)
In-Reply-To: <m37gb85p2o.fsf@redhat.com> (Sergio Durigan Junior's message of "Fri, 13 Dec 2013 21:05:51 -0200")
Sergio Durigan Junior <sergiodj@redhat.com> writes:
> Hi,
>
> While fixing another bug, I found that the current
> gdb.base/catch-syscall.exp is kind of messy, could use some
> improvements, and is not correctly testing some things.
>
> I've made the following patch to address all the issues I found. On the
> organization side, it does a cleanup and removes unecessary imports of
> gdb_prompt, uses prepare_for_testing and clean_restart where needed, and
> fixes some comments. The testcase was also not correctly testing
> catching syscalls using only numbers, or catching many syscalls at
> once. I fixed that. This is good because I will soon submit another
> patch to fix a bug on catch syscall which will make use of the new
> things I've added.
>
> I tested this on x86_64 Fedora 18, and I'm waiting for machines to test
> on PPC and ARM at least, but I checked the syscalls numbers on every
> architecture supported by the patch to make sure everything was OK.
>
> OK to apply?
Hi.
I was wondering, what if the magic numbers that are the syscall
numbers were recorded in the test .c file like:
int close_syscall_number = foo;
and then have the .exp fetch these values after running-to-main.
That would save having to record syscall numbers in the .exp,
and all the conditionals to test for the architecture.
Not sure there isn't a flaw in this plan,
and I guess it's debatable whether it's better to just record
the numbers in the .exp or reference the __NR_* numbers from asm/unistd*.h
in the .c, but it sounds promising.
next prev parent reply other threads:[~2013-12-15 18:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-13 23:06 Sergio Durigan Junior
2013-12-15 18:31 ` Doug Evans [this message]
2013-12-15 18:44 ` Doug Evans
2013-12-16 4:24 ` Sergio Durigan Junior
2013-12-16 4:20 ` Sergio Durigan Junior
2013-12-16 23:09 ` Sergio Durigan Junior
2013-12-17 10:24 ` Pedro Alves
2013-12-17 17:35 ` Sergio Durigan Junior
2013-12-18 21:10 ` Doug Evans
2013-12-18 22:26 ` Sergio Durigan Junior
2013-12-16 17:50 ` Pedro Alves
2013-12-16 17:59 ` Sergio Durigan Junior
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=m3a9g27yr8.fsf@sspiff.org \
--to=xdje42@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=sergiodj@redhat.com \
/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