* [PATCH 1/2] README: remove incorrect check -udf usage
@ 2017-06-26 13:40 David Disseldorp
2017-06-26 13:40 ` [PATCH 2/2] common: remove tmp.mkfs[err/std] files by name David Disseldorp
0 siblings, 1 reply; 5+ messages in thread
From: David Disseldorp @ 2017-06-26 13:40 UTC (permalink / raw)
To: fstests; +Cc: David Disseldorp
The -udf parameter for check does not exist. UDF can still be tested via
the configuration parameter FSTYP=udf.
Signed-off-by: David Disseldorp <ddiss@suse.de>
---
README | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/README b/README
index fd491e4a..11bf6a94 100644
--- a/README
+++ b/README
@@ -120,12 +120,10 @@ Running tests:
- Groups of tests maybe ran by: ./check -g [group(s)]
See the 'group' file for details on groups
- To randomize test order: ./check -r [test(s)]
- - You can explicitly specify NFS/CIFS/UDF/OVERLAY, otherwise
+ - You can explicitly specify NFS/CIFS/OVERLAY, otherwise
the filesystem type will be autodetected from $TEST_DEV:
- for running nfs tests: ./check -nfs [test(s)]
- for running cifs/smb3 tests: ./check -cifs [test(s)]
- - for udf tests: ./check -udf [test(s)]
- Running all the udf tests: ./check -udf -g udf
- for overlay tests: ./check -overlay [test(s)]
The TEST and SCRATCH partitions should be pre-formatted
with another base fs, where the overlay dirs will be created
--
2.12.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] common: remove tmp.mkfs[err/std] files by name
2017-06-26 13:40 [PATCH 1/2] README: remove incorrect check -udf usage David Disseldorp
@ 2017-06-26 13:40 ` David Disseldorp
2017-06-27 4:33 ` Eryu Guan
0 siblings, 1 reply; 5+ messages in thread
From: David Disseldorp @ 2017-06-26 13:40 UTC (permalink / raw)
To: fstests; +Cc: David Disseldorp
Without any $tmp suffix, users silly enough to run xfstests without
mktemp present will unintentionally "rm -f *".
Signed-off-by: David Disseldorp <ddiss@suse.de>
---
common/rc | 2 +-
common/xfs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/rc b/common/rc
index ff1b75c9..a38f4e03 100644
--- a/common/rc
+++ b/common/rc
@@ -595,7 +595,7 @@ _scratch_do_mkfs()
cat $tmp.mkfsstd
eval "cat $tmp.mkfserr | $mkfs_filter" >&2
- rm -f $tmp*
+ rm -f $tmp.mkfsstd $tmp.mkfserr
return $mkfs_status
}
diff --git a/common/xfs b/common/xfs
index 0f0825bc..59776a6f 100644
--- a/common/xfs
+++ b/common/xfs
@@ -104,7 +104,7 @@ _scratch_mkfs_xfs()
# output mkfs stdout and stderr
cat $tmp.mkfsstd
cat $tmp.mkfserr >&2
- rm -f $tmp*
+ rm -f $tmp.mkfsstd $tmp.mkfserr
return $mkfs_status
}
--
2.12.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] common: remove tmp.mkfs[err/std] files by name
2017-06-26 13:40 ` [PATCH 2/2] common: remove tmp.mkfs[err/std] files by name David Disseldorp
@ 2017-06-27 4:33 ` Eryu Guan
2017-06-27 9:55 ` David Disseldorp
0 siblings, 1 reply; 5+ messages in thread
From: Eryu Guan @ 2017-06-27 4:33 UTC (permalink / raw)
To: David Disseldorp; +Cc: fstests
On Mon, Jun 26, 2017 at 03:40:17PM +0200, David Disseldorp wrote:
> Without any $tmp suffix, users silly enough to run xfstests without
> mktemp present will unintentionally "rm -f *".
>
> Signed-off-by: David Disseldorp <ddiss@suse.de>
I posted a patch back in Jan. to cleanup tmp files and other leftover
files after test, I switched from mktemp to a normal "tmp=/tmp/$$._mkfs"
assignment so it could avoid this problem you want to fix too. But my
patch got no review.
I'm going to send new version of my patch and will fix _scratch_do_mkfs
too, I really appreciate if you could help review and provide
Reviewed-by tag.
Thanks,
Eryu
> ---
> common/rc | 2 +-
> common/xfs | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/common/rc b/common/rc
> index ff1b75c9..a38f4e03 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -595,7 +595,7 @@ _scratch_do_mkfs()
> cat $tmp.mkfsstd
> eval "cat $tmp.mkfserr | $mkfs_filter" >&2
>
> - rm -f $tmp*
> + rm -f $tmp.mkfsstd $tmp.mkfserr
> return $mkfs_status
> }
>
> diff --git a/common/xfs b/common/xfs
> index 0f0825bc..59776a6f 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -104,7 +104,7 @@ _scratch_mkfs_xfs()
> # output mkfs stdout and stderr
> cat $tmp.mkfsstd
> cat $tmp.mkfserr >&2
> - rm -f $tmp*
> + rm -f $tmp.mkfsstd $tmp.mkfserr
>
> return $mkfs_status
> }
> --
> 2.12.3
>
> --
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] common: remove tmp.mkfs[err/std] files by name
2017-06-27 4:33 ` Eryu Guan
@ 2017-06-27 9:55 ` David Disseldorp
2017-06-30 4:18 ` Eryu Guan
0 siblings, 1 reply; 5+ messages in thread
From: David Disseldorp @ 2017-06-27 9:55 UTC (permalink / raw)
To: Eryu Guan; +Cc: fstests
On Tue, 27 Jun 2017 12:33:04 +0800, Eryu Guan wrote:
> I posted a patch back in Jan. to cleanup tmp files and other leftover
> files after test, I switched from mktemp to a normal "tmp=/tmp/$$._mkfs"
> assignment so it could avoid this problem you want to fix too. But my
> patch got no review.
>
> I'm going to send new version of my patch and will fix _scratch_do_mkfs
> too, I really appreciate if you could help review and provide
> Reviewed-by tag.
Thanks for the feedback, Eryu. My preference would be to continue to use
mktemp. I know it's test code, but I'd still like to avoid any potential
symlink races.
Cheers, David
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] common: remove tmp.mkfs[err/std] files by name
2017-06-27 9:55 ` David Disseldorp
@ 2017-06-30 4:18 ` Eryu Guan
0 siblings, 0 replies; 5+ messages in thread
From: Eryu Guan @ 2017-06-30 4:18 UTC (permalink / raw)
To: David Disseldorp; +Cc: fstests
On Tue, Jun 27, 2017 at 11:55:22AM +0200, David Disseldorp wrote:
> On Tue, 27 Jun 2017 12:33:04 +0800, Eryu Guan wrote:
>
> > I posted a patch back in Jan. to cleanup tmp files and other leftover
> > files after test, I switched from mktemp to a normal "tmp=/tmp/$$._mkfs"
> > assignment so it could avoid this problem you want to fix too. But my
> > patch got no review.
> >
> > I'm going to send new version of my patch and will fix _scratch_do_mkfs
> > too, I really appreciate if you could help review and provide
> > Reviewed-by tag.
>
> Thanks for the feedback, Eryu. My preference would be to continue to use
> mktemp. I know it's test code, but I'd still like to avoid any potential
> symlink races.
>
> Cheers, David
mktemp doesn't really help in this case. What we do in _scratch_do_mkfs
is like:
local tmp=`mktemp`
....
eval "$mkfs_cmd ..." > $tmp.mkfsstd
$tmp is not used directly as a tmp file, it just serves as a common
prefix, $tmp._any_suffix_ can be a symlink too. (BTW, remove only
$tmp.mkfsstd and $tmp.mkfserr leaves $tmp itself in /tmp).
And I don't think it's that necessary to avoid potential symlink races
in fstests, the "tmp=/tmp/$$ then write to $tmp.file" usage is almost
everywhere in fstests. I agree it'd be great to avoid symlink races, but
IMHO it's not worth the effort to make whole fstests symlink-race-free.
Thanks,
Eryu
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-06-30 4:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-26 13:40 [PATCH 1/2] README: remove incorrect check -udf usage David Disseldorp
2017-06-26 13:40 ` [PATCH 2/2] common: remove tmp.mkfs[err/std] files by name David Disseldorp
2017-06-27 4:33 ` Eryu Guan
2017-06-27 9:55 ` David Disseldorp
2017-06-30 4:18 ` Eryu Guan
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.