Hi, --- Jiri Palecek <[EMAIL PROTECTED]> wrote:
> Hello, > > when calling tst_resm (and several other tst_* functions) with a > string > containinig "%%", tst_resm would not output a percent sign, but > formats some > data instead (eg. "%%fs" in fork05 test ends up as "0.00000s". This > is because > once the escapes have been processed by tst_resm, they are processed > again by > tst_res called by tst_resm. The attached patch fixes this behaviour. > > Regards > Jiri Palecek > > > From bbf71ee33a740432575fce61a26f6ada80d56cbb Mon Sep 17 00:00:00 > 2001 > From: Jiri Palecek <[EMAIL PROTECTED](none)> > Date: Mon, 25 Aug 2008 21:45:05 +0200 > Subject: [PATCH] Fix double unescaping error in tst_resm > > --- > lib/tst_res.c | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/lib/tst_res.c b/lib/tst_res.c > index 8308ce0..0f8cbdd 100644 > --- a/lib/tst_res.c > +++ b/lib/tst_res.c > @@ -607,7 +607,7 @@ tst_brk(int ttype, char *fname, void (*func)(), > char *arg_fmt, ...) > * Print the first result, if necessary. > */ > if ( Tst_count < TST_TOTAL ) > - tst_res(ttype, fname, tmesg); > + tst_res(ttype, fname, "%s", tmesg); > > /* > * Determine the number of results left to report. > @@ -689,7 +689,7 @@ tst_brkloop(int ttype, char *fname, void > (*func)(), char *arg_fmt, ...) > * Print the first result, if necessary. > */ > if ( Tst_count < Tst_lpstart + Tst_lptotal ) > - tst_res(ttype, fname, tmesg); > + tst_res(ttype, fname, "%s", tmesg); > > /* > * Determine the number of results left to report. > @@ -741,7 +741,7 @@ tst_resm(int ttype, char *arg_fmt, ...) > /* > * Call tst_res with a null filename argument. > */ > - tst_res(ttype, NULL, tmesg); > + tst_res(ttype, NULL, "%s", tmesg); > } /* tst_resm() */ > > > -- > 1.5.6.5 > > Signed-off-by: Jiri Palecek <[EMAIL PROTECTED]> > > Acked-by: CAI Qian <[EMAIL PROTECTED]> ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/> _______________________________________________ > Ltp-list mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ltp-list > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
