|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [OSSTEST PATCH v12 18/21] TestSupport: Implement target_cmd_subunit a subunit stream parser into substeps
On Thu, Jul 13, 2017 at 03:43:55PM +0100, Anthony PERARD wrote:
> On Thu, Jul 13, 2017 at 02:28:11PM +0100, Ian Jackson wrote:
> > Anthony PERARD writes ("[OSSTEST PATCH v12 18/21] TestSupport: Implement
> > target_cmd_subunit a subunit stream parser into substeps"):
> > > +sub target_cmd_subunit ($$;$$) {
> > > + my $stdout = IO::File::new_tmpfile();
> > > + my $rc = tcmd(undef,$stdout,0, 'osstest', @_);
> >
> > It would be better to staxh the original subunit output. And I would
> > prefer to avoid direct use of tcmd here. So can you introduce
> > target_cmd_stashed
> > which calls open_unique_stashfile and tcmd, and then use that in your
> > subunit subroutine? (And yes this might duplicte output I think.)
>
> Will do. And yes, this will duplicate most of the output. But it can
> help debug osstest, for everything that the parser ignore.
I can't figure out what should target_cmd_stashed prototype be. Should
it be like target_cmd_output (returning the output of the cmd) ? Or
maybe like target_cmd but return a filename (which contain the output of
the cmd) ? I thought also about returning an file descriptor but it may
not be a good idee to leave the caller with an open fd.
Also, how to call the stashed file ? So far, I would go with "$job". Or
maybe adding an argument to target_cmd_stashed so the caller can choose
a filename.
--
Anthony PERARD
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |