qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] iotests: drop group file


From: Kevin Wolf
Subject: Re: [PATCH] iotests: drop group file
Date: Tue, 24 Mar 2020 11:35:07 +0100
User-agent: Mutt/1.12.1 (2019-06-15)

Am 24.03.2020 um 11:21 hat Daniel P. Berrangé geschrieben:
> On Tue, Mar 24, 2020 at 01:02:18PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> > 24.03.2020 12:36, Kevin Wolf wrote:
> > > Am 24.03.2020 um 08:41 hat Vladimir Sementsov-Ogievskiy geschrieben:
> > > > When sending iotests to upstream or do patch porting from one branch
> > > > to another we very often have to resolve conflicts in group file, as
> > > > many absolutely independent features are intersecting by this file.
> > > > These conflicts are simple, but imagine how much time we all have
> > > > already spent on resolving them? Let's finally get rid of group file.
> > > > 
> > > > This patch transposes group info: instead of collecting it in one file,
> > > > let each test define its groups by itself.
> > > > 
> > > > Several steps are done to achive it:
> > > > 
> > > > 1. Define groups in test files automatically:
> > > > 
> > > >      grep '^[0-9]\{3\} ' group | while read line; do
> > > >          file=$(awk '{print $1}' <<< "$line");
> > > >          groups=$(sed -e 's/^... //' <<< "$line");
> > > >          awk "NR==2{print \"# group: $groups\"}1" $file > tmp;
> > > >          cat tmp > $file;
> > > >      done
> > > > 
> > > > 2. Copy groups documentation into docs/devel/testing.rst, which already
> > > >     has a section about iotests.
> > > > 
> > > > 3. Modify check script to work without group file.
> > > > 
> > > >     Here is a logic change: before, even if test do not belong to any
> > > >     group (only iotest 142 currently) it should be defined in group
> > > >     file. Now, test is not forced to define any group. Instead check
> > > >     considers all files with names matching [0-9][0-9][0-9] as tests.
> > > 
> > > This has both a positive and a negative effect: Now you don't have to
> > > modify another file when you add a new test, but it will be picked up
> > > automatically. However, if you want to disable a test, you could
> > > previously just remove it from groups (or comment it out), and now you
> > > have to delete the test instead.
> > 
> > Hmm. Probably, you could add it to group "disabled", and run check -x 
> > disabled.
> 
> As a developer you don't really want to be making changes to git tracked
> files in order to temporarily skip a test, as then git reports them as
> modified & you risk accidentally committing throwaway changes.
> 
> Better to have a separate groups.local file to record local overrides
> in a non-tracked file.

For locally disabling tests, we have that 'expunged' file that nobody
knows about and that I just found when we were reformatting the ./check
output...

I wouldn't want to use that for disabling the tests in a downstream
repository, though, it should stay a local thing even there.

Kevin




reply via email to

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