diff mbox series

tests/*/Makefile: make sure group.list DIRT exists before install

Message ID 20240208225241.644701-1-martin.jansa@gmail.com (mailing list archive)
State New, archived
Headers show
Series tests/*/Makefile: make sure group.list DIRT exists before install | expand

Commit Message

Martin Jansa Feb. 8, 2024, 10:52 p.m. UTC
* sometimes make install was failing with:
  cp: cannot stat 'group.list': No such file or directory
  and bunch of non-fatal messages:
  mv: failed to preserve ownership for 'group.list': Invalid argument

* this was when tools/mkgroupfile did
  mv -f "$new_groups" "$groupfile"
  overwritting the group.list file while install-sh was already
  copying it to output

* in the end easily reproducible by
  1) removing tests/*/group.list before each make install
  2) adding some sleep in mkgroupfile before the mv call

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
 tests/btrfs/Makefile    | 2 +-
 tests/ceph/Makefile     | 2 +-
 tests/cifs/Makefile     | 2 +-
 tests/ext4/Makefile     | 2 +-
 tests/f2fs/Makefile     | 2 +-
 tests/generic/Makefile  | 2 +-
 tests/nfs/Makefile      | 2 +-
 tests/ocfs2/Makefile    | 2 +-
 tests/overlay/Makefile  | 2 +-
 tests/perf/Makefile     | 2 +-
 tests/selftest/Makefile | 2 +-
 tests/shared/Makefile   | 2 +-
 tests/tmpfs/Makefile    | 2 +-
 tests/udf/Makefile      | 2 +-
 tests/xfs/Makefile      | 2 +-
 15 files changed, 15 insertions(+), 15 deletions(-)

Comments

Zorro Lang Feb. 25, 2024, 4:30 p.m. UTC | #1
On Thu, Feb 08, 2024 at 11:52:41PM +0100, Martin Jansa wrote:
> * sometimes make install was failing with:
>   cp: cannot stat 'group.list': No such file or directory
>   and bunch of non-fatal messages:
>   mv: failed to preserve ownership for 'group.list': Invalid argument

I'm wondering ... isn't that expected?

Why not let "make install" fail directly, if there's not a completed "make" ?
Isn't that more familiar?

Thanks,
Zorro

> 
> * this was when tools/mkgroupfile did
>   mv -f "$new_groups" "$groupfile"
>   overwritting the group.list file while install-sh was already
>   copying it to output
> 
> * in the end easily reproducible by
>   1) removing tests/*/group.list before each make install
>   2) adding some sleep in mkgroupfile before the mv call



> 
> Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> ---
>  tests/btrfs/Makefile    | 2 +-
>  tests/ceph/Makefile     | 2 +-
>  tests/cifs/Makefile     | 2 +-
>  tests/ext4/Makefile     | 2 +-
>  tests/f2fs/Makefile     | 2 +-
>  tests/generic/Makefile  | 2 +-
>  tests/nfs/Makefile      | 2 +-
>  tests/ocfs2/Makefile    | 2 +-
>  tests/overlay/Makefile  | 2 +-
>  tests/perf/Makefile     | 2 +-
>  tests/selftest/Makefile | 2 +-
>  tests/shared/Makefile   | 2 +-
>  tests/tmpfs/Makefile    | 2 +-
>  tests/udf/Makefile      | 2 +-
>  tests/xfs/Makefile      | 2 +-
>  15 files changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/tests/btrfs/Makefile b/tests/btrfs/Makefile
> index 1b72a1a1..6d9995b4 100644
> --- a/tests/btrfs/Makefile
> +++ b/tests/btrfs/Makefile
> @@ -14,7 +14,7 @@ default: $(DIRT)
>  
>  include $(BUILDRULES)
>  
> -install:
> +install: default
>  	$(INSTALL) -m 755 -d $(TARGET_DIR)
>  	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
>  	$(INSTALL) -m 644 group.list $(TARGET_DIR)
> diff --git a/tests/ceph/Makefile b/tests/ceph/Makefile
> index 2761e1e9..5f24d518 100644
> --- a/tests/ceph/Makefile
> +++ b/tests/ceph/Makefile
> @@ -12,7 +12,7 @@ default: $(DIRT)
>  
>  include $(BUILDRULES)
>  
> -install:
> +install: default
>  	$(INSTALL) -m 755 -d $(TARGET_DIR)
>  	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
>  	$(INSTALL) -m 644 group.list $(TARGET_DIR)
> diff --git a/tests/cifs/Makefile b/tests/cifs/Makefile
> index 62c48935..0b89a01d 100644
> --- a/tests/cifs/Makefile
> +++ b/tests/cifs/Makefile
> @@ -14,7 +14,7 @@ default: $(DIRT)
>  
>  include $(BUILDRULES)
>  
> -install:
> +install: default
>  	$(INSTALL) -m 755 -d $(TARGET_DIR)
>  	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
>  	$(INSTALL) -m 644 group.list $(TARGET_DIR)
> diff --git a/tests/ext4/Makefile b/tests/ext4/Makefile
> index a2a0d561..296e3850 100644
> --- a/tests/ext4/Makefile
> +++ b/tests/ext4/Makefile
> @@ -14,7 +14,7 @@ default: $(DIRT)
>  
>  include $(BUILDRULES)
>  
> -install:
> +install: default
>  	$(INSTALL) -m 755 -d $(TARGET_DIR)
>  	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
>  	$(INSTALL) -m 644 group.list $(TARGET_DIR)
> diff --git a/tests/f2fs/Makefile b/tests/f2fs/Makefile
> index 9d1ed3c6..0a90b465 100644
> --- a/tests/f2fs/Makefile
> +++ b/tests/f2fs/Makefile
> @@ -15,7 +15,7 @@ default: $(DIRT)
>  
>  include $(BUILDRULES)
>  
> -install:
> +install: default
>  	$(INSTALL) -m 755 -d $(TARGET_DIR)
>  	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
>  	$(INSTALL) -m 644 group.list $(TARGET_DIR)
> diff --git a/tests/generic/Makefile b/tests/generic/Makefile
> index b464b22b..d6ed3e55 100644
> --- a/tests/generic/Makefile
> +++ b/tests/generic/Makefile
> @@ -14,7 +14,7 @@ default: $(DIRT)
>  
>  include $(BUILDRULES)
>  
> -install:
> +install: default
>  	$(INSTALL) -m 755 -d $(TARGET_DIR)
>  	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
>  	$(INSTALL) -m 644 group.list $(TARGET_DIR)
> diff --git a/tests/nfs/Makefile b/tests/nfs/Makefile
> index 128d2a3a..51590b5c 100644
> --- a/tests/nfs/Makefile
> +++ b/tests/nfs/Makefile
> @@ -14,7 +14,7 @@ default: $(DIRT)
>  
>  include $(BUILDRULES)
>  
> -install:
> +install: default
>  	$(INSTALL) -m 755 -d $(TARGET_DIR)
>  	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
>  	$(INSTALL) -m 644 group.list $(TARGET_DIR)
> diff --git a/tests/ocfs2/Makefile b/tests/ocfs2/Makefile
> index 260ad31b..17e01bf3 100644
> --- a/tests/ocfs2/Makefile
> +++ b/tests/ocfs2/Makefile
> @@ -14,7 +14,7 @@ default: $(DIRT)
>  
>  include $(BUILDRULES)
>  
> -install:
> +install: default
>  	$(INSTALL) -m 755 -d $(TARGET_DIR)
>  	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
>  	$(INSTALL) -m 644 group.list $(TARGET_DIR)
> diff --git a/tests/overlay/Makefile b/tests/overlay/Makefile
> index 2785b94d..c71e78d6 100644
> --- a/tests/overlay/Makefile
> +++ b/tests/overlay/Makefile
> @@ -14,7 +14,7 @@ default: $(DIRT)
>  
>  include $(BUILDRULES)
>  
> -install:
> +install: default
>  	$(INSTALL) -m 755 -d $(TARGET_DIR)
>  	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
>  	$(INSTALL) -m 644 group.list $(TARGET_DIR)
> diff --git a/tests/perf/Makefile b/tests/perf/Makefile
> index 0c74ba39..d72c04d9 100644
> --- a/tests/perf/Makefile
> +++ b/tests/perf/Makefile
> @@ -14,7 +14,7 @@ default: $(DIRT)
>  
>  include $(BUILDRULES)
>  
> -install:
> +install: default
>  	$(INSTALL) -m 755 -d $(TARGET_DIR)
>  	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
>  	$(INSTALL) -m 644 group.list $(TARGET_DIR)
> diff --git a/tests/selftest/Makefile b/tests/selftest/Makefile
> index 3ddfca37..cabc35a9 100644
> --- a/tests/selftest/Makefile
> +++ b/tests/selftest/Makefile
> @@ -14,7 +14,7 @@ default: $(DIRT)
>  
>  include $(BUILDRULES)
>  
> -install:
> +install: default
>  	$(INSTALL) -m 755 -d $(TARGET_DIR)
>  	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
>  	$(INSTALL) -m 644 group.list $(TARGET_DIR)
> diff --git a/tests/shared/Makefile b/tests/shared/Makefile
> index f3128714..2e6aa718 100644
> --- a/tests/shared/Makefile
> +++ b/tests/shared/Makefile
> @@ -14,7 +14,7 @@ default: $(DIRT)
>  
>  include $(BUILDRULES)
>  
> -install:
> +install: default
>  	$(INSTALL) -m 755 -d $(TARGET_DIR)
>  	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
>  	$(INSTALL) -m 644 group.list $(TARGET_DIR)
> diff --git a/tests/tmpfs/Makefile b/tests/tmpfs/Makefile
> index 46544313..46b62dad 100644
> --- a/tests/tmpfs/Makefile
> +++ b/tests/tmpfs/Makefile
> @@ -14,7 +14,7 @@ default: $(DIRT)
>  
>  include $(BUILDRULES)
>  
> -install:
> +install: default
>  	$(INSTALL) -m 755 -d $(TARGET_DIR)
>  	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
>  	$(INSTALL) -m 644 group.list $(TARGET_DIR)
> diff --git a/tests/udf/Makefile b/tests/udf/Makefile
> index ed4434f0..feda69a6 100644
> --- a/tests/udf/Makefile
> +++ b/tests/udf/Makefile
> @@ -14,7 +14,7 @@ default: $(DIRT)
>  
>  include $(BUILDRULES)
>  
> -install:
> +install: default
>  	$(INSTALL) -m 755 -d $(TARGET_DIR)
>  	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
>  	$(INSTALL) -m 644 group.list $(TARGET_DIR)
> diff --git a/tests/xfs/Makefile b/tests/xfs/Makefile
> index 5f413e67..6bfafdb1 100644
> --- a/tests/xfs/Makefile
> +++ b/tests/xfs/Makefile
> @@ -14,7 +14,7 @@ default: $(DIRT)
>  
>  include $(BUILDRULES)
>  
> -install:
> +install: default
>  	$(INSTALL) -m 755 -d $(TARGET_DIR)
>  	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
>  	$(INSTALL) -m 644 group.list $(TARGET_DIR)
> -- 
> 2.43.0
> 
>
Martin Jansa Feb. 25, 2024, 6:01 p.m. UTC | #2
On Sun, Feb 25, 2024 at 5:35 PM Zorro Lang <zlang@redhat.com> wrote:
>
> On Thu, Feb 08, 2024 at 11:52:41PM +0100, Martin Jansa wrote:
> > * sometimes make install was failing with:
> >   cp: cannot stat 'group.list': No such file or directory
> >   and bunch of non-fatal messages:
> >   mv: failed to preserve ownership for 'group.list': Invalid argument
>
> I'm wondering ... isn't that expected?
>
> Why not let "make install" fail directly, if there's not a completed "make" ?
> Isn't that more familiar?

It might if it fails reliably, but in OpenEmbedded builds where I was
seeing this in some CI builds it failed in about 1% of the builds, which is
enough to make the failure annoying and if this is meant to be expected
behavior than not failing reliably, for context see:
https://git.openembedded.org/meta-openembedded/commit/?id=e8a1c9823b7e55dd2ca7f19a3fd3a05ae676bfe2

so here it calls make in do_compile task (defined in autotools-brokensep),
then make install in do_install task and do_install was failing
_sometimes_, and I haven't seen single failure since this change was
applied.

I'm not very familiar with xfstests, I wasn't even building it
intentionally (it's just part of one CI job which builds everything
available), so I might be missing something.

Regards,
Darrick J. Wong Feb. 26, 2024, 4:57 p.m. UTC | #3
On Sun, Feb 25, 2024 at 07:01:48PM +0100, Martin Jansa wrote:
> On Sun, Feb 25, 2024 at 5:35 PM Zorro Lang <zlang@redhat.com> wrote:
> >
> > On Thu, Feb 08, 2024 at 11:52:41PM +0100, Martin Jansa wrote:
> > > * sometimes make install was failing with:
> > >   cp: cannot stat 'group.list': No such file or directory
> > >   and bunch of non-fatal messages:
> > >   mv: failed to preserve ownership for 'group.list': Invalid argument
> >
> > I'm wondering ... isn't that expected?
> >
> > Why not let "make install" fail directly, if there's not a completed "make" ?
> > Isn't that more familiar?
> 
> It might if it fails reliably, but in OpenEmbedded builds where I was
> seeing this in some CI builds it failed in about 1% of the builds, which is
> enough to make the failure annoying and if this is meant to be expected
> behavior than not failing reliably, for context see:
> https://git.openembedded.org/meta-openembedded/commit/?id=e8a1c9823b7e55dd2ca7f19a3fd3a05ae676bfe2

Aha, that explains the weird language in the commit message about
"removing tests/*/group.list" and "adding some sleep" even though the
patch doesn't actually do that.

> so here it calls make in do_compile task (defined in autotools-brokensep),
> then make install in do_install task and do_install was failing
> _sometimes_, and I haven't seen single failure since this change was
> applied.
> 
> I'm not very familiar with xfstests, I wasn't even building it
> intentionally (it's just part of one CI job which builds everything
> available), so I might be missing something.

Huh, that looks like the result of make trying to run the 'default' and
'install' targets in parallel because there's no "install: default"
clause in the Makefile.

Soooo... are you folks using 'make -jXX default install' in your CI
system?

--D

> Regards,
>
Martin Jansa Feb. 26, 2024, 5:31 p.m. UTC | #4
On Mon, Feb 26, 2024 at 5:57 PM Darrick J. Wong <djwong@kernel.org> wrote:
>
> On Sun, Feb 25, 2024 at 07:01:48PM +0100, Martin Jansa wrote:
> > On Sun, Feb 25, 2024 at 5:35 PM Zorro Lang <zlang@redhat.com> wrote:
> > >
> > > On Thu, Feb 08, 2024 at 11:52:41PM +0100, Martin Jansa wrote:
> > > > * sometimes make install was failing with:
> > > >   cp: cannot stat 'group.list': No such file or directory
> > > >   and bunch of non-fatal messages:
> > > >   mv: failed to preserve ownership for 'group.list': Invalid argument
> > >
> > > I'm wondering ... isn't that expected?
> > >
> > > Why not let "make install" fail directly, if there's not a completed "make" ?
> > > Isn't that more familiar?
> >
> > It might if it fails reliably, but in OpenEmbedded builds where I was
> > seeing this in some CI builds it failed in about 1% of the builds, which is
> > enough to make the failure annoying and if this is meant to be expected
> > behavior than not failing reliably, for context see:
> > https://git.openembedded.org/meta-openembedded/commit/?id=e8a1c9823b7e55dd2ca7f19a3fd3a05ae676bfe2
>
> Aha, that explains the weird language in the commit message about
> "removing tests/*/group.list" and "adding some sleep" even though the
> patch doesn't actually do that.

That's what I was using to reliably trigger the "make install" failure as in:
https://git.openembedded.org/meta-openembedded-contrib/commit/?h=jansa/master-xfstests-debug&id=d3fecf856850645762a9dcad5160686b2445729d

> > so here it calls make in do_compile task (defined in autotools-brokensep),
> > then make install in do_install task and do_install was failing
> > _sometimes_, and I haven't seen single failure since this change was
> > applied.
> >
> > I'm not very familiar with xfstests, I wasn't even building it
> > intentionally (it's just part of one CI job which builds everything
> > available), so I might be missing something.
>
> Huh, that looks like the result of make trying to run the 'default' and
> 'install' targets in parallel because there's no "install: default"
> clause in the Makefile.
>
> Soooo... are you folks using 'make -jXX default install' in your CI
> system?

-jXX is used in 2 separate steps (bitbake tasks) which don't run in parallel.

do_compile tasks runs:
do_compile() {
    make -j 70 -l 140
}

and only after do_compile is finished do_install task runs:
do_install() {
    # otherwise install-sh duplicates DESTDIR prefix
    export DIST_ROOT="/" DIST_MANIFEST=""
DESTDIR="/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/image"
    make -j 70 -l 140 install

    unionmount_target_dir=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/image/usr/xfstests/unionmount-testsuite
    install -d $unionmount_target_dir/tests
    install /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/unionmount-testsuite/tests/*
-t $unionmount_target_dir/tests
    install /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/unionmount-testsuite/*.py
-t $unionmount_target_dir
    install /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/unionmount-testsuite/run
-t $unionmount_target_dir
    install /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/unionmount-testsuite/README
-t $unionmount_target_dir
}

And with this I see 15 calls to buildgrouplist in do_compile and then
the 2 calls for each of these 15 group.list files again in do_install

grep GROUP temp/log.do_install temp/log.do_compile | sort | uniq -c
      1 temp/log.do_compile: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/btrfs/group.list
      1 temp/log.do_compile: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ceph/group.list
      1 temp/log.do_compile: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/cifs/group.list
      1 temp/log.do_compile: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ext4/group.list
      1 temp/log.do_compile: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/f2fs/group.list
      1 temp/log.do_compile: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/generic/group.list
      1 temp/log.do_compile: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/nfs/group.list
      1 temp/log.do_compile: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ocfs2/group.list
      1 temp/log.do_compile: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/overlay/group.list
      1 temp/log.do_compile: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/perf/group.list
      1 temp/log.do_compile: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/selftest/group.list
      1 temp/log.do_compile: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/shared/group.list
      1 temp/log.do_compile: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/tmpfs/group.list
      1 temp/log.do_compile: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/udf/group.list
      1 temp/log.do_compile: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/xfs/group.list

      2 temp/log.do_install: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/btrfs/group.list
      2 temp/log.do_install: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ceph/group.list
      2 temp/log.do_install: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/cifs/group.list
      2 temp/log.do_install: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ext4/group.list
      2 temp/log.do_install: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/f2fs/group.list
      2 temp/log.do_install: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/generic/group.list
      2 temp/log.do_install: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/nfs/group.list
      2 temp/log.do_install: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ocfs2/group.list
      2 temp/log.do_install: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/overlay/group.list
      2 temp/log.do_install: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/perf/group.list
      2 temp/log.do_install: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/selftest/group.list
      2 temp/log.do_install: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/shared/group.list
      2 temp/log.do_install: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/tmpfs/group.list
      2 temp/log.do_install: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/udf/group.list
      2 temp/log.do_install: [GROUP]
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/xfs/group.list

I guess for you it doesn't run buildgrouplist again if you run "make
&& make install"?

Regards,
Darrick J. Wong Feb. 26, 2024, 7:12 p.m. UTC | #5
On Mon, Feb 26, 2024 at 06:31:04PM +0100, Martin Jansa wrote:
> On Mon, Feb 26, 2024 at 5:57 PM Darrick J. Wong <djwong@kernel.org> wrote:
> >
> > On Sun, Feb 25, 2024 at 07:01:48PM +0100, Martin Jansa wrote:
> > > On Sun, Feb 25, 2024 at 5:35 PM Zorro Lang <zlang@redhat.com> wrote:
> > > >
> > > > On Thu, Feb 08, 2024 at 11:52:41PM +0100, Martin Jansa wrote:
> > > > > * sometimes make install was failing with:
> > > > >   cp: cannot stat 'group.list': No such file or directory
> > > > >   and bunch of non-fatal messages:
> > > > >   mv: failed to preserve ownership for 'group.list': Invalid argument
> > > >
> > > > I'm wondering ... isn't that expected?
> > > >
> > > > Why not let "make install" fail directly, if there's not a completed "make" ?
> > > > Isn't that more familiar?
> > >
> > > It might if it fails reliably, but in OpenEmbedded builds where I was
> > > seeing this in some CI builds it failed in about 1% of the builds, which is
> > > enough to make the failure annoying and if this is meant to be expected
> > > behavior than not failing reliably, for context see:
> > > https://git.openembedded.org/meta-openembedded/commit/?id=e8a1c9823b7e55dd2ca7f19a3fd3a05ae676bfe2
> >
> > Aha, that explains the weird language in the commit message about
> > "removing tests/*/group.list" and "adding some sleep" even though the
> > patch doesn't actually do that.
> 
> That's what I was using to reliably trigger the "make install" failure as in:
> https://git.openembedded.org/meta-openembedded-contrib/commit/?h=jansa/master-xfstests-debug&id=d3fecf856850645762a9dcad5160686b2445729d
> 
> > > so here it calls make in do_compile task (defined in autotools-brokensep),
> > > then make install in do_install task and do_install was failing
> > > _sometimes_, and I haven't seen single failure since this change was
> > > applied.
> > >
> > > I'm not very familiar with xfstests, I wasn't even building it
> > > intentionally (it's just part of one CI job which builds everything
> > > available), so I might be missing something.
> >
> > Huh, that looks like the result of make trying to run the 'default' and
> > 'install' targets in parallel because there's no "install: default"
> > clause in the Makefile.
> >
> > Soooo... are you folks using 'make -jXX default install' in your CI
> > system?
> 
> -jXX is used in 2 separate steps (bitbake tasks) which don't run in parallel.
> 
> do_compile tasks runs:
> do_compile() {
>     make -j 70 -l 140
> }
> 
> and only after do_compile is finished do_install task runs:
> do_install() {
>     # otherwise install-sh duplicates DESTDIR prefix
>     export DIST_ROOT="/" DIST_MANIFEST=""
> DESTDIR="/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/image"
>     make -j 70 -l 140 install
> 
>     unionmount_target_dir=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/image/usr/xfstests/unionmount-testsuite
>     install -d $unionmount_target_dir/tests
>     install /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/unionmount-testsuite/tests/*
> -t $unionmount_target_dir/tests
>     install /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/unionmount-testsuite/*.py
> -t $unionmount_target_dir
>     install /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/unionmount-testsuite/run
> -t $unionmount_target_dir
>     install /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/unionmount-testsuite/README
> -t $unionmount_target_dir
> }
> 
> And with this I see 15 calls to buildgrouplist in do_compile and then
> the 2 calls for each of these 15 group.list files again in do_install
> 
> grep GROUP temp/log.do_install temp/log.do_compile | sort | uniq -c
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/btrfs/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ceph/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/cifs/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ext4/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/f2fs/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/generic/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/nfs/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ocfs2/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/overlay/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/perf/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/selftest/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/shared/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/tmpfs/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/udf/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/xfs/group.list
> 
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/btrfs/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ceph/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/cifs/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ext4/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/f2fs/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/generic/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/nfs/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ocfs2/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/overlay/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/perf/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/selftest/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/shared/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/tmpfs/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/udf/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/xfs/group.list
> 
> I guess for you it doesn't run buildgrouplist again if you run "make
> && make install"?

It does if you run "make && make install", but it doesn't if you 'make
default install'.  The top level Makefile has:

install: default $(addsuffix -install,$(SUBDIRS))

If you run "make -j70 default install" then it'll kick off default
and tests-install.  tests-install starts tests/xfs-install, and now
the parallel make is trying to install tests/xfs/group.list while
default might also be regenerating it.

So yeah, I think this patch is correct,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> Regards,
>
Zorro Lang Feb. 27, 2024, 3:05 a.m. UTC | #6
On Mon, Feb 26, 2024 at 06:31:04PM +0100, Martin Jansa wrote:
> On Mon, Feb 26, 2024 at 5:57 PM Darrick J. Wong <djwong@kernel.org> wrote:
> >
> > On Sun, Feb 25, 2024 at 07:01:48PM +0100, Martin Jansa wrote:
> > > On Sun, Feb 25, 2024 at 5:35 PM Zorro Lang <zlang@redhat.com> wrote:
> > > >
> > > > On Thu, Feb 08, 2024 at 11:52:41PM +0100, Martin Jansa wrote:
> > > > > * sometimes make install was failing with:
> > > > >   cp: cannot stat 'group.list': No such file or directory
> > > > >   and bunch of non-fatal messages:
> > > > >   mv: failed to preserve ownership for 'group.list': Invalid argument
> > > >
> > > > I'm wondering ... isn't that expected?
> > > >
> > > > Why not let "make install" fail directly, if there's not a completed "make" ?
> > > > Isn't that more familiar?
> > >
> > > It might if it fails reliably, but in OpenEmbedded builds where I was
> > > seeing this in some CI builds it failed in about 1% of the builds, which is
> > > enough to make the failure annoying and if this is meant to be expected
> > > behavior than not failing reliably, for context see:
> > > https://git.openembedded.org/meta-openembedded/commit/?id=e8a1c9823b7e55dd2ca7f19a3fd3a05ae676bfe2
> >
> > Aha, that explains the weird language in the commit message about
> > "removing tests/*/group.list" and "adding some sleep" even though the
> > patch doesn't actually do that.
> 
> That's what I was using to reliably trigger the "make install" failure as in:
> https://git.openembedded.org/meta-openembedded-contrib/commit/?h=jansa/master-xfstests-debug&id=d3fecf856850645762a9dcad5160686b2445729d
> 
> > > so here it calls make in do_compile task (defined in autotools-brokensep),
> > > then make install in do_install task and do_install was failing
> > > _sometimes_, and I haven't seen single failure since this change was
> > > applied.
> > >
> > > I'm not very familiar with xfstests, I wasn't even building it
> > > intentionally (it's just part of one CI job which builds everything
> > > available), so I might be missing something.
> >
> > Huh, that looks like the result of make trying to run the 'default' and
> > 'install' targets in parallel because there's no "install: default"
> > clause in the Makefile.
> >
> > Soooo... are you folks using 'make -jXX default install' in your CI
> > system?
> 
> -jXX is used in 2 separate steps (bitbake tasks) which don't run in parallel.
> 
> do_compile tasks runs:
> do_compile() {
>     make -j 70 -l 140
> }
> 
> and only after do_compile is finished do_install task runs:
> do_install() {
>     # otherwise install-sh duplicates DESTDIR prefix
>     export DIST_ROOT="/" DIST_MANIFEST=""
> DESTDIR="/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/image"
>     make -j 70 -l 140 install
> 
>     unionmount_target_dir=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/image/usr/xfstests/unionmount-testsuite
>     install -d $unionmount_target_dir/tests
>     install /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/unionmount-testsuite/tests/*
> -t $unionmount_target_dir/tests
>     install /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/unionmount-testsuite/*.py
> -t $unionmount_target_dir
>     install /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/unionmount-testsuite/run
> -t $unionmount_target_dir
>     install /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/unionmount-testsuite/README
> -t $unionmount_target_dir
> }
> 
> And with this I see 15 calls to buildgrouplist in do_compile and then
> the 2 calls for each of these 15 group.list files again in do_install
> 
> grep GROUP temp/log.do_install temp/log.do_compile | sort | uniq -c
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/btrfs/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ceph/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/cifs/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ext4/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/f2fs/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/generic/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/nfs/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ocfs2/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/overlay/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/perf/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/selftest/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/shared/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/tmpfs/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/udf/group.list
>       1 temp/log.do_compile: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/xfs/group.list
> 
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/btrfs/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ceph/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/cifs/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ext4/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/f2fs/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/generic/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/nfs/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/ocfs2/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/overlay/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/perf/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/selftest/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/shared/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/tmpfs/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/udf/group.list
>       2 temp/log.do_install: [GROUP]
> /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/xfstests/2024.01.14/git/tests/xfs/group.list
> 
> I guess for you it doesn't run buildgrouplist again if you run "make
> && make install"?

Thanks for this explanation, this example makes more sense for me.

Reviewed-by: Zorro Lang <zlang@redhat.com>

> 
> Regards,
>
diff mbox series

Patch

diff --git a/tests/btrfs/Makefile b/tests/btrfs/Makefile
index 1b72a1a1..6d9995b4 100644
--- a/tests/btrfs/Makefile
+++ b/tests/btrfs/Makefile
@@ -14,7 +14,7 @@  default: $(DIRT)
 
 include $(BUILDRULES)
 
-install:
+install: default
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
 	$(INSTALL) -m 644 group.list $(TARGET_DIR)
diff --git a/tests/ceph/Makefile b/tests/ceph/Makefile
index 2761e1e9..5f24d518 100644
--- a/tests/ceph/Makefile
+++ b/tests/ceph/Makefile
@@ -12,7 +12,7 @@  default: $(DIRT)
 
 include $(BUILDRULES)
 
-install:
+install: default
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
 	$(INSTALL) -m 644 group.list $(TARGET_DIR)
diff --git a/tests/cifs/Makefile b/tests/cifs/Makefile
index 62c48935..0b89a01d 100644
--- a/tests/cifs/Makefile
+++ b/tests/cifs/Makefile
@@ -14,7 +14,7 @@  default: $(DIRT)
 
 include $(BUILDRULES)
 
-install:
+install: default
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
 	$(INSTALL) -m 644 group.list $(TARGET_DIR)
diff --git a/tests/ext4/Makefile b/tests/ext4/Makefile
index a2a0d561..296e3850 100644
--- a/tests/ext4/Makefile
+++ b/tests/ext4/Makefile
@@ -14,7 +14,7 @@  default: $(DIRT)
 
 include $(BUILDRULES)
 
-install:
+install: default
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
 	$(INSTALL) -m 644 group.list $(TARGET_DIR)
diff --git a/tests/f2fs/Makefile b/tests/f2fs/Makefile
index 9d1ed3c6..0a90b465 100644
--- a/tests/f2fs/Makefile
+++ b/tests/f2fs/Makefile
@@ -15,7 +15,7 @@  default: $(DIRT)
 
 include $(BUILDRULES)
 
-install:
+install: default
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
 	$(INSTALL) -m 644 group.list $(TARGET_DIR)
diff --git a/tests/generic/Makefile b/tests/generic/Makefile
index b464b22b..d6ed3e55 100644
--- a/tests/generic/Makefile
+++ b/tests/generic/Makefile
@@ -14,7 +14,7 @@  default: $(DIRT)
 
 include $(BUILDRULES)
 
-install:
+install: default
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
 	$(INSTALL) -m 644 group.list $(TARGET_DIR)
diff --git a/tests/nfs/Makefile b/tests/nfs/Makefile
index 128d2a3a..51590b5c 100644
--- a/tests/nfs/Makefile
+++ b/tests/nfs/Makefile
@@ -14,7 +14,7 @@  default: $(DIRT)
 
 include $(BUILDRULES)
 
-install:
+install: default
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
 	$(INSTALL) -m 644 group.list $(TARGET_DIR)
diff --git a/tests/ocfs2/Makefile b/tests/ocfs2/Makefile
index 260ad31b..17e01bf3 100644
--- a/tests/ocfs2/Makefile
+++ b/tests/ocfs2/Makefile
@@ -14,7 +14,7 @@  default: $(DIRT)
 
 include $(BUILDRULES)
 
-install:
+install: default
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
 	$(INSTALL) -m 644 group.list $(TARGET_DIR)
diff --git a/tests/overlay/Makefile b/tests/overlay/Makefile
index 2785b94d..c71e78d6 100644
--- a/tests/overlay/Makefile
+++ b/tests/overlay/Makefile
@@ -14,7 +14,7 @@  default: $(DIRT)
 
 include $(BUILDRULES)
 
-install:
+install: default
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
 	$(INSTALL) -m 644 group.list $(TARGET_DIR)
diff --git a/tests/perf/Makefile b/tests/perf/Makefile
index 0c74ba39..d72c04d9 100644
--- a/tests/perf/Makefile
+++ b/tests/perf/Makefile
@@ -14,7 +14,7 @@  default: $(DIRT)
 
 include $(BUILDRULES)
 
-install:
+install: default
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
 	$(INSTALL) -m 644 group.list $(TARGET_DIR)
diff --git a/tests/selftest/Makefile b/tests/selftest/Makefile
index 3ddfca37..cabc35a9 100644
--- a/tests/selftest/Makefile
+++ b/tests/selftest/Makefile
@@ -14,7 +14,7 @@  default: $(DIRT)
 
 include $(BUILDRULES)
 
-install:
+install: default
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
 	$(INSTALL) -m 644 group.list $(TARGET_DIR)
diff --git a/tests/shared/Makefile b/tests/shared/Makefile
index f3128714..2e6aa718 100644
--- a/tests/shared/Makefile
+++ b/tests/shared/Makefile
@@ -14,7 +14,7 @@  default: $(DIRT)
 
 include $(BUILDRULES)
 
-install:
+install: default
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
 	$(INSTALL) -m 644 group.list $(TARGET_DIR)
diff --git a/tests/tmpfs/Makefile b/tests/tmpfs/Makefile
index 46544313..46b62dad 100644
--- a/tests/tmpfs/Makefile
+++ b/tests/tmpfs/Makefile
@@ -14,7 +14,7 @@  default: $(DIRT)
 
 include $(BUILDRULES)
 
-install:
+install: default
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
 	$(INSTALL) -m 644 group.list $(TARGET_DIR)
diff --git a/tests/udf/Makefile b/tests/udf/Makefile
index ed4434f0..feda69a6 100644
--- a/tests/udf/Makefile
+++ b/tests/udf/Makefile
@@ -14,7 +14,7 @@  default: $(DIRT)
 
 include $(BUILDRULES)
 
-install:
+install: default
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
 	$(INSTALL) -m 644 group.list $(TARGET_DIR)
diff --git a/tests/xfs/Makefile b/tests/xfs/Makefile
index 5f413e67..6bfafdb1 100644
--- a/tests/xfs/Makefile
+++ b/tests/xfs/Makefile
@@ -14,7 +14,7 @@  default: $(DIRT)
 
 include $(BUILDRULES)
 
-install:
+install: default
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 $(TESTS) $(TARGET_DIR)
 	$(INSTALL) -m 644 group.list $(TARGET_DIR)