public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Yolkfull Chow <yzhou@redhat.com>
To: Michael Goldish <mgoldish@redhat.com>
Cc: kvm@vger.kernel.org, autotest@test.kernel.org
Subject: Re: [Autotest] [AUTOTEST PATCH 1/2] KVM-test: Fix a bug that about list slice in scan_results.py
Date: Mon, 25 Jan 2010 10:53:53 +0800	[thread overview]
Message-ID: <20100125025353.GA2260@aFu.nay.redhat.com> (raw)
In-Reply-To: <1311733026.2245921262253140971.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>

On Thu, Dec 31, 2009 at 04:52:20AM -0500, Michael Goldish wrote:
> GOOD/FAIL/ERROR lines are always preceded by START lines, and info_list
> is appended a "" when parsing a START line, so it seems unreasonable
> for info_list to be empty when parsing a GOOD/FAIL/ERROR line.
> What file did you parse when you got that exception?  Can you reproduce
> the problem and show me the file that caused it?
> I guess the file was either corrupt, or of an unknown new format.
> If the latter is true, we should study the new format and modify the
> code accordingly.

Hi Michael,

So sorry for late reply. I just saw this email. Maybe I should consider change the
email client 'mutt' to 'Thunderbird' because I often miss some unread emails. 

And I cannot now find the file cause that exception.But I could reproduce
at that time. Let's temporarily skip this patch now and look into it if find it again in future.

Thanks for your analysis. :)

> 
> ----- "Yolkfull Chow" <yzhou@redhat.com> wrote:
> 
> > If 'info_list' is empty slice operation can result in traceback:
> > 
> > ...
> >       info_list[-1] = parts[5]
> >   IndexError: list assignment index out of range
> > 
> > Signed-off-by: Yolkfull Chow <yzhou@redhat.com>
> > ---
> >  client/tests/kvm/scan_results.py |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> > 
> > diff --git a/client/tests/kvm/scan_results.py
> > b/client/tests/kvm/scan_results.py
> > index f7bafa9..1daff2f 100755
> > --- a/client/tests/kvm/scan_results.py
> > +++ b/client/tests/kvm/scan_results.py
> > @@ -45,6 +45,7 @@ def parse_results(text):
> >          # Found a FAIL/ERROR/GOOD line -- get failure/success info
> >          elif (len(parts) >= 6 and parts[3].startswith("timestamp")
> > and
> >                parts[4].startswith("localtime")):
> > +            info_list.append("")
> >              info_list[-1] = parts[5]
> >  
> >      return result_list
> > -- 
> > 1.6.6
> > 
> > _______________________________________________
> > Autotest mailing list
> > Autotest@test.kernel.org
> > http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2010-01-25  2:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <330437955.2245901262252904715.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-12-31  9:52 ` [AUTOTEST PATCH 1/2] KVM-test: Fix a bug that about list slice in scan_results.py Michael Goldish
2010-01-25  2:53   ` Yolkfull Chow [this message]

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=20100125025353.GA2260@aFu.nay.redhat.com \
    --to=yzhou@redhat.com \
    --cc=autotest@test.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=mgoldish@redhat.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