Skip to contentSkip to conversation

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

PATCH In review Martin Jansa 3 participants 7 messages Feb 8, 2024 – Feb 27, 2024

lore
Share & tools
lore
#0 lore raw

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

* 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

---
 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(-)
tests/btrfs/Makefile +1 -1
index 1b72a1a1..6d9995b4 100644
@@ -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)
tests/ceph/Makefile +1 -1
index 2761e1e9..5f24d518 100644
@@ -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)
tests/cifs/Makefile +1 -1
index 62c48935..0b89a01d 100644
@@ -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)
tests/ext4/Makefile +1 -1
index a2a0d561..296e3850 100644
@@ -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)
tests/f2fs/Makefile +1 -1
index 9d1ed3c6..0a90b465 100644
@@ -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)
tests/generic/Makefile +1 -1
index b464b22b..d6ed3e55 100644
@@ -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)
tests/nfs/Makefile +1 -1
index 128d2a3a..51590b5c 100644
@@ -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)
tests/ocfs2/Makefile +1 -1
index 260ad31b..17e01bf3 100644
@@ -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)
tests/overlay/Makefile +1 -1
index 2785b94d..c71e78d6 100644
@@ -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)
tests/perf/Makefile +1 -1
index 0c74ba39..d72c04d9 100644
@@ -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)
tests/selftest/Makefile +1 -1
index 3ddfca37..cabc35a9 100644
@@ -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)
tests/shared/Makefile +1 -1
index f3128714..2e6aa718 100644
@@ -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)
tests/tmpfs/Makefile +1 -1
index 46544313..46b62dad 100644
@@ -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)
tests/udf/Makefile +1 -1
index ed4434f0..feda69a6 100644
@@ -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)
tests/xfs/Makefile +1 -1
index 5f413e67..6bfafdb1 100644
@@ -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)
Signature · 1 line
2.43.0
#1 lore raw
Quoted 4 lines · Martin Jansa

* 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

Quoted 231 lines

* 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

---
 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(-)
tests/btrfs/Makefile +1 -1
index 1b72a1a1..6d9995b4 100644
@@ -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)
tests/ceph/Makefile +1 -1
index 2761e1e9..5f24d518 100644
@@ -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)
tests/cifs/Makefile +1 -1
index 62c48935..0b89a01d 100644
@@ -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)
tests/ext4/Makefile +1 -1
index a2a0d561..296e3850 100644
@@ -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)
tests/f2fs/Makefile +1 -1
index 9d1ed3c6..0a90b465 100644
@@ -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)
tests/generic/Makefile +1 -1
index b464b22b..d6ed3e55 100644
@@ -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)
tests/nfs/Makefile +1 -1
index 128d2a3a..51590b5c 100644
@@ -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)
tests/ocfs2/Makefile +1 -1
index 260ad31b..17e01bf3 100644
@@ -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)
tests/overlay/Makefile +1 -1
index 2785b94d..c71e78d6 100644
@@ -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)
tests/perf/Makefile +1 -1
index 0c74ba39..d72c04d9 100644
@@ -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)
tests/selftest/Makefile +1 -1
index 3ddfca37..cabc35a9 100644
@@ -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)
tests/shared/Makefile +1 -1
index f3128714..2e6aa718 100644
@@ -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)
tests/tmpfs/Makefile +1 -1
index 46544313..46b62dad 100644
@@ -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)
tests/udf/Makefile +1 -1
index ed4434f0..feda69a6 100644
@@ -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)
tests/xfs/Makefile +1 -1
index 5f413e67..6bfafdb1 100644
@@ -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)
Signature · 1 line
2.43.0
#2 lore raw
Quoted 11 lines · Zorro Lang
Quoted 4 lines · Martin Jansa

* 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,

#3 lore raw
Quoted 10 lines · Martin Jansa
Quoted 9 lines · Zorro Lang
Quoted 4 lines · Martin Jansa

* 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?

Quoted 8 lines
Quoted 2 lines

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.

Quoted 8 lines

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

Quoted 2 lines

Regards,

#4 lore raw
Quoted 21 lines · Darrick J. Wong
Quoted 10 lines · Martin Jansa
Quoted 9 lines · Zorro Lang
Quoted 4 lines · Martin Jansa

* 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?

Quoted 8 lines
Quoted 2 lines

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

Quoted 3 lines

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

Quoted 9 lines
Quoted 8 lines

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.

Quoted 6 lines

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,

Reviewed-by
#5 lore raw
Quoted 137 lines · Martin Jansa
Quoted 21 lines · Darrick J. Wong
Quoted 10 lines · Martin Jansa
Quoted 9 lines · Zorro Lang
Quoted 4 lines · Martin Jansa

* 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?

Quoted 8 lines
Quoted 2 lines

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

Quoted 3 lines

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

Quoted 9 lines
Quoted 8 lines

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.

Quoted 6 lines

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/*
(quoted diff) +0 -4
-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

Quoted 2 lines

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,

--D

Quoted 2 lines

Regards,

Reviewed-by
#6 lore raw
In reply to Martin Jansa
Quoted 137 lines · Martin Jansa
Quoted 21 lines · Darrick J. Wong
Quoted 10 lines · Martin Jansa
Quoted 9 lines · Zorro Lang
Quoted 4 lines · Martin Jansa

* 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?

Quoted 8 lines
Quoted 2 lines

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

Quoted 3 lines

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

Quoted 9 lines
Quoted 8 lines

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.

Quoted 6 lines

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/*
(quoted diff) +0 -4
-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

Quoted 2 lines

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.

Quoted 3 lines

Regards,