summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-12-13 11:45:06 -0800
committerZorro Lang <zlang@kernel.org>2022-12-14 22:54:04 +0800
commita8a3cd342f9054184bb9faf07fb9b87df112b8b2 (patch)
tree16e57b4f326d3955dc8f5d5881a322a507d3a70c /check
parent8a1c35e615fdf34021452f84c8a67ca8b2673256 (diff)
xfs/018: fix attr value setting in this test
I was testing a patch to strengthen the buffer length validation of attr log intent items during log recovery, when I noticed that the lengths of the logged values were (mostly) a single byte larger than the alleged attribute value. Upon further investigation, I noticed this code in the test: echo "$attr_value" | attr -s <attrname> <testfile> The 'echo' command generally emits a newline before exiting, which means that the 16-byte "attr16" value was actually storing 17 bytes. This affects all the test cases except for the attr64k tests, since the attr(1) command helpfully/silently truncates the value buffer at 65536 bytes. Fix the test to store values of exactly the length we want, and add a couple more test cases to check that everything still works when the value length is not an exact multiple of sizeof(u32). Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'check')
0 files changed, 0 insertions, 0 deletions