Conversation
The symlink/03.t test assumes that a symbolic link can hold a target path equal to PATH_MAX (4096 bytes). However, XFS has an internal limit for symlink targets (MAXPATHLEN or 1024 bytes), which is smaller than the VFS PATH_MAX. When running this test on XFS, the creation of a 4096-byte symlink (Test 1) fails with ENAMETOOLONG. Consequently, the cleanup step (Test 2) fails with ENOENT because the symlink was never created. This commit uses the 'todo' mechanism to mark these specific failures as expected behavior when running on XFS, ensuring the test suite passes on XFS while strictly enforcing limits on filesystems that support larger targets (e.g., ext4, Btrfs). Signed-off-by: Disha Goel <disgoel@linux.ibm.com>
|
@ngie-eign can you please review |
@ngie-eign I investigated using getconf/pathconf with _PC_SYMLINK_MAX as suggested. Unfortunately, this doesn't work for XFS because the filesystem doesn't expose its 1024-byte symlink limit through the pathconf interface - it returns 'unlimited' even though the limit exists. The XFS symlink limit is an internal filesystem implementation detail (MAXPATHLEN in XFS code) that's not exposed through POSIX APIs. |
That's an XFS bug that deserves fixing then. As much as it would be nice to make the test suite pass on every single OS/filesystem combination, this is one of those instances where the bug in the filesystem needs to be addressed instead of adding a hack/workaround in the test suite.
|
Understood - I'll try to report/fix it upstream. |
|
Closing the PR based on previous discussion. |
The symlink/03.t test assumes that a symbolic link can hold a target path equal to PATH_MAX (4096 bytes). However, XFS has an internal limit for symlink targets (MAXPATHLEN or 1024 bytes), which is smaller than the VFS PATH_MAX.
When running this test on XFS, the creation of a 4096-byte symlink (Test 1) fails with ENAMETOOLONG. Consequently, the cleanup step (Test 2) fails with ENOENT because the symlink was never created.
This commit uses the 'todo' mechanism to mark these specific failures as expected behavior when running on XFS, ensuring the test suite passes on XFS while strictly enforcing limits on filesystems that support larger targets (e.g., ext4, Btrfs).
Result on xfs
Result on ext4