* [PATCHSET 6/6] fstests: minor fixes for 6.10-rc1
@ 2024-06-18 0:46 Darrick J. Wong
2024-06-18 0:53 ` [PATCH 1/2] xfs/348: partially revert dbcc549317 ("xfs/348: golden output is not correct") Darrick J. Wong
2024-06-18 0:53 ` [PATCH 2/2] generic: test creating and removing symlink xattrs Darrick J. Wong
0 siblings, 2 replies; 5+ messages in thread
From: Darrick J. Wong @ 2024-06-18 0:46 UTC (permalink / raw)
To: djwong, zlang; +Cc: Christoph Hellwig, fstests, guan, hch, linux-xfs
Hi all,
Here are some fixes for the stuff that just got merged for 6.10-rc1.
If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.
This has been running on the djcloud for months with no problems. Enjoy!
Comments and questions are, as always, welcome.
--D
kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=xfs-6.10-fixes
xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=xfs-6.10-fixes
fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=xfs-6.10-fixes
---
Commits in this patchset:
* xfs/348: partially revert dbcc549317 ("xfs/348: golden output is not correct")
* generic: test creating and removing symlink xattrs
---
tests/generic/1836 | 58 ++++++++++++++++++++++++++++++++++++++++++++++++
tests/generic/1836.out | 2 ++
tests/xfs/348.out | 2 +-
3 files changed, 61 insertions(+), 1 deletion(-)
create mode 100755 tests/generic/1836
create mode 100644 tests/generic/1836.out
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/2] xfs/348: partially revert dbcc549317 ("xfs/348: golden output is not correct")
2024-06-18 0:46 [PATCHSET 6/6] fstests: minor fixes for 6.10-rc1 Darrick J. Wong
@ 2024-06-18 0:53 ` Darrick J. Wong
2024-06-18 6:26 ` Christoph Hellwig
2024-06-18 0:53 ` [PATCH 2/2] generic: test creating and removing symlink xattrs Darrick J. Wong
1 sibling, 1 reply; 5+ messages in thread
From: Darrick J. Wong @ 2024-06-18 0:53 UTC (permalink / raw)
To: djwong, zlang; +Cc: fstests, guan, hch, linux-xfs
From: Dave Chinner <dchinner@redhat.com>
In kernel commit 1eb70f54c445f ("xfs: validate inode fork size against
fork format"), we incorrectly started flagging as corrupt symlinks with
short targets that would fit in the inode core but are remote. The
kernel has historically written out symlinks this way and read them back
in, so we're fixing that.
The 1eb70 change came with change dbcc to fstests to adjust the golden
output; since we're adjusting the kernel back to old behavior, we need
to adjust the test too.
Fixes: dbcc549317 ("xfs/348: golden output is not correct")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
tests/xfs/348.out | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/xfs/348.out b/tests/xfs/348.out
index 9130f42af7..591b1a77a6 100644
--- a/tests/xfs/348.out
+++ b/tests/xfs/348.out
@@ -240,7 +240,7 @@ would have junked entry "DIR" in directory PARENT_INO
would have junked entry "EMPTY" in directory PARENT_INO
would have junked entry "FIFO" in directory PARENT_INO
stat: cannot statx 'SCRATCH_MNT/test/DIR': Structure needs cleaning
-stat: cannot statx 'SCRATCH_MNT/test/DATA': Structure needs cleaning
+stat: 'SCRATCH_MNT/test/DATA' is a symbolic link
stat: cannot statx 'SCRATCH_MNT/test/EMPTY': Structure needs cleaning
stat: 'SCRATCH_MNT/test/SYMLINK' is a symbolic link
stat: cannot statx 'SCRATCH_MNT/test/CHRDEV': Structure needs cleaning
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] generic: test creating and removing symlink xattrs
2024-06-18 0:46 [PATCHSET 6/6] fstests: minor fixes for 6.10-rc1 Darrick J. Wong
2024-06-18 0:53 ` [PATCH 1/2] xfs/348: partially revert dbcc549317 ("xfs/348: golden output is not correct") Darrick J. Wong
@ 2024-06-18 0:53 ` Darrick J. Wong
1 sibling, 0 replies; 5+ messages in thread
From: Darrick J. Wong @ 2024-06-18 0:53 UTC (permalink / raw)
To: djwong, zlang; +Cc: Christoph Hellwig, fstests, guan, hch, linux-xfs
From: Darrick J. Wong <djwong@kernel.org>
This began as a regression test for the issues identified in "xfs: allow
symlinks with short remote targets". To summarize, the kernel XFS code
does not convert a remote symlink back to a shortform symlink after
deleting the attr fork. Recent attempts to tighten validation have
flagged this incorrectly, so we need a regression test to focus on this
dusty corner of the codebase.
However, there's nothing in here that's xfs-specific so it's a generic
test.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
tests/generic/1836 | 58 ++++++++++++++++++++++++++++++++++++++++++++++++
tests/generic/1836.out | 2 ++
2 files changed, 60 insertions(+)
create mode 100755 tests/generic/1836
create mode 100644 tests/generic/1836.out
diff --git a/tests/generic/1836 b/tests/generic/1836
new file mode 100755
index 0000000000..1778e207ab
--- /dev/null
+++ b/tests/generic/1836
@@ -0,0 +1,58 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2024 Oracle. All Rights Reserved.
+#
+# FS QA Test 1836
+#
+# Test that we can add xattrs to a symbolic link, remove all the xattrs, and
+# that the symbolic link doesn't get corrupted. This is a regression test for
+# some incorrect checks in the xfs inode verifier.
+#
+. ./common/preamble
+_begin_fstest auto
+
+_supported_fs generic
+_require_scratch
+
+test $FSTYP = "xfs" && \
+ _fixed_by_git_commit kernel XXXXXXXXXXXXX \
+ "xfs: allow symlinks with short remote targets"
+
+_scratch_mkfs >> $seqres.full
+_scratch_mount >> $seqres.full
+
+SYMLINK_ADD="0123456789ABCDEF01234567890ABCDEF"
+
+# test from 32 to MAXPATHLEN sized symlink. This should make sure that
+# 256-1024 byte version 2 and 3 inodes are covered.
+SYMLINK=""
+for ((SIZE = 32; SIZE < 1024; SIZE += 32)); do
+ SYMLINK_FILE="$SCRATCH_MNT/symlink.$SIZE"
+ SYMLINK="${SYMLINK}${SYMLINK_ADD}"
+ ln -s $SYMLINK $SYMLINK_FILE > /dev/null 2>&1
+
+# add the extended attributes
+ attr -Rs 1234567890ab $SYMLINK_FILE < /dev/null > /dev/null 2>&1
+ attr -Rs 1234567890ac $SYMLINK_FILE < /dev/null > /dev/null 2>&1
+ attr -Rs 1234567890ad $SYMLINK_FILE < /dev/null > /dev/null 2>&1
+# remove the extended attributes
+ attr -Rr 1234567890ab $SYMLINK_FILE > /dev/null 2>&1
+ attr -Rr 1234567890ac $SYMLINK_FILE > /dev/null 2>&1
+ attr -Rr 1234567890ad $SYMLINK_FILE > /dev/null 2>&1
+done
+
+_scratch_cycle_mount
+
+# Now check the symlink target contents
+SYMLINK=""
+for ((SIZE = 32; SIZE < 1024; SIZE += 32)); do
+ SYMLINK_FILE="$SCRATCH_MNT/symlink.$SIZE"
+ SYMLINK="${SYMLINK}${SYMLINK_ADD}"
+
+ target="$(readlink $SYMLINK_FILE)"
+ test "$target" = "$SYMLINK" || echo "$SYMLINK_FILE: target is corrupt"
+done
+
+echo Silence is golden
+status=0
+exit
diff --git a/tests/generic/1836.out b/tests/generic/1836.out
new file mode 100644
index 0000000000..cf78922dea
--- /dev/null
+++ b/tests/generic/1836.out
@@ -0,0 +1,2 @@
+QA output created by 1836
+Silence is golden
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCHSET 6/6] fstests: minor fixes for 6.10-rc1
@ 2024-06-20 20:53 Darrick J. Wong
2024-06-20 21:00 ` [PATCH 1/2] xfs/348: partially revert dbcc549317 ("xfs/348: golden output is not correct") Darrick J. Wong
0 siblings, 1 reply; 5+ messages in thread
From: Darrick J. Wong @ 2024-06-20 20:53 UTC (permalink / raw)
To: djwong, zlang; +Cc: Christoph Hellwig, fstests, hch, linux-xfs
Hi all,
Here are some fixes for the stuff that just got merged for 6.10-rc1.
If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.
This has been running on the djcloud for months with no problems. Enjoy!
Comments and questions are, as always, welcome.
--D
kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=xfs-6.10-fixes
xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=xfs-6.10-fixes
fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=xfs-6.10-fixes
---
Commits in this patchset:
* xfs/348: partially revert dbcc549317 ("xfs/348: golden output is not correct")
* generic: test creating and removing symlink xattrs
---
tests/generic/1836 | 58 ++++++++++++++++++++++++++++++++++++++++++++++++
tests/generic/1836.out | 2 ++
tests/xfs/348.out | 2 +-
3 files changed, 61 insertions(+), 1 deletion(-)
create mode 100755 tests/generic/1836
create mode 100644 tests/generic/1836.out
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/2] xfs/348: partially revert dbcc549317 ("xfs/348: golden output is not correct")
2024-06-20 20:53 [PATCHSET 6/6] fstests: minor fixes for 6.10-rc1 Darrick J. Wong
@ 2024-06-20 21:00 ` Darrick J. Wong
0 siblings, 0 replies; 5+ messages in thread
From: Darrick J. Wong @ 2024-06-20 21:00 UTC (permalink / raw)
To: djwong, zlang; +Cc: Christoph Hellwig, fstests, hch, linux-xfs
From: Dave Chinner <dchinner@redhat.com>
In kernel commit 1eb70f54c445f ("xfs: validate inode fork size against
fork format"), we incorrectly started flagging as corrupt symlinks with
short targets that would fit in the inode core but are remote. The
kernel has historically written out symlinks this way and read them back
in, so we're fixing that.
The 1eb70 change came with change dbcc to fstests to adjust the golden
output; since we're adjusting the kernel back to old behavior, we need
to adjust the test too.
Fixes: dbcc549317 ("xfs/348: golden output is not correct")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
tests/xfs/348.out | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/xfs/348.out b/tests/xfs/348.out
index 9130f42af7..591b1a77a6 100644
--- a/tests/xfs/348.out
+++ b/tests/xfs/348.out
@@ -240,7 +240,7 @@ would have junked entry "DIR" in directory PARENT_INO
would have junked entry "EMPTY" in directory PARENT_INO
would have junked entry "FIFO" in directory PARENT_INO
stat: cannot statx 'SCRATCH_MNT/test/DIR': Structure needs cleaning
-stat: cannot statx 'SCRATCH_MNT/test/DATA': Structure needs cleaning
+stat: 'SCRATCH_MNT/test/DATA' is a symbolic link
stat: cannot statx 'SCRATCH_MNT/test/EMPTY': Structure needs cleaning
stat: 'SCRATCH_MNT/test/SYMLINK' is a symbolic link
stat: cannot statx 'SCRATCH_MNT/test/CHRDEV': Structure needs cleaning
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-06-20 21:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-18 0:46 [PATCHSET 6/6] fstests: minor fixes for 6.10-rc1 Darrick J. Wong
2024-06-18 0:53 ` [PATCH 1/2] xfs/348: partially revert dbcc549317 ("xfs/348: golden output is not correct") Darrick J. Wong
2024-06-18 6:26 ` Christoph Hellwig
2024-06-18 0:53 ` [PATCH 2/2] generic: test creating and removing symlink xattrs Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2024-06-20 20:53 [PATCHSET 6/6] fstests: minor fixes for 6.10-rc1 Darrick J. Wong
2024-06-20 21:00 ` [PATCH 1/2] xfs/348: partially revert dbcc549317 ("xfs/348: golden output is not correct") Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox