generic/423: test stx_size of symlink
authorEric Biggers <ebiggers@google.com>
Sun, 18 Jul 2021 15:17:46 +0000 (10:17 -0500)
committerEryu Guan <guaneryu@gmail.com>
Sun, 25 Jul 2021 14:24:44 +0000 (22:24 +0800)
commit6ae3a3a5ac74100e2eaa13be67050780ea0004fb
tree398276cfdf6a695b45b9c9705247386001a6c176
parente0049e62e37bc302e80b8a2bb4b6ed2e631281e2
generic/423: test stx_size of symlink

Update generic/423 to test that the reported size of a symlink is equal
to the length of the symlink target, as required by POSIX and as
documented in various man pages.

When the test_dummy_encryption mount option is enabled, this serves as a
regression test for the bug that will be fixed by the patch series
"fscrypt: report correct st_size for encrypted symlinks"
(https://lkml.kernel.org/r/20210702065350.209646-1-ebiggers@kernel.org).
However, this test is applicable to all filesystems and mount options.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/423