All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
To: Linux Test Project <Ltp-list@lists.sourceforge.net>
Subject: [LTP] [PATCH] quotactl01: Fix tst_resm() format causing crash
Date: Thu, 27 Aug 2009 17:04:40 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LRH.2.00.0908271703550.1134@vixen.sonytel.be> (raw)

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>
---
 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..0be4fd5 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, "%s failed - errno = %d : %s ...cmd=0x%x", TCID, TEST_ERRNO, strerror(TEST_ERRNO), cmd[i]);
                         }else{
         			tst_resm(TPASS, "quotactl call succeeded");
                         }
-- 
1.6.2.4

With kind regards,

Geert Uytterhoeven
Software Architect
Techsoft Centre

Technology and Software Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

             reply	other threads:[~2009-08-27 15:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-27 15:04 Geert Uytterhoeven [this message]
2009-08-27 15:29 ` [LTP] [PATCH] Annotate tst_*() helpers with __attribute__ ((format (printf, M, N))) (was: Re: [PATCH] quotactl01: Fix tst_resm() format causing crash) Geert Uytterhoeven
2009-08-28  6:08   ` Subrata Modak
2009-08-28  8:38     ` Subrata Modak
2009-08-28  8:48       ` Geert Uytterhoeven
2009-08-28 10:16         ` [LTP] [PATCH] Annotate tst_*() helpers with __attribute__ ((format (printf, M, N))) Mike Frysinger
2009-08-28  9:14       ` [LTP] [PATCH] Annotate tst_*() helpers with __attribute__ ((format (printf, M, N))) (was: Re: [PATCH] quotactl01: Fix tst_resm () format causing crash ) Mike Frysinger
2009-08-28 10:11         ` Subrata Modak
2009-08-28 14:44           ` [LTP] [PATCH] Annotate tst_*() helpers with __attribute__ ((format (printf, M, N))) Mike Frysinger
2009-08-28 14:54             ` [LTP] [PATCH] Annotate tst_*() helpers with?__attribute__ " Cyril Hrubis
     [not found]               ` <200908281106.13828.vapier@gentoo.org>
2009-08-28 16:29                 ` Cyril Hrubis
     [not found]                   ` <200908281517.46228.vapier@gentoo.org>
2009-08-31 10:06                     ` Cyril Hrubis
     [not found]                       ` <200908311633.32124.vapier@gentoo.org>
2009-09-03 18:05                         ` Cyril Hrubis
2009-08-30 17:37             ` [LTP] [PATCH] Annotate tst_*() helpers with __attribute__ " Subrata Modak
2009-08-27 19:22 ` [LTP] [PATCH] quotactl01: Fix tst_resm() format causing crash Mike Frysinger
2009-09-15 15:28 Geert Uytterhoeven
2009-09-16 15:17 ` Subrata Modak

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=alpine.LRH.2.00.0908271703550.1134@vixen.sonytel.be \
    --to=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.