qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Acceptance tests: add Linux initrd checking tes


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH] Acceptance tests: add Linux initrd checking test
Date: Thu, 18 Oct 2018 21:37:25 -0300
User-agent: Mutt/1.9.2 (2017-12-15)

On Thu, Oct 18, 2018 at 07:52:58PM -0400, Cleber Rosa wrote:
[...]
> >>> +            expected_msg = r'.*initrd is too large.*max: \d+, need \d+.*'
> >>
> >> I'd be a bit more assertive here and do something like:
> >>
> >>       expected_msg = r'.*initrd is too large.*max: \d+, need %d\)' %
> >> max_size
> >>
> >> And if "134053887" (which appears in "max"), is a QEMU constant, that
> >> can be added there as well.
> > 
> > I was going to suggest the opposite: just checking if the error
> > message contains "initrd is too large".  If we ensure the exit
> > status is 1, the exact format of the error message isn't very
> > important.
> > 
> 
> It's certainly a matter of style here, and both are fine to me, but I'd
> rather have someone touching that part of the code to also have to touch
> the test if the message changes.
> 
> Note that I can't predict if this will eventually catch a regression
> that the simpler message you suggest wouldn't, but, I, personally,
> prefer to be safe than sorry.

I see your point, and I would probably prefer your approach if we
already had QEMU developers used to writing and running
acceptance tests once in a while.

Anyway, both approaches would be good enough to me.

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]