From: Subrata Modak <subrata@linux.vnet.ibm.com>
To: Marc Gauthier <marc@tensilica.com>
Cc: rohit verma <rohit.170309@gmail.com>, Ltp-List <ltp-list@lists.sf.net>
Subject: Re: [LTP] [PATCH] Detect test results more accurately when generating HTML
Date: Wed, 27 May 2009 19:54:14 +0530 [thread overview]
Message-ID: <1243434255.10447.19.camel@subratamodak.linux.ibm.com> (raw)
In-Reply-To: <522C1DF17AF50042AD8AE87F7887BD3D0158B35AB4@exch.hq.tensilica.com>
On Wed, 2009-05-27 at 05:05 -0700, Marc Gauthier wrote:
> Just so you know, the updated genhtml.pl script recently submitted
> should work just fine without changes, when moving status after
> <<<execution_status>>> (it only looks at tag names, not positions).
Be careful, it looks for <<<execution_status>>> only in between
<<test_start>> & <<test_output>>.
Regards--
Subrata
>
> -Marc
>
>
> rohit verma wrote:
> > Hi Marc,
> >
> > I think this a possible solution. I think the tag "initiation_status="
> > can be moved after <<<execution_status>>>. Moving this tag to
> > write_test_end() and shifting write_test_start() before fork() might
> > solve the problem. However, corresponding changes have to be done in
> > genhtml.pl
> >
> > Subrata: Just let me your view on this. I'll try and come up with a
> > patch if the changes are acceptable.
> >
> > Regards,
> > Rohit.
> >
> >
> >
> > On Wed, May 27, 2009 at 1:44 AM, Marc Gauthier
> > <marc@tensilica.com> wrote:
> > > Okay, so I looked at it a bit...
> > >
> > > Isn't the fundamental race condition because pan outputs
> > > <<<test_start>>> *after* doing the fork(), rather than before?
> > >
> > > If some status info can't be output that early, maybe it just
> > > needs to be output after <<<execution_status>>> as part of
> > > write_test_end() ?
> > >
> > > -Marc
> > >
> > > P.S. I find it useful to run genhtml against older LTP releases
> > > (including those without genhtml), so might be useful to keep the
> > > out-of-order workarounds even if ordering is fixed in this release.
> > >
> > >
> > > Subrata Modak wrote:
> > >> How much would you want to delay ? May be to some microsecs !!
> > >> However delaying is not a good option, but, i am ready to consider.
> > >> See, what is the reasanable time so that this problem vanishes.
> > >>
> > >> Meanwhile, i have generated this small patch. It tries to
> > >> flush all data
> > >> to be written to STDOUT before the Parent (PAN) tries to write his
> > >> next tag. Moreover, i have included the fflush() to be
> > executed inside
> > >> the if()´s domain whenever the parent is writing from
> > <<test_start>>
> > >> till <<test_output>>. See, if this can help in solving the problem.
> > >>
> > >> Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
> > >> ---
> > >>
> > >> --- ltp-intermediate-20090521/pan/ltp-pan.c.orig
> > >> 2009-05-26 16:30:39.000000000 +0530
> > >> +++ ltp-intermediate-20090521/pan/ltp-pan.c 2009-05-26
> > >> 19:44:37.000000000 +0530
> > >> @@ -1015,6 +1015,7 @@ static pid_t run_child(struct coll_entry
> > >> errbuf[errlen] = '\0';
> > >> /* fprintf(stderr, "%s", errbuf); */
> > >> waitpid(cpid, &status, 0);
> > >> + fflush(stdout); /* Flush any data before
> > >> writing <<test_end>>*/
> > >> if (WIFSIGNALED(status)) {
> > >> termid = WTERMSIG(status);
> > >> termtype = "signaled";
> > >> @@ -1300,14 +1301,14 @@ static void copy_buffered_output(struct
> > >>
> > >> static void write_test_start(struct tag_pgrp *running, const
> > >> char *init_status)
> > >> {
> > >> - if (!strcmp(reporttype, "rts"))
> > >> + if (!strcmp(reporttype, "rts")) {
> > >> printf("%s\ntag=%s
> > >> stime=%ld\ncmdline=\"%s\"\ncontacts=\"%s\"\nanalysis=%s\niniti
> > > ation_status=\"%s\"\n%s\n",
> > >> "<<<test_start>>>",
> > >> running->cmd->name, running->mystime,
> > >> running->cmd->cmdline, "",
> > >> "exit", init_status,
> > >> "<<<test_output>>>");
> > >> -
> > >> fflush(stdout);
> > >> + }
> > >> }
> > >>
> > >
> >
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2009-05-27 14:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-26 14:27 [LTP] [PATCH] Detect test results more accurately when generating HTML Subrata Modak
2009-05-26 20:14 ` Marc Gauthier
2009-05-27 6:44 ` rohit verma
2009-05-27 12:05 ` Marc Gauthier
2009-05-27 14:24 ` Subrata Modak [this message]
2009-05-27 14:58 ` Marc Gauthier
2009-05-29 12:54 ` Subrata Modak
2009-06-01 12:47 ` rohit verma
2009-06-02 12:33 ` rohit verma
2009-06-04 9:27 ` Subrata Modak
2009-06-09 18:24 ` Subrata Modak
2009-05-27 14:23 ` Subrata Modak
-- strict thread matches above, loose matches on Subject: below --
2009-05-21 8:13 Marc Gauthier
2009-05-22 6:52 ` Subrata Modak
2009-05-22 7:13 ` rohit verma
2009-05-22 9:13 ` Marc Gauthier
2009-05-22 9:25 ` rohit verma
2009-05-25 16:12 ` 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=1243434255.10447.19.camel@subratamodak.linux.ibm.com \
--to=subrata@linux.vnet.ibm.com \
--cc=ltp-list@lists.sf.net \
--cc=marc@tensilica.com \
--cc=rohit.170309@gmail.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