[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [XTF PATCH 3/3] xtf-runner: support two modes for getting output



On 11/08/16 10:44, Wei Liu wrote:
> On Thu, Aug 11, 2016 at 09:33:57AM +0100, Wei Liu wrote:
>> On Wed, Aug 10, 2016 at 04:07:30PM +0100, Wei Liu wrote:
>> [...]
>>>  
>>> +def run_test_logfile(opts, test):
>>> +    """ Run a specific test via grepping log file"""
>>> +
>>> +    fn = opts.logfile_dir + (opts.logfile_pattern % test)
>>> +    local_time = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())
>>> +
>>> +    # Use time to generate unique stamps
>>> +    start_stamp = "===== XTF TEST START %s =====" % local_time
>>> +    end_stamp = "===== XTF TEST END %s =====" % local_time
>>> +
>>> +    print "Using %s" % fn
>>> +
>>> +    f = open(fn, "ab")
>>> +    f.write(start_stamp + "\n")
>>> +    f.close()
>>> +
>> I think it would make more sense for the micro VM itself to write
>> stamps?
> I want to pass a stamp generated by the runner to micro VMs, otherwise
> runner wouldn't be able to tell which stamps are the right one.
>
> For PV guests it works because there is start_info->cmd_line.
> Unfortunately I can't seem to find a place for putting in a command line
> for hvm guest in the ABI. Newer version of Xen will have a boot ABI that
> supports command line. This mode is mainly for old versions of Xen so I
> don't see how it is possibly at this stage to uniformly support both old
> and new versions of Xen.
>
> Maybe we need to live with running adding the stamp? Let me know if I
> miss anything.

I haven't managed to come up with a reasonable way to get a command line
into an HVM guest yet.  The best I managed was a xenstore key, but that
gets in the way of doing xenstore ring testing in XTF, and still
requires going behind the back of the toolstack.

Can't you just open the log file as read, seek to the end, run the test
and read again from the same FD?  It would be rather more simple than
marking the logs.

Sadly, whatever method we use here is going to have to be clever enough
to cope with the log files being rotated, and I can't think of a clever
way of doing that ATM.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.