Move test cased from shared to generic
cover Move test cased from shared to generic
Hi,
as discussed recently, the tests in shared should be in generic.
Based on branch patches-in-queue, commit e098483c662d8f0b7583edca1501d8addd3b7549.
David Sterba (4):
Move shared/298 to generic/740
Move shared/002 to generic/745
Move shared/298 to generic/746
Remove rest of shared/
check | 2 +-
tests/{shared/032 => generic/740} | 2 +-
tests/{shared/032.out => generic/740.out} | 0
tests/{shared/002 => generic/745} | 2 +-
tests/{shared/002.out => generic/745.out} | 0
tests/{shared/298 => generic/746} | 2 +-
tests/{shared/298.out => generic/746.out} | 0
tests/shared/Makefile | 24 -----------------------
8 files changed, 4 insertions(+), 28 deletions(-)
rename tests/{shared/032 => generic/740} (99%)
rename tests/{shared/032.out => generic/740.out} (100%)
rename tests/{shared/002 => generic/745} (99%)
rename tests/{shared/002.out => generic/745.out} (100%)
rename tests/{shared/298 => generic/746} (99%)
rename tests/{shared/298.out => generic/746.out} (100%)
delete mode 100644 tests/shared/MakefileSignature · 1 line
2.44.0
PATCH 1/4 Move shared/032 to generic/740
The shared/ directory was supposed to host tests that apply to a subset of all supported filesystems but this is not utilized much and creates a split from the generic tests. Move the test to generic.
---
tests/{shared/032 => generic/740} | 2 +-
tests/{shared/032.out => generic/740.out} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename tests/{shared/032 => generic/740} (99%)
rename tests/{shared/032.out => generic/740.out} (100%)tests/generic/740 renamed from tests/shared/032 +1 -1
@@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-2.0 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. # -# FS QA Test No. 032 +# FS QA Test No. 740 # # cross check mkfs detection of foreign filesystems #
tests/generic/740.out renamed from tests/shared/032.out +0 -0
Signature · 1 line
2.44.0
Re: [PATCH 1/4] Move shared/032 to generic/740
tests/generic/740.out
Quoted 32 lines · David Sterba
The shared/ directory was supposed to host tests that apply to a subset of all supported filesystems but this is not utilized much and creates a split from the generic tests. Move the test to generic.
Signed-off-by David Sterba <[email protected]>--- tests/{shared/032 => generic/740} | 2 +- tests/{shared/032.out => generic/740.out} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename tests/{shared/032 => generic/740} (99%) rename tests/{shared/032.out => generic/740.out} (100%)tests/generic/740 renamed from tests/shared/032 +1
-1@@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-2.0 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. # -# FS QA Test No. 032 +# FS QA Test No. 740 # # cross check mkfs detection of foreign filesystems #tests/generic/740.out renamed from tests/shared/032.out +0
-0
Don't you need to update the "QA output created by 032" in 032.out as well?
tools/mvtest handles at least the simple cases.
--D
Quoted 4 lines
Signature · 1 line
2.44.0
Re: [PATCH 1/4] Move shared/032 to generic/740
In reply to David SterbaQuoted 3 lines · David Sterba
The shared/ directory was supposed to host tests that apply to a subset of all supported filesystems but this is not utilized much and creates a split from the generic tests. Move the test to generic.
While we're at it, can we please have a
_have_mkfs_overwrite detetion instead of hardcoding ext4 and btrfs with another check for that is supported for btrfs?
I'm also pretty sure at least ext4 supports overwrite detection as well..
Re: [PATCH 1/4] Move shared/032 to generic/740
Quoted 5 lines · Christoph Hellwig
Quoted 3 lines · David Sterba
The shared/ directory was supposed to host tests that apply to a subset of all supported filesystems but this is not utilized much and creates a split from the generic tests. Move the test to generic.
Quoted 7 lines
While we're at it, can we please have a
_have_mkfs_overwritedetetion instead of hardcoding ext4 and btrfs with another check for that is supported for btrfs?I'm also pretty sure at least ext4 supports overwrite detection as well..
Yeah, that's the reason I still keep the shared as a "prefix directory" of generic. The hardcode whitelist or blacklist of _supported_fs is a bit rude. If a fs isn't supported by a test case totally, that's fine. But if the condition of _notrun can be smaller and more precise (refer to some _require_xxx helpers) that would be great.
Of course we can move shared to generic at first, then improve it later. But I doubt if we can keep that in mind, due to there're hundreds of generic cases :)
Thanks,
Zorro
Quoted 2 lines
Re: [PATCH 1/4] Move shared/032 to generic/740
Quoted 9 lines · Zorro Lang
Yeah, that's the reason I still keep the shared as a "prefix directory" of generic. The hardcode whitelist or blacklist of
_supported_fsis a bit rude. If a fs isn't supported by a test case totally, that's fine. But if the condition of_notruncan be smaller and more precise (refer to some_require_xxxhelpers) that would be great.Of course we can move shared to generic at first, then improve it later. But I doubt if we can keep that in mind, due to there're hundreds of generic cases :)
# git-grep _supported_fs tests/generic/ | grep -v generic
will do the job. But before this turns into an endless discussion I can just sign up for adding the proper helpers after the merge is applied.
PATCH 2/4 Move shared/002 to generic/745
In reply to David SterbaThe shared/ directory was supposed to host tests that apply to a subset of all supported filesystems but this is not utilized much and creates a split from the generic tests. Move the test to generic.
---
tests/{shared/002 => generic/745} | 2 +-
tests/{shared/002.out => generic/745.out} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename tests/{shared/002 => generic/745} (99%)
rename tests/{shared/002.out => generic/745.out} (100%)tests/generic/745 renamed from tests/shared/002 +1 -1
@@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-2.0 # Copyright (C) 2015 SUSE Linux Products GmbH. All Rights Reserved. # -# FS QA Test No. 002 +# FS QA Test No. 745 # # Test that after syncing the filesystem, adding many xattrs to a file, syncing # the filesystem again, writing to the file and then doing a fsync against that
tests/generic/745.out renamed from tests/shared/002.out +0 -0
Signature · 1 line
2.44.0
Re: [PATCH 2/4] Move shared/002 to generic/745
Same comment as last time - please add a common helper to check one. e.g. a max_xattr_values or max_xattr_space helper.
Re: [PATCH 2/4] Move shared/002 to generic/745
Quoted 2 lines · Christoph Hellwig
Same comment as last time - please add a common helper to check one. e.g. a
max_xattr_valuesormax_xattr_spacehelper.
I agree that adding the feature checks is the right way but I want to keep minimal changes when files get moved.
PATCH 3/4 Move shared/298 to generic/746
In reply to David SterbaThe shared/ directory was supposed to host tests that apply to a subset of all supported filesystems but this is not utilized much and creates a split from the generic tests. Move the test to generic.
---
tests/{shared/298 => generic/746} | 2 +-
tests/{shared/298.out => generic/746.out} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename tests/{shared/298 => generic/746} (99%)
rename tests/{shared/298.out => generic/746.out} (100%)tests/generic/746 renamed from tests/shared/298 +1 -1
@@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-2.0 # Copyright (c) 2013 Red Hat, Inc., Tomas Racek <[email protected]> # -# FS QA Test No. 298 +# FS QA Test No. 746 # # Test that filesystem sends discard requests only on free blocks #
tests/generic/746.out renamed from tests/shared/298.out +0 -0
Signature · 1 line
2.44.0
Re: [PATCH 3/4] Move shared/298 to generic/746
Quoted 3 lines · David Sterba
The shared/ directory was supposed to host tests that apply to a subset of all supported filesystems but this is not utilized much and creates a split from the generic tests. Move the test to generic.
Similar thing here. This should probably move get_free_sectors to common code and then just do a dummy run of it to see if things are supported.
PATCH 4/4 Remove rest of shared/
In reply to David SterbaAll tests from shared/ have been moved to generic/, remove the Makefile and the reference from the 'check' scripts.
--- check | 2 +- tests/shared/Makefile | 24 ------------------------ 2 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 tests/shared/Makefile
check +1 -1
@@ -49,7 +49,7 @@ timestamp=${TIMESTAMP:=false} rm -f $tmp.list $tmp.tmp $tmp.grep $here/$iam.out $tmp.report.* $tmp.arglist -SRC_GROUPS="generic shared" +SRC_GROUPS="generic" export SRC_DIR="tests" usage()
tests/shared/Makefile deleted +0 -24
@@ -1,24 +0,0 @@ -# -# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved. -# - -TOPDIR = ../.. -include $(TOPDIR)/include/builddefs -include $(TOPDIR)/include/buildgrouplist - -SHARED_DIR = shared -TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(SHARED_DIR) -DIRT = group.list - -default: $(DIRT) - -include $(BUILDRULES) - -install: default - $(INSTALL) -m 755 -d $(TARGET_DIR) - $(INSTALL) -m 755 $(TESTS) $(TARGET_DIR) - $(INSTALL) -m 644 group.list $(TARGET_DIR) - $(INSTALL) -m 644 $(OUTFILES) $(TARGET_DIR) - -# Nothing. -install-dev install-lib:
Signature · 1 line
2.44.0
Quoted 5 lines · David Sterba
Hi,
as discussed recently, the tests in shared should be in generic.
Based on branch patches-in-queue, commit
e098483c662d8f0b7583edca1501d8addd3b7549.
I'm glad to get rid of shared/ finally. Modulo my question about the .out files, I agree with this change.
--D
Quoted 28 lines
David Sterba (4):
Move shared/298 to generic/740
Move shared/002 to generic/745
Move shared/298 to generic/746
Remove rest of shared/check | 2 +- tests/{shared/032 => generic/740} | 2 +- tests/{shared/032.out => generic/740.out} | 0 tests/{shared/002 => generic/745} | 2 +- tests/{shared/002.out => generic/745.out} | 0 tests/{shared/298 => generic/746} | 2 +- tests/{shared/298.out => generic/746.out} | 0 tests/shared/Makefile | 24 ----------------------- 8 files changed, 4 insertions(+), 28 deletions(-) rename tests/{shared/032 => generic/740} (99%) rename tests/{shared/032.out => generic/740.out} (100%) rename tests/{shared/002 => generic/745} (99%) rename tests/{shared/002.out => generic/745.out} (100%) rename tests/{shared/298 => generic/746} (99%) rename tests/{shared/298.out => generic/746.out} (100%) delete mode 100644 tests/shared/MakefileSignature · 1 line
2.44.0
Quoted 10 lines · David Sterba
Hi,
as discussed recently, the tests in shared should be in generic.
Based on branch patches-in-queue, commit
e098483c662d8f0b7583edca1501d8addd3b7549.David Sterba (4):
Move shared/298 to generic/740
Move shared/002 to generic/745
Move shared/298 to generic/746
Thanks David! There're two shared/298 above, I think the former is shared/032 :) And I foundd that all .out files were not changed properly, so I suppose you did that manually. The "mvtest" tool will help you, e.g.
# ./tools/mvtest shared/032 generic/740 # ./tools/mvtest shared/002 generic/745 # ./tools/mvtest shared/298 generic/746
Thanks,
Zorro
Quoted 23 lines
Remove rest of shared/
check | 2 +- tests/{shared/032 => generic/740} | 2 +- tests/{shared/032.out => generic/740.out} | 0 tests/{shared/002 => generic/745} | 2 +- tests/{shared/002.out => generic/745.out} | 0 tests/{shared/298 => generic/746} | 2 +- tests/{shared/298.out => generic/746.out} | 0 tests/shared/Makefile | 24 ----------------------- 8 files changed, 4 insertions(+), 28 deletions(-) rename tests/{shared/032 => generic/740} (99%) rename tests/{shared/032.out => generic/740.out} (100%) rename tests/{shared/002 => generic/745} (99%) rename tests/{shared/002.out => generic/745.out} (100%) rename tests/{shared/298 => generic/746} (99%) rename tests/{shared/298.out => generic/746.out} (100%) delete mode 100644 tests/shared/MakefileSignature · 1 line
2.44.0
Quoted 5 lines · Zorro Lang
Quoted 4 lines · David Sterba
Hi,
as discussed recently, the tests in shared should be in generic.
Quoted 8 lines
Quoted 6 lines
Based on branch patches-in-queue, commit
e098483c662d8f0b7583edca1501d8addd3b7549.David Sterba (4):
Move shared/298 to generic/740
Move shared/002 to generic/745
Move shared/298 to generic/746Thanks David! There're two shared/298 above, I think the former is shared/032 :)
I noticed the wrong subject of patch before sending and updated the patch manually but not the summary in the cover letter.
Quoted 6 lines
And I foundd that all .out files were not changed properly, so I suppose you did that manually. The "mvtest" tool will help you, e.g.
# ./tools/mvtest shared/032 generic/740 # ./tools/mvtest shared/002 generic/745 # ./tools/mvtest shared/298 generic/746
I didn't know such tool exist so yeah I forgot to update the .out too. Do you want a resend or can you fix that when committing?
Quoted 21 lines · David Sterba
Quoted 5 lines · Zorro Lang
Quoted 4 lines · David Sterba
Hi,
as discussed recently, the tests in shared should be in generic.
Quoted 8 lines
Quoted 6 lines
Based on branch patches-in-queue, commit
e098483c662d8f0b7583edca1501d8addd3b7549.David Sterba (4):
Move shared/298 to generic/740
Move shared/002 to generic/745
Move shared/298 to generic/746Thanks David! There're two shared/298 above, I think the former is shared/032 :)
I noticed the wrong subject of patch before sending and updated the patch manually but not the summary in the cover letter.
Quoted 3 lines
And I foundd that all .out files were not changed properly, so I suppose you did that manually. The "mvtest" tool will help you, e.g.
Quoted 6 lines
Quoted 3 lines
# ./tools/mvtest shared/032 generic/740 # ./tools/mvtest shared/002 generic/745 # ./tools/mvtest shared/298 generic/746I didn't know such tool exist so yeah I forgot to update the .out too. Do you want a resend or can you fix that when committing?
Sure, as this patch has gotten RVB from Darrick, and if you and Christoph all tend to improve the _require_xxx helpers later, I can merge this patchset at first (rewrite with mvtest script :)
Thanks,
Zorro