2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2020 Red Hat, Inc. All Rights Reserved.
7 # Verify that metadata won't get corrupted when extended attribute
8 # name of size one is set.
10 # This test verifies the problem fixed in kernel with commit
11 # f4020438fab0 ("xfs: fix boundary test in xfs_attr_shortform_verify")
14 _begin_fstest auto quick attr
16 # Import common functions.
20 # real QA test starts here
26 _scratch_mkfs > $seqres.full 2>&1
29 localfile="${SCRATCH_MNT}/testfile"
32 "${SETFATTR_PROG}" -n user.a "${localfile}"
34 # Make sure that changes are written to disk
37 # If the target bug isn't fixed, getfattr fails
38 _getfattr --absolute-names -n user.a $localfile | grep 'user.a'