All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] fstests: 2 more exfat-related fixes
@ 2020-05-06 22:15 Eric Sandeen
  2020-05-06 22:16 ` [PATCH 1/2] fstests: update sparse file & negative timestamp tests for exfat Eric Sandeen
  2020-05-06 22:18 ` [PATCH 2/2] fstests: add _require_mknod Eric Sandeen
  0 siblings, 2 replies; 10+ messages in thread
From: Eric Sandeen @ 2020-05-06 22:15 UTC (permalink / raw)
  To: fstests, Namjae Jeon

Teach fstests that exfat can't do sparse files or negative timestamps
Add a new _require test to see if the filesystem can contain special device nodes (i.e. mknod works)

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

* [PATCH 1/2] fstests: update sparse file & negative timestamp tests for exfat
  2020-05-06 22:15 [PATCH 0/2] fstests: 2 more exfat-related fixes Eric Sandeen
@ 2020-05-06 22:16 ` Eric Sandeen
  2020-05-08 12:05   ` Christoph Hellwig
  2020-05-06 22:18 ` [PATCH 2/2] fstests: add _require_mknod Eric Sandeen
  1 sibling, 1 reply; 10+ messages in thread
From: Eric Sandeen @ 2020-05-06 22:16 UTC (permalink / raw)
  To: fstests, Namjae Jeon

exfat cannot do sparse files or negative timestamps, so exclude
tests which require these.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---

diff --git a/common/rc b/common/rc
index 2734dbf6..e90c12a3 100644
--- a/common/rc
+++ b/common/rc
@@ -2357,7 +2357,7 @@ _require_fs_space()
 _require_sparse_files()
 {
     case $FSTYP in
-    hfsplus)
+    hfsplus|exfat)
         _notrun "Sparse files not supported by this filesystem type: $FSTYP"
 	;;
     *)
@@ -4188,9 +4188,10 @@ _check_xfs_scrub_does_unicode() {
 	return 0
 }
 
+# exfat timestamps start at 1980 and cannot be prior to epoch
 _require_negative_timestamps() {
 	case "$FSTYP" in
-	ceph)
+	ceph|exfat)
 		_notrun "$FSTYP does not support negative timestamps"
 		;;
 	esac

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

* [PATCH 2/2] fstests: add _require_mknod
  2020-05-06 22:15 [PATCH 0/2] fstests: 2 more exfat-related fixes Eric Sandeen
  2020-05-06 22:16 ` [PATCH 1/2] fstests: update sparse file & negative timestamp tests for exfat Eric Sandeen
@ 2020-05-06 22:18 ` Eric Sandeen
  2020-05-08 12:05   ` Christoph Hellwig
  2020-05-08 14:23   ` [PATCH 2/2 V2] " Eric Sandeen
  1 sibling, 2 replies; 10+ messages in thread
From: Eric Sandeen @ 2020-05-06 22:18 UTC (permalink / raw)
  To: fstests, Namjae Jeon

Add a _require_mknod test so that filesystems with no ->mknod
operation will _notrun instead of fail.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---

diff --git a/common/rc b/common/rc
index 2734dbf6..e90c12a3 100644
--- a/common/rc
+++ b/common/rc
@@ -4214,6 +4215,12 @@ _require_sysctl()
 	sysctl $name &>/dev/null || _notrun "$name sysctl unavailable"
 }
 
+_require_mknod()
+{
+	mknod $TEST_DIR/$tmp.null c 1 3 || _notrun "$FSTYP does not support mknod/mkfifo"
+	rm -f $TEST_DIR/$tmp.null
+}
+
 init_rc
 
 ################################################################################
diff --git a/tests/generic/062 b/tests/generic/062
index ba744885..d2a0ac9a 100755
--- a/tests/generic/062
+++ b/tests/generic/062
@@ -60,6 +60,7 @@ _supported_os Linux
 _require_scratch
 _require_attrs
 _require_symlinks
+_require_mknod
 
 rm -f $tmp.backup1 $tmp.backup2 $seqres.full
 
diff --git a/tests/generic/184 b/tests/generic/184
index 8aca1a0d..94f4d0e1 100755
--- a/tests/generic/184
+++ b/tests/generic/184
@@ -29,6 +29,7 @@ _cleanup()
 _supported_fs generic
 _supported_os Linux
 _require_test
+_require_mknod
 
 rm -f $TEST_DIR/null
 mknod $TEST_DIR/null c 1 3
diff --git a/tests/generic/306 b/tests/generic/306
index 046f4516..6f16a5f5 100755
--- a/tests/generic/306
+++ b/tests/generic/306
@@ -34,6 +34,7 @@ _supported_os Linux
 _require_scratch
 _require_test
 _require_symlinks
+_require_mknod
 
 DEVNULL=$SCRATCH_MNT/devnull
 DEVZERO=$SCRATCH_MNT/devzero
diff --git a/tests/generic/401 b/tests/generic/401
index 00e9bbe0..f8b1fd21 100755
--- a/tests/generic/401
+++ b/tests/generic/401
@@ -38,6 +38,7 @@ _supported_fs generic
 _supported_os Linux
 _require_scratch
 _require_symlinks
+_require_mknod
 _require_test_program "t_dir_type"
 
 rm -f $seqres.full
diff --git a/tests/generic/434 b/tests/generic/434
index edbf49d3..131c5d99 100755
--- a/tests/generic/434
+++ b/tests/generic/434
@@ -30,6 +30,7 @@ _supported_os Linux
 
 _require_xfs_io_command "copy_range"
 _require_test
+_require_mknod
 
 testdir=$TEST_DIR/test-$seq
 rm -rf $testdir
diff --git a/tests/generic/479 b/tests/generic/479
index aaf864a4..fc0b3b6c 100755
--- a/tests/generic/479
+++ b/tests/generic/479
@@ -33,6 +33,7 @@ _supported_fs generic
 _supported_os Linux
 _require_scratch
 _require_symlinks
+_require_mknod
 _require_dm_target flakey
 
 rm -f $seqres.full
diff --git a/tests/generic/564 b/tests/generic/564
index 4958b3b5..b9b21134 100755
--- a/tests/generic/564
+++ b/tests/generic/564
@@ -37,6 +37,9 @@ rm -f $seqres.full
 
 _require_test
 _require_loop
+# for mkfifo
+_require_mknod
+
 #
 # This test effectively requires xfs_io with these commits
 #  2a42470b xfs_io: copy_file_range length is a size_t


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

* Re: [PATCH 1/2] fstests: update sparse file & negative timestamp tests for exfat
  2020-05-06 22:16 ` [PATCH 1/2] fstests: update sparse file & negative timestamp tests for exfat Eric Sandeen
@ 2020-05-08 12:05   ` Christoph Hellwig
  0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2020-05-08 12:05 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: fstests, Namjae Jeon

On Wed, May 06, 2020 at 05:16:50PM -0500, Eric Sandeen wrote:
> exfat cannot do sparse files or negative timestamps, so exclude
> tests which require these.
> 
> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

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

* Re: [PATCH 2/2] fstests: add _require_mknod
  2020-05-06 22:18 ` [PATCH 2/2] fstests: add _require_mknod Eric Sandeen
@ 2020-05-08 12:05   ` Christoph Hellwig
  2020-05-08 14:23   ` [PATCH 2/2 V2] " Eric Sandeen
  1 sibling, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2020-05-08 12:05 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: fstests, Namjae Jeon

> +_require_mknod()
> +{
> +	mknod $TEST_DIR/$tmp.null c 1 3 || _notrun "$FSTYP does not support mknod/mkfifo"

Can you fix this overly long line?  Otherwise this looks good.

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

* [PATCH 2/2 V2] fstests: add _require_mknod
  2020-05-06 22:18 ` [PATCH 2/2] fstests: add _require_mknod Eric Sandeen
  2020-05-08 12:05   ` Christoph Hellwig
@ 2020-05-08 14:23   ` Eric Sandeen
  2020-05-08 15:03     ` Christoph Hellwig
                       ` (2 more replies)
  1 sibling, 3 replies; 10+ messages in thread
From: Eric Sandeen @ 2020-05-08 14:23 UTC (permalink / raw)
  To: fstests, Namjae Jeon, Christoph Hellwig

Add a _require_mknod test so that filesystems with no ->mknod
operation will _notrun instead of fail.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---

V2 trim the long line, sorry.

diff --git a/common/rc b/common/rc
index 2734dbf6..b50a4294 100644
--- a/common/rc
+++ b/common/rc
@@ -4214,6 +4215,13 @@ _require_sysctl()
 	sysctl $name &>/dev/null || _notrun "$name sysctl unavailable"
 }
 
+_require_mknod()
+{
+	mknod $TEST_DIR/$tmp.null c 1 3 \
+		|| _notrun "$FSTYP does not support mknod/mkfifo"
+	rm -f $TEST_DIR/$tmp.null
+}
+
 init_rc
 
 ################################################################################



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

* Re: [PATCH 2/2 V2] fstests: add _require_mknod
  2020-05-08 14:23   ` [PATCH 2/2 V2] " Eric Sandeen
@ 2020-05-08 15:03     ` Christoph Hellwig
  2020-05-17 16:12     ` Eryu Guan
  2020-05-17 21:13     ` [PATCH 2/2 V3] " Eric Sandeen
  2 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2020-05-08 15:03 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: fstests, Namjae Jeon, Christoph Hellwig

On Fri, May 08, 2020 at 09:23:42AM -0500, Eric Sandeen wrote:
> Add a _require_mknod test so that filesystems with no ->mknod
> operation will _notrun instead of fail.
> 
> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

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

* Re: [PATCH 2/2 V2] fstests: add _require_mknod
  2020-05-08 14:23   ` [PATCH 2/2 V2] " Eric Sandeen
  2020-05-08 15:03     ` Christoph Hellwig
@ 2020-05-17 16:12     ` Eryu Guan
  2020-05-17 21:04       ` Eric Sandeen
  2020-05-17 21:13     ` [PATCH 2/2 V3] " Eric Sandeen
  2 siblings, 1 reply; 10+ messages in thread
From: Eryu Guan @ 2020-05-17 16:12 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: fstests, Namjae Jeon, Christoph Hellwig

On Fri, May 08, 2020 at 09:23:42AM -0500, Eric Sandeen wrote:
> Add a _require_mknod test so that filesystems with no ->mknod
> operation will _notrun instead of fail.
> 
> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
> ---
> 
> V2 trim the long line, sorry.
> 
> diff --git a/common/rc b/common/rc
> index 2734dbf6..b50a4294 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -4214,6 +4215,13 @@ _require_sysctl()
>  	sysctl $name &>/dev/null || _notrun "$name sysctl unavailable"
>  }
>  
> +_require_mknod()
> +{
> +	mknod $TEST_DIR/$tmp.null c 1 3 \

$tmp points to /tmp/$$, so this mknod is trying to make node at

	$TEST_DIR//tmp/<pid>

which will always fail.

Use $TEST_DIR/$seq.null instead?

And I don't see any callers of this require rule, shouldn't existing
tests that use mknod be updated to require this rule?

Thanks,
Eryu

> +		|| _notrun "$FSTYP does not support mknod/mkfifo"
> +	rm -f $TEST_DIR/$tmp.null
> +}
> +
>  init_rc
>  
>  ################################################################################
> 

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

* Re: [PATCH 2/2 V2] fstests: add _require_mknod
  2020-05-17 16:12     ` Eryu Guan
@ 2020-05-17 21:04       ` Eric Sandeen
  0 siblings, 0 replies; 10+ messages in thread
From: Eric Sandeen @ 2020-05-17 21:04 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests, Namjae Jeon, Christoph Hellwig

On 5/17/20 11:12 AM, Eryu Guan wrote:
> On Fri, May 08, 2020 at 09:23:42AM -0500, Eric Sandeen wrote:
>> Add a _require_mknod test so that filesystems with no ->mknod
>> operation will _notrun instead of fail.
>>
>> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
>> ---
>>
>> V2 trim the long line, sorry.
>>
>> diff --git a/common/rc b/common/rc
>> index 2734dbf6..b50a4294 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -4214,6 +4215,13 @@ _require_sysctl()
>>  	sysctl $name &>/dev/null || _notrun "$name sysctl unavailable"
>>  }
>>  
>> +_require_mknod()
>> +{
>> +	mknod $TEST_DIR/$tmp.null c 1 3 \
> 
> $tmp points to /tmp/$$, so this mknod is trying to make node at
> 
> 	$TEST_DIR//tmp/<pid>
> 
> which will always fail.
> 
> Use $TEST_DIR/$seq.null instead?
> 
> And I don't see any callers of this require rule, shouldn't existing
> tests that use mknod be updated to require this rule?

I'm sorry Eryu, the original patch added it to all the tests and I somehow
lost that on V2, I'm really making a mess of patches lately.  :(  I'll send
a V3 with more care.

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

* [PATCH 2/2 V3] fstests: add _require_mknod
  2020-05-08 14:23   ` [PATCH 2/2 V2] " Eric Sandeen
  2020-05-08 15:03     ` Christoph Hellwig
  2020-05-17 16:12     ` Eryu Guan
@ 2020-05-17 21:13     ` Eric Sandeen
  2 siblings, 0 replies; 10+ messages in thread
From: Eric Sandeen @ 2020-05-17 21:13 UTC (permalink / raw)
  To: fstests, Namjae Jeon, Christoph Hellwig

Add a _require_mknod test so that filesystems with no ->mknod
operation will _notrun instead of fail.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---

V2 trim the long line, sorry.
V3 fix temporary node name :(
   actually add _require test to relevant tests :(

diff --git a/common/rc b/common/rc
index 88113fe9..acd176ae 100644
--- a/common/rc
+++ b/common/rc
@@ -4217,6 +4217,13 @@ _require_sysctl()
 	sysctl $name &>/dev/null || _notrun "$name sysctl unavailable"
 }
 
+_require_mknod()
+{
+	mknod $TEST_DIR/$seq.null c 1 3 \
+		|| _notrun "$FSTYP does not support mknod/mkfifo"
+	rm -f $TEST_DIR/$seq.null
+}
+
 init_rc
 
 ################################################################################
diff --git a/tests/generic/062 b/tests/generic/062
index ba744885..d2a0ac9a 100755
--- a/tests/generic/062
+++ b/tests/generic/062
@@ -60,6 +60,7 @@ _supported_os Linux
 _require_scratch
 _require_attrs
 _require_symlinks
+_require_mknod
 
 rm -f $tmp.backup1 $tmp.backup2 $seqres.full
 
diff --git a/tests/generic/184 b/tests/generic/184
index 8aca1a0d..94f4d0e1 100755
--- a/tests/generic/184
+++ b/tests/generic/184
@@ -29,6 +29,7 @@ _cleanup()
 _supported_fs generic
 _supported_os Linux
 _require_test
+_require_mknod
 
 rm -f $TEST_DIR/null
 mknod $TEST_DIR/null c 1 3
diff --git a/tests/generic/306 b/tests/generic/306
index 046f4516..6f16a5f5 100755
--- a/tests/generic/306
+++ b/tests/generic/306
@@ -34,6 +34,7 @@ _supported_os Linux
 _require_scratch
 _require_test
 _require_symlinks
+_require_mknod
 
 DEVNULL=$SCRATCH_MNT/devnull
 DEVZERO=$SCRATCH_MNT/devzero
diff --git a/tests/generic/401 b/tests/generic/401
index 00e9bbe0..f8b1fd21 100755
--- a/tests/generic/401
+++ b/tests/generic/401
@@ -38,6 +38,7 @@ _supported_fs generic
 _supported_os Linux
 _require_scratch
 _require_symlinks
+_require_mknod
 _require_test_program "t_dir_type"
 
 rm -f $seqres.full
diff --git a/tests/generic/434 b/tests/generic/434
index edbf49d3..131c5d99 100755
--- a/tests/generic/434
+++ b/tests/generic/434
@@ -30,6 +30,7 @@ _supported_os Linux
 
 _require_xfs_io_command "copy_range"
 _require_test
+_require_mknod
 
 testdir=$TEST_DIR/test-$seq
 rm -rf $testdir
diff --git a/tests/generic/479 b/tests/generic/479
index aaf864a4..fc0b3b6c 100755
--- a/tests/generic/479
+++ b/tests/generic/479
@@ -33,6 +33,7 @@ _supported_fs generic
 _supported_os Linux
 _require_scratch
 _require_symlinks
+_require_mknod
 _require_dm_target flakey
 
 rm -f $seqres.full
diff --git a/tests/generic/564 b/tests/generic/564
index 4958b3b5..b9b21134 100755
--- a/tests/generic/564
+++ b/tests/generic/564
@@ -37,6 +37,9 @@ rm -f $seqres.full
 
 _require_test
 _require_loop
+# for mkfifo
+_require_mknod
+
 #
 # This test effectively requires xfs_io with these commits
 #  2a42470b xfs_io: copy_file_range length is a size_t



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

end of thread, other threads:[~2020-05-17 21:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 22:15 [PATCH 0/2] fstests: 2 more exfat-related fixes Eric Sandeen
2020-05-06 22:16 ` [PATCH 1/2] fstests: update sparse file & negative timestamp tests for exfat Eric Sandeen
2020-05-08 12:05   ` Christoph Hellwig
2020-05-06 22:18 ` [PATCH 2/2] fstests: add _require_mknod Eric Sandeen
2020-05-08 12:05   ` Christoph Hellwig
2020-05-08 14:23   ` [PATCH 2/2 V2] " Eric Sandeen
2020-05-08 15:03     ` Christoph Hellwig
2020-05-17 16:12     ` Eryu Guan
2020-05-17 21:04       ` Eric Sandeen
2020-05-17 21:13     ` [PATCH 2/2 V3] " Eric Sandeen

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.