All of lore.kernel.org
 help / color / mirror / Atom feed
* [xfstests PATCH] generic/556: add test case for top-level dir rename
@ 2022-05-14 18:01 ` Eric Biggers
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Biggers @ 2022-05-14 18:01 UTC (permalink / raw)
  To: fstests
  Cc: linux-f2fs-devel, linux-fscrypt, Gabriel Krisman Bertazi,
	Daniel Rosenberg

From: Eric Biggers <ebiggers@google.com>

Test renaming a casefolded directory located in the top-level directory,
while the cache is cold.  When $MOUNT_OPTIONS contains
test_dummy_encryption, this detects an f2fs bug.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 tests/generic/556 | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tests/generic/556 b/tests/generic/556
index 7ef2f6f4..8abb65e8 100755
--- a/tests/generic/556
+++ b/tests/generic/556
@@ -348,6 +348,21 @@ test_file_rename()
 		echo "Name shouldn't change."
 }
 
+test_toplevel_dir_rename()
+{
+	local dir=${SCRATCH_MNT}/dir_rename
+
+	# With the cache cold, rename a casefolded directory located in the
+	# top-level directory.  If $MOUNT_OPTIONS contains
+	# test_dummy_encryption, this detects the bug that was fixed by
+	# 'f2fs: don't use casefolded comparison for "." and ".."'.
+	mkdir ${dir}
+	_casefold_set_attr ${dir}
+	sync
+	echo 2 > /proc/sys/vm/drop_caches
+	mv ${dir} ${dir}.new
+}
+
 # Test openfd with casefold.
 # 1. Delete a file after gettings its fd.
 # 2. Then create new dir with same name
@@ -486,6 +501,7 @@ test_dir_name_preserve
 test_name_reuse
 test_create_with_same_name
 test_file_rename
+test_toplevel_dir_rename
 test_casefold_openfd
 test_casefold_openfd2
 test_hard_link_lookups

base-commit: bb04d577435d04ce3aa160f0563d1d35d4860d54
-- 
2.36.1


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

* [f2fs-dev] [xfstests PATCH] generic/556: add test case for top-level dir rename
@ 2022-05-14 18:01 ` Eric Biggers
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Biggers @ 2022-05-14 18:01 UTC (permalink / raw)
  To: fstests
  Cc: linux-fscrypt, Gabriel Krisman Bertazi, Daniel Rosenberg,
	linux-f2fs-devel

From: Eric Biggers <ebiggers@google.com>

Test renaming a casefolded directory located in the top-level directory,
while the cache is cold.  When $MOUNT_OPTIONS contains
test_dummy_encryption, this detects an f2fs bug.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 tests/generic/556 | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tests/generic/556 b/tests/generic/556
index 7ef2f6f4..8abb65e8 100755
--- a/tests/generic/556
+++ b/tests/generic/556
@@ -348,6 +348,21 @@ test_file_rename()
 		echo "Name shouldn't change."
 }
 
+test_toplevel_dir_rename()
+{
+	local dir=${SCRATCH_MNT}/dir_rename
+
+	# With the cache cold, rename a casefolded directory located in the
+	# top-level directory.  If $MOUNT_OPTIONS contains
+	# test_dummy_encryption, this detects the bug that was fixed by
+	# 'f2fs: don't use casefolded comparison for "." and ".."'.
+	mkdir ${dir}
+	_casefold_set_attr ${dir}
+	sync
+	echo 2 > /proc/sys/vm/drop_caches
+	mv ${dir} ${dir}.new
+}
+
 # Test openfd with casefold.
 # 1. Delete a file after gettings its fd.
 # 2. Then create new dir with same name
@@ -486,6 +501,7 @@ test_dir_name_preserve
 test_name_reuse
 test_create_with_same_name
 test_file_rename
+test_toplevel_dir_rename
 test_casefold_openfd
 test_casefold_openfd2
 test_hard_link_lookups

base-commit: bb04d577435d04ce3aa160f0563d1d35d4860d54
-- 
2.36.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

* Re: [xfstests PATCH] generic/556: add test case for top-level dir rename
  2022-05-14 18:01 ` [f2fs-dev] " Eric Biggers
@ 2022-05-20 17:21   ` Gabriel Krisman Bertazi
  -1 siblings, 0 replies; 4+ messages in thread
From: Gabriel Krisman Bertazi @ 2022-05-20 17:21 UTC (permalink / raw)
  To: Eric Biggers; +Cc: fstests, linux-f2fs-devel, linux-fscrypt, Daniel Rosenberg

Eric Biggers <ebiggers@kernel.org> writes:

> From: Eric Biggers <ebiggers@google.com>
>
> Test renaming a casefolded directory located in the top-level directory,
> while the cache is cold.  When $MOUNT_OPTIONS contains
> test_dummy_encryption, this detects an f2fs bug.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
>  tests/generic/556 | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)

Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.com>

-- 
Gabriel Krisman Bertazi

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

* Re: [f2fs-dev] [xfstests PATCH] generic/556: add test case for top-level dir rename
@ 2022-05-20 17:21   ` Gabriel Krisman Bertazi
  0 siblings, 0 replies; 4+ messages in thread
From: Gabriel Krisman Bertazi @ 2022-05-20 17:21 UTC (permalink / raw)
  To: Eric Biggers; +Cc: linux-fscrypt, Daniel Rosenberg, fstests, linux-f2fs-devel

Eric Biggers <ebiggers@kernel.org> writes:

> From: Eric Biggers <ebiggers@google.com>
>
> Test renaming a casefolded directory located in the top-level directory,
> while the cache is cold.  When $MOUNT_OPTIONS contains
> test_dummy_encryption, this detects an f2fs bug.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
>  tests/generic/556 | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)

Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.com>

-- 
Gabriel Krisman Bertazi


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-14 18:01 [xfstests PATCH] generic/556: add test case for top-level dir rename Eric Biggers
2022-05-14 18:01 ` [f2fs-dev] " Eric Biggers
2022-05-20 17:21 ` Gabriel Krisman Bertazi
2022-05-20 17:21   ` [f2fs-dev] " Gabriel Krisman Bertazi

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.