[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [OSSTEST PATCH v13 19/24] TestSupport: Implement target_subunit_cmd a subunit stream parser into substeps
On Tue, Jul 25, 2017 at 07:00:47PM +0100, Ian Jackson wrote: > Anthony PERARD writes ("[OSSTEST PATCH v13 19/24] TestSupport: Implement > target_subunit_cmd a subunit stream parser into substeps"): > > + # Read chunks of a part > > + while (<$stdout>) { > > + if (/^([0-9A-F]+)\r$/i) { > > + my $chunk_size = hex($1); [...] > > + } else { > > + # Unexpected output > > + chomp; > > + logm("*** $_"); > > I guess the error recovery is to continue until you see "]" > and hope. Fair enough. Actually, in the chunk parser, the only expected output is an hex number for a chunk size. There is nothing that parse "]". So the only error recovery would be to find a line that only contain a hex number, this could be the next "0\r\n" if part ends with a "\n", which I think is likely. Only the loop that parse the multipart check for "]". Maybe I could end the chunks parser loop and go back to the multipart parser loop. -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |