diff mbox

[1/2] qemu-iotests: Speed up make check-block

Message ID 1414478736-30064-2-git-send-email-famz@redhat.com
State New
Headers show

Commit Message

Fam Zheng Oct. 28, 2014, 6:45 a.m. UTC
Using /tmp (usually mounted as tmpfs) and cache=writeback, the quick
group can be quicker.

On my laptop (Lenovo T430s with Fedora 20), this reduces the time from
50s to 30s.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 tests/qemu-iotests-quick.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Markus Armbruster Nov. 25, 2014, 7:22 a.m. UTC | #1
Fam Zheng <famz@redhat.com> writes:

> Using /tmp (usually mounted as tmpfs) and cache=writeback, the quick
> group can be quicker.
>
> On my laptop (Lenovo T430s with Fedora 20), this reduces the time from
> 50s to 30s.
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  tests/qemu-iotests-quick.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/qemu-iotests-quick.sh b/tests/qemu-iotests-quick.sh
> index 12af731..0b54dbf 100755
> --- a/tests/qemu-iotests-quick.sh
> +++ b/tests/qemu-iotests-quick.sh
> @@ -3,6 +3,6 @@
>  cd tests/qemu-iotests
>  
>  ret=0
> -./check -T -qcow2 -g quick || ret=1
> +TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c
> writeback || ret=1
>  
>  exit $ret

Should we let users specify another directory in the environment?

Like this:

: ${TEST_DIR=/tmp/qemu-iotests-quick-$$}
ret=0
./check -T -qcow2 -g quick || ret=1
Max Reitz Nov. 25, 2014, 9:12 a.m. UTC | #2
On 2014-10-28 at 07:45, Fam Zheng wrote:
> Using /tmp (usually mounted as tmpfs) and cache=writeback, the quick
> group can be quicker.
>
> On my laptop (Lenovo T430s with Fedora 20), this reduces the time from
> 50s to 30s.
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>   tests/qemu-iotests-quick.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/qemu-iotests-quick.sh b/tests/qemu-iotests-quick.sh
> index 12af731..0b54dbf 100755
> --- a/tests/qemu-iotests-quick.sh
> +++ b/tests/qemu-iotests-quick.sh
> @@ -3,6 +3,6 @@
>   cd tests/qemu-iotests
>   
>   ret=0
> -./check -T -qcow2 -g quick || ret=1
> +TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c writeback || ret=1

There are (at least) two tests which don't work with -c writeback (026 
and 039), one of them is in the quick group (039). Why not use -c 
writethrough? It doesn't make any difference on tmpfs anyway  (we can't 
omit it because that will break 091).

And thank you, I didn't know about TEST_DIR. I always built the full 
qemu in /tmp. *g*

Max

>   exit $ret
Kevin Wolf Nov. 25, 2014, 9:21 a.m. UTC | #3
Am 25.11.2014 um 10:12 hat Max Reitz geschrieben:
> On 2014-10-28 at 07:45, Fam Zheng wrote:
> >Using /tmp (usually mounted as tmpfs) and cache=writeback, the quick
> >group can be quicker.
> >
> >On my laptop (Lenovo T430s with Fedora 20), this reduces the time from
> >50s to 30s.
> >
> >Signed-off-by: Fam Zheng <famz@redhat.com>
> >---
> >  tests/qemu-iotests-quick.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/tests/qemu-iotests-quick.sh b/tests/qemu-iotests-quick.sh
> >index 12af731..0b54dbf 100755
> >--- a/tests/qemu-iotests-quick.sh
> >+++ b/tests/qemu-iotests-quick.sh
> >@@ -3,6 +3,6 @@
> >  cd tests/qemu-iotests
> >  ret=0
> >-./check -T -qcow2 -g quick || ret=1
> >+TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c writeback || ret=1
> 
> There are (at least) two tests which don't work with -c writeback
> (026 and 039), one of them is in the quick group (039). Why not use
> -c writethrough? It doesn't make any difference on tmpfs anyway  (we
> can't omit it because that will break 091).

Why use any -c? The default is the fast option writeback, and for those
test cases that don't support writeback, something working is chosen
instead.

Kevin
Max Reitz Nov. 25, 2014, 9:21 a.m. UTC | #4
On 2014-11-25 at 10:21, Kevin Wolf wrote:
> Am 25.11.2014 um 10:12 hat Max Reitz geschrieben:
>> On 2014-10-28 at 07:45, Fam Zheng wrote:
>>> Using /tmp (usually mounted as tmpfs) and cache=writeback, the quick
>>> group can be quicker.
>>>
>>> On my laptop (Lenovo T430s with Fedora 20), this reduces the time from
>>> 50s to 30s.
>>>
>>> Signed-off-by: Fam Zheng <famz@redhat.com>
>>> ---
>>>   tests/qemu-iotests-quick.sh | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/tests/qemu-iotests-quick.sh b/tests/qemu-iotests-quick.sh
>>> index 12af731..0b54dbf 100755
>>> --- a/tests/qemu-iotests-quick.sh
>>> +++ b/tests/qemu-iotests-quick.sh
>>> @@ -3,6 +3,6 @@
>>>   cd tests/qemu-iotests
>>>   ret=0
>>> -./check -T -qcow2 -g quick || ret=1
>>> +TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c writeback || ret=1
>> There are (at least) two tests which don't work with -c writeback
>> (026 and 039), one of them is in the quick group (039). Why not use
>> -c writethrough? It doesn't make any difference on tmpfs anyway  (we
>> can't omit it because that will break 091).
> Why use any -c? The default is the fast option writeback, and for those
> test cases that don't support writeback, something working is chosen
> instead.

Because that breaks 091.

Max
Kevin Wolf Nov. 25, 2014, 9:30 a.m. UTC | #5
Am 25.11.2014 um 10:21 hat Max Reitz geschrieben:
> On 2014-11-25 at 10:21, Kevin Wolf wrote:
> >Am 25.11.2014 um 10:12 hat Max Reitz geschrieben:
> >>On 2014-10-28 at 07:45, Fam Zheng wrote:
> >>>Using /tmp (usually mounted as tmpfs) and cache=writeback, the quick
> >>>group can be quicker.
> >>>
> >>>On my laptop (Lenovo T430s with Fedora 20), this reduces the time from
> >>>50s to 30s.
> >>>
> >>>Signed-off-by: Fam Zheng <famz@redhat.com>
> >>>---
> >>>  tests/qemu-iotests-quick.sh | 2 +-
> >>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>>diff --git a/tests/qemu-iotests-quick.sh b/tests/qemu-iotests-quick.sh
> >>>index 12af731..0b54dbf 100755
> >>>--- a/tests/qemu-iotests-quick.sh
> >>>+++ b/tests/qemu-iotests-quick.sh
> >>>@@ -3,6 +3,6 @@
> >>>  cd tests/qemu-iotests
> >>>  ret=0
> >>>-./check -T -qcow2 -g quick || ret=1
> >>>+TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c writeback || ret=1
> >>There are (at least) two tests which don't work with -c writeback
> >>(026 and 039), one of them is in the quick group (039). Why not use
> >>-c writethrough? It doesn't make any difference on tmpfs anyway  (we
> >>can't omit it because that will break 091).
> >Why use any -c? The default is the fast option writeback, and for those
> >test cases that don't support writeback, something working is chosen
> >instead.
> 
> Because that breaks 091.

That's unfortunate. I wish tmpfs supported O_DIRECT...

But let's just remove it from quick then - it doesn't really matter if
it doesn't run because of the cache mode or because we didn't include it
in the group.

-c writethrough is okay as long as you really have tmpfs on your /tmp,
but it really hurts when you don't (and I for one don't, standard RHEL 7
installation).

Kevin
Max Reitz Nov. 25, 2014, 9:31 a.m. UTC | #6
On 2014-11-25 at 10:30, Kevin Wolf wrote:
> Am 25.11.2014 um 10:21 hat Max Reitz geschrieben:
>> On 2014-11-25 at 10:21, Kevin Wolf wrote:
>>> Am 25.11.2014 um 10:12 hat Max Reitz geschrieben:
>>>> On 2014-10-28 at 07:45, Fam Zheng wrote:
>>>>> Using /tmp (usually mounted as tmpfs) and cache=writeback, the quick
>>>>> group can be quicker.
>>>>>
>>>>> On my laptop (Lenovo T430s with Fedora 20), this reduces the time from
>>>>> 50s to 30s.
>>>>>
>>>>> Signed-off-by: Fam Zheng <famz@redhat.com>
>>>>> ---
>>>>>   tests/qemu-iotests-quick.sh | 2 +-
>>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/tests/qemu-iotests-quick.sh b/tests/qemu-iotests-quick.sh
>>>>> index 12af731..0b54dbf 100755
>>>>> --- a/tests/qemu-iotests-quick.sh
>>>>> +++ b/tests/qemu-iotests-quick.sh
>>>>> @@ -3,6 +3,6 @@
>>>>>   cd tests/qemu-iotests
>>>>>   ret=0
>>>>> -./check -T -qcow2 -g quick || ret=1
>>>>> +TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c writeback || ret=1
>>>> There are (at least) two tests which don't work with -c writeback
>>>> (026 and 039), one of them is in the quick group (039). Why not use
>>>> -c writethrough? It doesn't make any difference on tmpfs anyway  (we
>>>> can't omit it because that will break 091).
>>> Why use any -c? The default is the fast option writeback, and for those
>>> test cases that don't support writeback, something working is chosen
>>> instead.
>> Because that breaks 091.
> That's unfortunate. I wish tmpfs supported O_DIRECT...
>
> But let's just remove it from quick then - it doesn't really matter if
> it doesn't run because of the cache mode or because we didn't include it
> in the group.

Fine with me.

Max

> -c writethrough is okay as long as you really have tmpfs on your /tmp,
> but it really hurts when you don't (and I for one don't, standard RHEL 7
> installation).
Fam Zheng Nov. 25, 2014, 9:44 a.m. UTC | #7
On Tue, 11/25 10:31, Max Reitz wrote:
> On 2014-11-25 at 10:30, Kevin Wolf wrote:
> >Am 25.11.2014 um 10:21 hat Max Reitz geschrieben:
> >>On 2014-11-25 at 10:21, Kevin Wolf wrote:
> >>>Am 25.11.2014 um 10:12 hat Max Reitz geschrieben:
> >>>>On 2014-10-28 at 07:45, Fam Zheng wrote:
> >>>>>Using /tmp (usually mounted as tmpfs) and cache=writeback, the quick
> >>>>>group can be quicker.
> >>>>>
> >>>>>On my laptop (Lenovo T430s with Fedora 20), this reduces the time from
> >>>>>50s to 30s.
> >>>>>
> >>>>>Signed-off-by: Fam Zheng <famz@redhat.com>
> >>>>>---
> >>>>>  tests/qemu-iotests-quick.sh | 2 +-
> >>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>>
> >>>>>diff --git a/tests/qemu-iotests-quick.sh b/tests/qemu-iotests-quick.sh
> >>>>>index 12af731..0b54dbf 100755
> >>>>>--- a/tests/qemu-iotests-quick.sh
> >>>>>+++ b/tests/qemu-iotests-quick.sh
> >>>>>@@ -3,6 +3,6 @@
> >>>>>  cd tests/qemu-iotests
> >>>>>  ret=0
> >>>>>-./check -T -qcow2 -g quick || ret=1
> >>>>>+TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c writeback || ret=1
> >>>>There are (at least) two tests which don't work with -c writeback
> >>>>(026 and 039), one of them is in the quick group (039). Why not use
> >>>>-c writethrough? It doesn't make any difference on tmpfs anyway  (we
> >>>>can't omit it because that will break 091).
> >>>Why use any -c? The default is the fast option writeback, and for those
> >>>test cases that don't support writeback, something working is chosen
> >>>instead.
> >>Because that breaks 091.
> >That's unfortunate. I wish tmpfs supported O_DIRECT...

Indeed unfortunate!

> >
> >But let's just remove it from quick then - it doesn't really matter if
> >it doesn't run because of the cache mode or because we didn't include it
> >in the group.

Will do it when respin.

> >-c writethrough is okay as long as you really have tmpfs on your /tmp,
> >but it really hurts when you don't (and I for one don't, standard RHEL 7
> >installation).
> 

Oh, do you have any better idea than hardcoding to /tmp then?

Fam
Kevin Wolf Nov. 25, 2014, 9:58 a.m. UTC | #8
Am 25.11.2014 um 10:44 hat Fam Zheng geschrieben:
> On Tue, 11/25 10:31, Max Reitz wrote:
> > On 2014-11-25 at 10:30, Kevin Wolf wrote:
> > >Am 25.11.2014 um 10:21 hat Max Reitz geschrieben:
> > >>On 2014-11-25 at 10:21, Kevin Wolf wrote:
> > >>>Am 25.11.2014 um 10:12 hat Max Reitz geschrieben:
> > >>>>On 2014-10-28 at 07:45, Fam Zheng wrote:
> > >>>>>Using /tmp (usually mounted as tmpfs) and cache=writeback, the quick
> > >>>>>group can be quicker.
> > >>>>>
> > >>>>>On my laptop (Lenovo T430s with Fedora 20), this reduces the time from
> > >>>>>50s to 30s.
> > >>>>>
> > >>>>>Signed-off-by: Fam Zheng <famz@redhat.com>
> > >>>>>---
> > >>>>>  tests/qemu-iotests-quick.sh | 2 +-
> > >>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
> > >>>>>
> > >>>>>diff --git a/tests/qemu-iotests-quick.sh b/tests/qemu-iotests-quick.sh
> > >>>>>index 12af731..0b54dbf 100755
> > >>>>>--- a/tests/qemu-iotests-quick.sh
> > >>>>>+++ b/tests/qemu-iotests-quick.sh
> > >>>>>@@ -3,6 +3,6 @@
> > >>>>>  cd tests/qemu-iotests
> > >>>>>  ret=0
> > >>>>>-./check -T -qcow2 -g quick || ret=1
> > >>>>>+TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c writeback || ret=1
> > >>>>There are (at least) two tests which don't work with -c writeback
> > >>>>(026 and 039), one of them is in the quick group (039). Why not use
> > >>>>-c writethrough? It doesn't make any difference on tmpfs anyway  (we
> > >>>>can't omit it because that will break 091).
> > >>>Why use any -c? The default is the fast option writeback, and for those
> > >>>test cases that don't support writeback, something working is chosen
> > >>>instead.
> > >>Because that breaks 091.
> > >That's unfortunate. I wish tmpfs supported O_DIRECT...
> 
> Indeed unfortunate!
> 
> > >
> > >But let's just remove it from quick then - it doesn't really matter if
> > >it doesn't run because of the cache mode or because we didn't include it
> > >in the group.
> 
> Will do it when respin.
> 
> > >-c writethrough is okay as long as you really have tmpfs on your /tmp,
> > >but it really hurts when you don't (and I for one don't, standard RHEL 7
> > >installation).
> > 
> 
> Oh, do you have any better idea than hardcoding to /tmp then?

I think /tmp is fine. It helps those of us who do have a tmpfs there,
and it shouldn't hurt the rest at least. Just don't combine it with
writethrough, but leave out -c.

Kevin
diff mbox

Patch

diff --git a/tests/qemu-iotests-quick.sh b/tests/qemu-iotests-quick.sh
index 12af731..0b54dbf 100755
--- a/tests/qemu-iotests-quick.sh
+++ b/tests/qemu-iotests-quick.sh
@@ -3,6 +3,6 @@ 
 cd tests/qemu-iotests
 
 ret=0
-./check -T -qcow2 -g quick || ret=1
+TEST_DIR=/tmp/qemu-iotests-quick-$$ ./check -T -qcow2 -g quick -c writeback || ret=1
 
 exit $ret