From: Subrata Modak <subrata@linux.vnet.ibm.com>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Linux Test Project <Ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH] quotactl01: Fix tst_resm() format causing crash
Date: Wed, 16 Sep 2009 20:47:15 +0530 [thread overview]
Message-ID: <1253114235.6343.31.camel@subratamodak.linux.ibm.com> (raw)
In-Reply-To: <alpine.LRH.2.00.0909151727490.29706@vixen.sonytel.be>
On Tue, 2009-09-15 at 17:28 +0200, Geert Uytterhoeven wrote:
> When the quotactl syscall fails, quotactl01 crashes with a segmentation fault
> due to an incorrect printf()-style format.
>
> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Thanks.
Regards--
Subrata
> --
> v2: Use TTERRNO
>
> testcases/kernel/syscalls/quotactl/quotactl01.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/quotactl/quotactl01.c b/testcases/kernel/syscalls/quotactl/quotactl01.c
> index 6800a25..fe8df33 100644
> --- a/testcases/kernel/syscalls/quotactl/quotactl01.c
> +++ b/testcases/kernel/syscalls/quotactl/quotactl01.c
> @@ -147,7 +147,7 @@ int main(int ac, char **av) {
> for (i = 0; i <= 7; i++){
> TEST(retval = syscall(__NR_quotactl, cmd[i], (const char *)NULL, id, (caddr_t)NULL));
> if(TEST_RETURN != 0){
> - tst_resm(TFAIL, "%s failed - errno = %d : %s ...cmderror=%s", TCID, TEST_ERRNO, strerror(TEST_ERRNO),cmd[i]);
> + tst_resm(TFAIL|TTERRNO, "%s failed, cmd=0x%x", TCID, cmd[i]);
> }else{
> tst_resm(TPASS, "quotactl call succeeded");
> }
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2009-09-16 15:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-15 15:28 [LTP] [PATCH] quotactl01: Fix tst_resm() format causing crash Geert Uytterhoeven
2009-09-16 15:17 ` Subrata Modak [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-08-27 15:04 Geert Uytterhoeven
2009-08-27 19:22 ` Mike Frysinger
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=1253114235.6343.31.camel@subratamodak.linux.ibm.com \
--to=subrata@linux.vnet.ibm.com \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=Ltp-list@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.