All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: Fix installation for extended names
@ 2016-06-29 14:57 Jan Tulak
  2016-06-30  3:38 ` Eryu Guan
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Jan Tulak @ 2016-06-29 14:57 UTC (permalink / raw)
  To: fstests; +Cc: Jan Tulak

xfstests supports extended test names like 314-foo-bar, but installation of
these tests was skipped (not matching a regexp). So this patch fixes the
makefiles in tests directories.

Signed-off-by: Jan Tulak <jtulak@redhat.com>
---
 tests/btrfs/Makefile   | 2 ++
 tests/cifs/Makefile    | 2 ++
 tests/ext4/Makefile    | 2 ++
 tests/f2fs/Makefile    | 2 ++
 tests/generic/Makefile | 2 ++
 tests/overlay/Makefile | 2 ++
 tests/shared/Makefile  | 2 ++
 tests/udf/Makefile     | 2 ++
 tests/xfs/Makefile     | 2 ++
 9 files changed, 18 insertions(+)

diff --git a/tests/btrfs/Makefile b/tests/btrfs/Makefile
index e1a5be1..074204c 100644
--- a/tests/btrfs/Makefile
+++ b/tests/btrfs/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR)
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR)
 
 # Nothing.
 install-dev install-lib:
diff --git a/tests/cifs/Makefile b/tests/cifs/Makefile
index 9176e5c..f6bff4f 100644
--- a/tests/cifs/Makefile
+++ b/tests/cifs/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR)
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR)
 
 # Nothing.
 install-dev install-lib:
diff --git a/tests/ext4/Makefile b/tests/ext4/Makefile
index 7a3c8e1..f7056a0 100644
--- a/tests/ext4/Makefile
+++ b/tests/ext4/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR)
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR)
 
 # Nothing.
 install-dev install-lib:
diff --git a/tests/f2fs/Makefile b/tests/f2fs/Makefile
index 4d00e9e..0805348 100644
--- a/tests/f2fs/Makefile
+++ b/tests/f2fs/Makefile
@@ -14,8 +14,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR)
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR)
 
 # Nothing.
 install-dev install-lib:
diff --git a/tests/generic/Makefile b/tests/generic/Makefile
index 9529fb8..b90d6c9 100644
--- a/tests/generic/Makefile
+++ b/tests/generic/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR)
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR)
 
 # Nothing.
 install-dev install-lib:
diff --git a/tests/overlay/Makefile b/tests/overlay/Makefile
index 63c9878..3bc3a9b 100644
--- a/tests/overlay/Makefile
+++ b/tests/overlay/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR)
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR)
 
 # Nothing.
 install-dev install-lib:
diff --git a/tests/shared/Makefile b/tests/shared/Makefile
index cbd87f9..3854783 100644
--- a/tests/shared/Makefile
+++ b/tests/shared/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR)
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR)
 
 # Nothing.
 install-dev install-lib:
diff --git a/tests/udf/Makefile b/tests/udf/Makefile
index 1d96658..6f23935 100644
--- a/tests/udf/Makefile
+++ b/tests/udf/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR)
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR)
 
 # Nothing.
 install-dev install-lib:
diff --git a/tests/xfs/Makefile b/tests/xfs/Makefile
index db94be0..e9b98a3 100644
--- a/tests/xfs/Makefile
+++ b/tests/xfs/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR)
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR)
 
 # Nothing.
 install-dev install-lib:
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] xfstests: Fix installation for extended names
  2016-06-29 14:57 [PATCH] xfstests: Fix installation for extended names Jan Tulak
@ 2016-06-30  3:38 ` Eryu Guan
  2016-06-30  8:32   ` Jan Tulak
  2016-06-30  8:35 ` [PATCH v2] " Jan Tulak
  2016-06-30 16:06 ` [PATCH v3] xfstests: Fix installation for extended Jan Tulak
  2 siblings, 1 reply; 12+ messages in thread
From: Eryu Guan @ 2016-06-30  3:38 UTC (permalink / raw)
  To: Jan Tulak; +Cc: fstests

On Wed, Jun 29, 2016 at 04:57:55PM +0200, Jan Tulak wrote:
> xfstests supports extended test names like 314-foo-bar, but installation of
> these tests was skipped (not matching a regexp). So this patch fixes the
> makefiles in tests directories.
> 
> Signed-off-by: Jan Tulak <jtulak@redhat.com>

Thanks for fixing it! But this breaks installation in other subdirs

# make install
...
../../install-sh -o root -g root -m 755 [0-9]??-* /var/lib/xfstests/tests/btrfs
cp: cannot stat ‘[0-9]??-*’: No such file or directory
gmake[2]: *** [install] Error 1
gmake[1]: *** [/root/xfstests/tests/btrfs/-install] Error 2
make: *** [tests-install] Error 2

Thanks,
Eryu

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] xfstests: Fix installation for extended names
  2016-06-30  3:38 ` Eryu Guan
@ 2016-06-30  8:32   ` Jan Tulak
  0 siblings, 0 replies; 12+ messages in thread
From: Jan Tulak @ 2016-06-30  8:32 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests

On Thu, Jun 30, 2016 at 5:38 AM, Eryu Guan <eguan@redhat.com> wrote:
> On Wed, Jun 29, 2016 at 04:57:55PM +0200, Jan Tulak wrote:
>> xfstests supports extended test names like 314-foo-bar, but installation of
>> these tests was skipped (not matching a regexp). So this patch fixes the
>> makefiles in tests directories.
>>
>> Signed-off-by: Jan Tulak <jtulak@redhat.com>
>
> Thanks for fixing it! But this breaks installation in other subdirs
>
> # make install
> ...
> ../../install-sh -o root -g root -m 755 [0-9]??-* /var/lib/xfstests/tests/btrfs
> cp: cannot stat ‘[0-9]??-*’: No such file or directory
> gmake[2]: *** [install] Error 1
> gmake[1]: *** [/root/xfstests/tests/btrfs/-install] Error 2
> make: *** [tests-install] Error 2
>

Hmm, yeah, I see... It fails when there is no such file to install.
I'm making it to ignore the error in the way:
-$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR) 2>/dev/null;true

It might hide some other issues (permissions...), but the chances are,
if something goes wrong, it goes wrong also with the standard
three-digit-names, where the error is not suppressed.

Thanks,
Jan


-- 
Jan Tulak
jtulak@redhat.com / jan@tulak.me

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2] xfstests: Fix installation for extended names
  2016-06-29 14:57 [PATCH] xfstests: Fix installation for extended names Jan Tulak
  2016-06-30  3:38 ` Eryu Guan
@ 2016-06-30  8:35 ` Jan Tulak
  2016-06-30 13:33   ` Eryu Guan
  2016-06-30 16:06 ` [PATCH v3] xfstests: Fix installation for extended Jan Tulak
  2 siblings, 1 reply; 12+ messages in thread
From: Jan Tulak @ 2016-06-30  8:35 UTC (permalink / raw)
  To: fstests; +Cc: eguan, Jan Tulak

xfstests supports extended test names like 314-foo-bar, but installation of
these tests was skipped (not matching a regexp). So this patch fixes the
makefiles in tests directories.

Signed-off-by: Jan Tulak <jtulak@redhat.com>
---
UPDATE:
  * install failed when no extended name was present, so suppress errors for
    extended names
---
 tests/btrfs/Makefile   | 2 ++
 tests/cifs/Makefile    | 2 ++
 tests/ext4/Makefile    | 2 ++
 tests/f2fs/Makefile    | 2 ++
 tests/generic/Makefile | 2 ++
 tests/overlay/Makefile | 2 ++
 tests/shared/Makefile  | 2 ++
 tests/udf/Makefile     | 2 ++
 tests/xfs/Makefile     | 2 ++
 9 files changed, 18 insertions(+)

diff --git a/tests/btrfs/Makefile b/tests/btrfs/Makefile
index e1a5be1..63c1111 100644
--- a/tests/btrfs/Makefile
+++ b/tests/btrfs/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	-$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR) 2>/dev/null;true
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	-$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR) 2>/dev/null;true
 
 # Nothing.
 install-dev install-lib:
diff --git a/tests/cifs/Makefile b/tests/cifs/Makefile
index 9176e5c..93a9d69 100644
--- a/tests/cifs/Makefile
+++ b/tests/cifs/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	-$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR) 2>/dev/null;true
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	-$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR) 2>/dev/null;true
 
 # Nothing.
 install-dev install-lib:
diff --git a/tests/ext4/Makefile b/tests/ext4/Makefile
index 7a3c8e1..c7de3f1 100644
--- a/tests/ext4/Makefile
+++ b/tests/ext4/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	-$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR) 2>/dev/null;true
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	-$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR) 2>/dev/null;true
 
 # Nothing.
 install-dev install-lib:
diff --git a/tests/f2fs/Makefile b/tests/f2fs/Makefile
index 4d00e9e..e507495 100644
--- a/tests/f2fs/Makefile
+++ b/tests/f2fs/Makefile
@@ -14,8 +14,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	-$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR) 2>/dev/null;true
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	-$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR) 2>/dev/null;true
 
 # Nothing.
 install-dev install-lib:
diff --git a/tests/generic/Makefile b/tests/generic/Makefile
index 9529fb8..f449dc3 100644
--- a/tests/generic/Makefile
+++ b/tests/generic/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	-$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR) 2>/dev/null;true
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	-$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR) 2>/dev/null;true
 
 # Nothing.
 install-dev install-lib:
diff --git a/tests/overlay/Makefile b/tests/overlay/Makefile
index 63c9878..e8459e0 100644
--- a/tests/overlay/Makefile
+++ b/tests/overlay/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	-$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR) 2>/dev/null;true
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	-$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR) 2>/dev/null;true
 
 # Nothing.
 install-dev install-lib:
diff --git a/tests/shared/Makefile b/tests/shared/Makefile
index cbd87f9..d9148ec 100644
--- a/tests/shared/Makefile
+++ b/tests/shared/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	-$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR) 2>/dev/null;true
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	-$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR) 2>/dev/null;true
 
 # Nothing.
 install-dev install-lib:
diff --git a/tests/udf/Makefile b/tests/udf/Makefile
index 1d96658..9822e3c 100644
--- a/tests/udf/Makefile
+++ b/tests/udf/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	-$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR) 2>/dev/null;true
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	-$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR) 2>/dev/null;true
 
 # Nothing.
 install-dev install-lib:
diff --git a/tests/xfs/Makefile b/tests/xfs/Makefile
index db94be0..28e0887 100644
--- a/tests/xfs/Makefile
+++ b/tests/xfs/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	-$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR) 2>/dev/null;true
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	-$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR) 2>/dev/null;true
 
 # Nothing.
 install-dev install-lib:
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] xfstests: Fix installation for extended names
  2016-06-30  8:35 ` [PATCH v2] " Jan Tulak
@ 2016-06-30 13:33   ` Eryu Guan
  2016-06-30 15:19     ` Jan Tulak
  0 siblings, 1 reply; 12+ messages in thread
From: Eryu Guan @ 2016-06-30 13:33 UTC (permalink / raw)
  To: Jan Tulak; +Cc: fstests

On Thu, Jun 30, 2016 at 10:35:10AM +0200, Jan Tulak wrote:
> xfstests supports extended test names like 314-foo-bar, but installation of
> these tests was skipped (not matching a regexp). So this patch fixes the
> makefiles in tests directories.
> 
> Signed-off-by: Jan Tulak <jtulak@redhat.com>
> ---
> UPDATE:
>   * install failed when no extended name was present, so suppress errors for
>     extended names

Hmm, this looks ugly to me :) I was thinking about it too, but didn't
work out a better idea. Now I tend to add this installation support to
tests/xfs/Makefile only, and we can add the support to other tests when
needed. What do you think?

Thanks,
Eryu

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] xfstests: Fix installation for extended names
  2016-06-30 13:33   ` Eryu Guan
@ 2016-06-30 15:19     ` Jan Tulak
  2016-06-30 15:35       ` Eryu Guan
  0 siblings, 1 reply; 12+ messages in thread
From: Jan Tulak @ 2016-06-30 15:19 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests

On Thu, Jun 30, 2016 at 3:33 PM, Eryu Guan <eguan@redhat.com> wrote:
> On Thu, Jun 30, 2016 at 10:35:10AM +0200, Jan Tulak wrote:
>> xfstests supports extended test names like 314-foo-bar, but installation of
>> these tests was skipped (not matching a regexp). So this patch fixes the
>> makefiles in tests directories.
>>
>> Signed-off-by: Jan Tulak <jtulak@redhat.com>
>> ---
>> UPDATE:
>>   * install failed when no extended name was present, so suppress errors for
>>     extended names
>
> Hmm, this looks ugly to me :) I was thinking about it too, but didn't
> work out a better idea. Now I tend to add this installation support to
> tests/xfs/Makefile only, and we can add the support to other tests when
> needed. What do you think?
>

Yeah. I thought about better regexp, but unfortunately, whatever sh
Make uses, it has just limited support for that, unlike bash. So, yes,
add it for xfs tests only... Should I send another patch for that?

Thanks,
Jan

-- 
Jan Tulak
jtulak@redhat.com / jan@tulak.me

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] xfstests: Fix installation for extended names
  2016-06-30 15:19     ` Jan Tulak
@ 2016-06-30 15:35       ` Eryu Guan
  0 siblings, 0 replies; 12+ messages in thread
From: Eryu Guan @ 2016-06-30 15:35 UTC (permalink / raw)
  To: Jan Tulak; +Cc: fstests

On Thu, Jun 30, 2016 at 05:19:53PM +0200, Jan Tulak wrote:
> On Thu, Jun 30, 2016 at 3:33 PM, Eryu Guan <eguan@redhat.com> wrote:
> > On Thu, Jun 30, 2016 at 10:35:10AM +0200, Jan Tulak wrote:
> >> xfstests supports extended test names like 314-foo-bar, but installation of
> >> these tests was skipped (not matching a regexp). So this patch fixes the
> >> makefiles in tests directories.
> >>
> >> Signed-off-by: Jan Tulak <jtulak@redhat.com>
> >> ---
> >> UPDATE:
> >>   * install failed when no extended name was present, so suppress errors for
> >>     extended names
> >
> > Hmm, this looks ugly to me :) I was thinking about it too, but didn't
> > work out a better idea. Now I tend to add this installation support to
> > tests/xfs/Makefile only, and we can add the support to other tests when
> > needed. What do you think?
> >
> 
> Yeah. I thought about better regexp, but unfortunately, whatever sh
> Make uses, it has just limited support for that, unlike bash. So, yes,
> add it for xfs tests only... Should I send another patch for that?

Yes, please. Thanks!

Eryu

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v3] xfstests: Fix installation for extended
  2016-06-29 14:57 [PATCH] xfstests: Fix installation for extended names Jan Tulak
  2016-06-30  3:38 ` Eryu Guan
  2016-06-30  8:35 ` [PATCH v2] " Jan Tulak
@ 2016-06-30 16:06 ` Jan Tulak
  2016-06-30 16:08   ` Jan Tulak
  2016-07-01  1:16   ` Dave Chinner
  2 siblings, 2 replies; 12+ messages in thread
From: Jan Tulak @ 2016-06-30 16:06 UTC (permalink / raw)
  To: fstests; +Cc: eguan, Jan Tulak

xfstests supports extended test names like 314-foo-bar, but installation of
these tests was skipped (not matching a regexp). So this patch fixes the
makefiles in tests/xfs/.

This change will have to be repeated later for other directories, as adding it
now everywhere would cause make install to fail if no such extended name is
present in the dir.

Signed-off-by: Jan Tulak <jtulak@redhat.com>
---
UPDATE:
Let it be just in tests/xfs/.

NOTE: if tested without at first merging my 400-input-valiation test, make
install will fail again. :-)

Signed-off-by: Jan Tulak <jtulak@redhat.com>
---
 tests/xfs/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/xfs/Makefile b/tests/xfs/Makefile
index db94be0..e9b98a3 100644
--- a/tests/xfs/Makefile
+++ b/tests/xfs/Makefile
@@ -13,8 +13,10 @@ include $(BUILDRULES)
 install:
 	$(INSTALL) -m 755 -d $(TARGET_DIR)
 	$(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+	$(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR)
 	$(INSTALL) -m 644 group $(TARGET_DIR)
 	$(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+	$(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR)
 
 # Nothing.
 install-dev install-lib:
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v3] xfstests: Fix installation for extended
  2016-06-30 16:06 ` [PATCH v3] xfstests: Fix installation for extended Jan Tulak
@ 2016-06-30 16:08   ` Jan Tulak
  2016-06-30 16:21     ` Eryu Guan
  2016-07-01  1:16   ` Dave Chinner
  1 sibling, 1 reply; 12+ messages in thread
From: Jan Tulak @ 2016-06-30 16:08 UTC (permalink / raw)
  To: fstests; +Cc: Eryu Guan, Jan Tulak

On Thu, Jun 30, 2016 at 6:06 PM, Jan Tulak <jtulak@redhat.com> wrote:
> xfstests supports extended test names like 314-foo-bar, but installation of
> these tests was skipped (not matching a regexp). So this patch fixes the
> makefiles in tests/xfs/.
>
> This change will have to be repeated later for other directories, as adding it
> now everywhere would cause make install to fail if no such extended name is
> present in the dir.
>
> Signed-off-by: Jan Tulak <jtulak@redhat.com>
> ---
> UPDATE:
> Let it be just in tests/xfs/.
>
> NOTE: if tested without at first merging my 400-input-valiation test, make
> install will fail again. :-)
>
> Signed-off-by: Jan Tulak <jtulak@redhat.com>
> ---
>  tests/xfs/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tests/xfs/Makefile b/tests/xfs/Makefile
> index db94be0..e9b98a3 100644
> --- a/tests/xfs/Makefile
> +++ b/tests/xfs/Makefile
> @@ -13,8 +13,10 @@ include $(BUILDRULES)
>  install:
>         $(INSTALL) -m 755 -d $(TARGET_DIR)
>         $(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
> +       $(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR)
>         $(INSTALL) -m 644 group $(TARGET_DIR)
>         $(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
> +       $(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR)
>
>  # Nothing.
>  install-dev install-lib:
> --
> 2.5.5
>

Ah, I'm sorry, I cut "names" from $SUBJ. Should be "Extended names",
but I think it is not worth of a fixing patch...

Thanks,
Jan

-- 
Jan Tulak
jtulak@redhat.com / jan@tulak.me

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v3] xfstests: Fix installation for extended
  2016-06-30 16:08   ` Jan Tulak
@ 2016-06-30 16:21     ` Eryu Guan
  0 siblings, 0 replies; 12+ messages in thread
From: Eryu Guan @ 2016-06-30 16:21 UTC (permalink / raw)
  To: Jan Tulak; +Cc: fstests

On Thu, Jun 30, 2016 at 06:08:09PM +0200, Jan Tulak wrote:
> On Thu, Jun 30, 2016 at 6:06 PM, Jan Tulak <jtulak@redhat.com> wrote:
> > xfstests supports extended test names like 314-foo-bar, but installation of
> > these tests was skipped (not matching a regexp). So this patch fixes the
> > makefiles in tests/xfs/.
> >
> > This change will have to be repeated later for other directories, as adding it
> > now everywhere would cause make install to fail if no such extended name is
> > present in the dir.
> >
> > Signed-off-by: Jan Tulak <jtulak@redhat.com>
> > ---
> > UPDATE:
> > Let it be just in tests/xfs/.
> >
> > NOTE: if tested without at first merging my 400-input-valiation test, make
> > install will fail again. :-)
> >
> > Signed-off-by: Jan Tulak <jtulak@redhat.com>
> > ---
> >  tests/xfs/Makefile | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/tests/xfs/Makefile b/tests/xfs/Makefile
> > index db94be0..e9b98a3 100644
> > --- a/tests/xfs/Makefile
> > +++ b/tests/xfs/Makefile
> > @@ -13,8 +13,10 @@ include $(BUILDRULES)
> >  install:
> >         $(INSTALL) -m 755 -d $(TARGET_DIR)
> >         $(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
> > +       $(INSTALL) -m 755 [0-9]??-* $(TARGET_DIR)
> >         $(INSTALL) -m 644 group $(TARGET_DIR)
> >         $(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
> > +       $(INSTALL) -m 644 [0-9]??-*.* $(TARGET_DIR)
> >
> >  # Nothing.
> >  install-dev install-lib:
> > --
> > 2.5.5
> >
> 
> Ah, I'm sorry, I cut "names" from $SUBJ. Should be "Extended names",
> but I think it is not worth of a fixing patch...

I queued it up with the summary fixed :)

Eryu

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v3] xfstests: Fix installation for extended
  2016-06-30 16:06 ` [PATCH v3] xfstests: Fix installation for extended Jan Tulak
  2016-06-30 16:08   ` Jan Tulak
@ 2016-07-01  1:16   ` Dave Chinner
  2016-07-01 15:51     ` Jan Tulak
  1 sibling, 1 reply; 12+ messages in thread
From: Dave Chinner @ 2016-07-01  1:16 UTC (permalink / raw)
  To: Jan Tulak; +Cc: fstests, eguan

On Thu, Jun 30, 2016 at 06:06:24PM +0200, Jan Tulak wrote:
> xfstests supports extended test names like 314-foo-bar, but installation of
> these tests was skipped (not matching a regexp). So this patch fixes the
> makefiles in tests/xfs/.
> 
> This change will have to be repeated later for other directories, as adding it
> now everywhere would cause make install to fail if no such extended name is
> present in the dir.
> 
> Signed-off-by: Jan Tulak <jtulak@redhat.com>
> ---
> UPDATE:
> Let it be just in tests/xfs/.
> 
> NOTE: if tested without at first merging my 400-input-valiation test, make
> install will fail again. :-)

This really should be done in a way that doesn't fail like this so
it can simply be added to all the tests/<fs>/Makefile and then we
can ignore the problem again.

The usual way of doing this from with the makefile is to use
wildcard rules, something like:

INSTALL_FILES = $(wildcard <regex>)

install: $(addsuffix -install,$(INSTALL_FILES))
	[.....]

%-install:
	$(INSTALL) -m 664 $* $(TARGET_DIR)


You can use multiple wildcard matches for INSTALL_FILES if you can't
write a single regex to grab all the filesystem that need
installing.

See, for example, tests/Makefile for an example of exactly this sort
of wildcard matching so that the makefile does not need updating
every time we add a new tests subdirectory.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v3] xfstests: Fix installation for extended
  2016-07-01  1:16   ` Dave Chinner
@ 2016-07-01 15:51     ` Jan Tulak
  0 siblings, 0 replies; 12+ messages in thread
From: Jan Tulak @ 2016-07-01 15:51 UTC (permalink / raw)
  To: Dave Chinner; +Cc: fstests, Eryu Guan

On Fri, Jul 1, 2016 at 3:16 AM, Dave Chinner <david@fromorbit.com> wrote:
> On Thu, Jun 30, 2016 at 06:06:24PM +0200, Jan Tulak wrote:
>> xfstests supports extended test names like 314-foo-bar, but installation of
>> these tests was skipped (not matching a regexp). So this patch fixes the
>> makefiles in tests/xfs/.
>>
>> This change will have to be repeated later for other directories, as adding it
>> now everywhere would cause make install to fail if no such extended name is
>> present in the dir.
>>
>> Signed-off-by: Jan Tulak <jtulak@redhat.com>
>> ---
>> UPDATE:
>> Let it be just in tests/xfs/.
>>
>> NOTE: if tested without at first merging my 400-input-valiation test, make
>> install will fail again. :-)
>
> This really should be done in a way that doesn't fail like this so
> it can simply be added to all the tests/<fs>/Makefile and then we
> can ignore the problem again.
>
> The usual way of doing this from with the makefile is to use
> wildcard rules, something like:
>
> INSTALL_FILES = $(wildcard <regex>)
>
> install: $(addsuffix -install,$(INSTALL_FILES))
>         [.....]
>
> %-install:
>         $(INSTALL) -m 664 $* $(TARGET_DIR)
>
>
> You can use multiple wildcard matches for INSTALL_FILES if you can't
> write a single regex to grab all the filesystem that need
> installing.
>
> See, for example, tests/Makefile for an example of exactly this sort
> of wildcard matching so that the makefile does not need updating
> every time we add a new tests subdirectory.
>

OK, thank you Dave. This looks reasonable and it works. However, it
spams terminal with a line for every single file installed:

../../install-sh -o root -g root -m 644 072.out /var/lib/xfstests/tests/xfs

And it is few seconds slower for every directory. I could suppress the
output it with @, but then we would be at the beginning again... So
instead, I tried it as:

INSTALL_FILES = $(wildcard <regex>)

install:
        $(INSTALL) -m 664 $(INSTALL_FILES) $(TARGET_DIR)

This is much better and it avoids the failure issue. The only issue is
that now the make output is like:

../../install-sh -o root -g root -m 755 307 043 207 107 070 105 005
238 310 118 210 201 101 010 138 243 097 160 177 081 071 061 300 200
100 054 184 195 169 196 158 209 109 108 106 060 254 293 159 299 246
024 099 174 146 213 069 278 087 046 185 157 264 235 242 135 224 253
124 083 035 142 212 042 232 223 123 132 150 023 136 168 036 044 125
173 190 ... etc.

But I think this is as good as we can get. At least, until we ran into
"getconf ARG_MAX" limit. Still, some 2097152 chars (on my Fedora)
looks safe. It would be about 100.000 files with 20-char long name in
a single directory and we run out of 3-digit IDs for tests long before
that. :-)

And by the way, I'm adding another patch to this one and making it a
set: I found another issue with the extended names around _notrun
usage.

Cheers,
Jan

-- 
Jan Tulak
jtulak@redhat.com / jan@tulak.me

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-07-01 15:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-29 14:57 [PATCH] xfstests: Fix installation for extended names Jan Tulak
2016-06-30  3:38 ` Eryu Guan
2016-06-30  8:32   ` Jan Tulak
2016-06-30  8:35 ` [PATCH v2] " Jan Tulak
2016-06-30 13:33   ` Eryu Guan
2016-06-30 15:19     ` Jan Tulak
2016-06-30 15:35       ` Eryu Guan
2016-06-30 16:06 ` [PATCH v3] xfstests: Fix installation for extended Jan Tulak
2016-06-30 16:08   ` Jan Tulak
2016-06-30 16:21     ` Eryu Guan
2016-07-01  1:16   ` Dave Chinner
2016-07-01 15:51     ` Jan Tulak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.