diff mbox

[01/12] check: avoid error messages of tests/$FS does not exist

Message ID 1455069001-17846-2-git-send-email-tytso@mit.edu (mailing list archive)
State New, archived
Headers show

Commit Message

Theodore Ts'o Feb. 10, 2016, 1:49 a.m. UTC
There are no tmpfs specific tests, so tests/tmpfs does not exist.
Avoid print an error message caused by trying to read the file
tests/tmpfs/group (for example).

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 check | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Dave Chinner Feb. 10, 2016, 5:45 a.m. UTC | #1
On Tue, Feb 09, 2016 at 08:49:50PM -0500, Theodore Ts'o wrote:
> There are no tmpfs specific tests, so tests/tmpfs does not exist.
> Avoid print an error message caused by trying to read the file
> tests/tmpfs/group (for example).
> 
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Where does this error message get emitted? I would have expected
lots of people to notice this (e.g. NFS, CIFS, ext2, ext3, gfs2)
if this was causing some kind of problem long before this...

Cheers,

Dave.
Theodore Ts'o Feb. 10, 2016, 3:34 p.m. UTC | #2
On Wed, Feb 10, 2016 at 04:45:31PM +1100, Dave Chinner wrote:
> On Tue, Feb 09, 2016 at 08:49:50PM -0500, Theodore Ts'o wrote:
> > There are no tmpfs specific tests, so tests/tmpfs does not exist.
> > Avoid print an error message caused by trying to read the file
> > tests/tmpfs/group (for example).
> > 
> > Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> 
> Where does this error message get emitted? I would have expected
> lots of people to notice this (e.g. NFS, CIFS, ext2, ext3, gfs2)
> if this was causing some kind of problem long before this...

It doesn't really cause a problem; it's more of a cosmetic issue, in
that it prints a harmless/annoying error message during the test
startup.  It shows up if you specify a group, e.g. "check -g quick":

BEGIN TEST tmpfs: tmpfs Wed Feb 10 10:31:09 EST 2016
DEVICE: test:/tmp
MK2FS OPTIONS:
MOUNT OPTIONS: -o block_validity
./check: line 96: tests/tmpfs/group: No such file or directory
FSTYP         -- tmpfs
PLATFORM      -- Linux/i686 kvm-xfstests 4.5.0-rc2ext4-00002-g6df2762
MKFS_OPTIONS  -- test:/scratch
MOUNT_OPTIONS -- -o size=1G test:/scratch /test/scratch

generic/001   	 [10:31:10][    5.811742] run fstests generic/001
    ...

Cheers,

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christoph Hellwig Feb. 10, 2016, 4:28 p.m. UTC | #3
On Wed, Feb 10, 2016 at 10:34:55AM -0500, Theodore Ts'o wrote:
> It doesn't really cause a problem; it's more of a cosmetic issue, in
> that it prints a harmless/annoying error message during the test
> startup.  It shows up if you specify a group, e.g. "check -g quick":

I found this annoying when testing nfs, and it's been on my todo list
for a while to fix it.  Never high enough to actually do it, but I'd
love to see the fix merged.
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dave Chinner Feb. 10, 2016, 10:19 p.m. UTC | #4
On Wed, Feb 10, 2016 at 10:34:55AM -0500, Theodore Ts'o wrote:
> On Wed, Feb 10, 2016 at 04:45:31PM +1100, Dave Chinner wrote:
> > On Tue, Feb 09, 2016 at 08:49:50PM -0500, Theodore Ts'o wrote:
> > > There are no tmpfs specific tests, so tests/tmpfs does not exist.
> > > Avoid print an error message caused by trying to read the file
> > > tests/tmpfs/group (for example).
> > > 
> > > Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> > 
> > Where does this error message get emitted? I would have expected
> > lots of people to notice this (e.g. NFS, CIFS, ext2, ext3, gfs2)
> > if this was causing some kind of problem long before this...
> 
> It doesn't really cause a problem; it's more of a cosmetic issue, in
> that it prints a harmless/annoying error message during the test
> startup.  It shows up if you specify a group, e.g. "check -g quick":
> 
> BEGIN TEST tmpfs: tmpfs Wed Feb 10 10:31:09 EST 2016
> DEVICE: test:/tmp
> MK2FS OPTIONS:
> MOUNT OPTIONS: -o block_validity
> ./check: line 96: tests/tmpfs/group: No such file or directory
> FSTYP         -- tmpfs
> PLATFORM      -- Linux/i686 kvm-xfstests 4.5.0-rc2ext4-00002-g6df2762
> MKFS_OPTIONS  -- test:/scratch
> MOUNT_OPTIONS -- -o size=1G test:/scratch /test/scratch
> 
> generic/001   	 [10:31:10][    5.811742] run fstests generic/001

Can you please rewrite the commit message to include this?

Cheers,

Dave.
Theodore Ts'o Feb. 10, 2016, 11:17 p.m. UTC | #5
On Wed, Feb 10, 2016 at 08:28:40AM -0800, Christoph Hellwig wrote:
> On Wed, Feb 10, 2016 at 10:34:55AM -0500, Theodore Ts'o wrote:
> > It doesn't really cause a problem; it's more of a cosmetic issue, in
> > that it prints a harmless/annoying error message during the test
> > startup.  It shows up if you specify a group, e.g. "check -g quick":
> 
> I found this annoying when testing nfs, and it's been on my todo list
> for a while to fix it.  Never high enough to actually do it, but I'd
> love to see the fix merged.

Yeah, it triggered my inner OCD, but if it weren't for the fact that I
was making a bunch of other tmpfs changes it probably wouldn't have
risen to the top of my list either.

					- Ted


--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Theodore Ts'o Feb. 10, 2016, 11:32 p.m. UTC | #6
On Thu, Feb 11, 2016 at 09:19:59AM +1100, Dave Chinner wrote:
> On Wed, Feb 10, 2016 at 10:34:55AM -0500, Theodore Ts'o wrote:
> > On Wed, Feb 10, 2016 at 04:45:31PM +1100, Dave Chinner wrote:
> > > On Tue, Feb 09, 2016 at 08:49:50PM -0500, Theodore Ts'o wrote:
> > > > There are no tmpfs specific tests, so tests/tmpfs does not exist.
> > > > Avoid print an error message caused by trying to read the file
> > > > tests/tmpfs/group (for example).
> > > > 
> > > > Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> > > 
> > > Where does this error message get emitted? I would have expected
> > > lots of people to notice this (e.g. NFS, CIFS, ext2, ext3, gfs2)
> > > if this was causing some kind of problem long before this...
> > 
> > It doesn't really cause a problem; it's more of a cosmetic issue, in
> > that it prints a harmless/annoying error message during the test
> > startup.  It shows up if you specify a group, e.g. "check -g quick":
> > 
> > BEGIN TEST tmpfs: tmpfs Wed Feb 10 10:31:09 EST 2016
> > DEVICE: test:/tmp
> > MK2FS OPTIONS:
> > MOUNT OPTIONS: -o block_validity
> > ./check: line 96: tests/tmpfs/group: No such file or directory
> > FSTYP         -- tmpfs
> > PLATFORM      -- Linux/i686 kvm-xfstests 4.5.0-rc2ext4-00002-g6df2762
> > MKFS_OPTIONS  -- test:/scratch
> > MOUNT_OPTIONS -- -o size=1G test:/scratch /test/scratch
> > 
> > generic/001   	 [10:31:10][    5.811742] run fstests generic/001
> 
> Can you please rewrite the commit message to include this?

Sure, will do.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/check b/check
index c40d2a8..2986d84 100755
--- a/check
+++ b/check
@@ -90,6 +90,9 @@  get_group_list()
 	grp=$1
 
 	for d in $SRC_GROUPS $FSTYP; do
+		if ! test -d "$SRC_DIR/$d" ; then
+			continue
+		fi
 		l=$(sed -n < $SRC_DIR/$d/group \
 			-e 's/#.*//' \
 			-e 's/$/ /' \
@@ -105,6 +108,9 @@  get_all_tests()
 {
 	touch $tmp.list
 	for d in $SRC_GROUPS $FSTYP; do
+		if ! test -d "$SRC_DIR/$d" ; then
+			continue
+		fi
 		ls $SRC_DIR/$d/* | \
 			grep -v "\..*" | \
 			grep "^$SRC_DIR/$d/$VALID_TEST_NAME"| \