Tests sanityn/106a failed due to wrongly using 'btime' to filter
the debugfs output for file creation time, which should be
'crtime'.
This patch also replaces '-c %q' with '-c %p' in sanityn/106c to
get the statx 'stx_attributes_mask': Mask to show what's supported
in 'stx_attributes'.
Test-Parameters: trivial clientdistro=el8
Test-Parameters: trivial clientdistro=ubuntu1804
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Ia8273e02d4ebe7f1e9e5d6973e691c82e0524fb2
Reviewed-on: https://review.whamcloud.com/38880
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
init_logging
ALWAYS_EXCEPT="$SANITYN_EXCEPT "
init_logging
ALWAYS_EXCEPT="$SANITYN_EXCEPT "
-# bug number for skipped test: LU-7105 LU-13628
-ALWAYS_EXCEPT+=" 28 106"
+# bug number for skipped test: LU-7105
+ALWAYS_EXCEPT+=" 28 "
# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
# skip tests for PPC until they are fixed
# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
# skip tests for PPC until they are fixed
dd if=/dev/zero of=$DIR/$tfile bs=1k count=1 conv=notrunc
btime=$($STATX -c %W $DIR/$tfile)
output=$(do_facet mds1 "$DEBUGFS -c -R 'stat ROOT/$tfile' $mdtdev")
dd if=/dev/zero of=$DIR/$tfile bs=1k count=1 conv=notrunc
btime=$($STATX -c %W $DIR/$tfile)
output=$(do_facet mds1 "$DEBUGFS -c -R 'stat ROOT/$tfile' $mdtdev")
- ((mdt_btime=$(awk -F ':' /btime/'{ print $2 }' <<< "$output")))
+ echo $output
+ ((mdt_btime=$(awk -F ':' /crtime/'{ print $2 }' <<< "$output")))
[[ $btime == $mdt_btime ]] ||
error "$DIR/$tfile btime ($btime:$mdt_btime) diff"
[[ $btime == $mdt_btime ]] ||
error "$DIR/$tfile btime ($btime:$mdt_btime) diff"
touch $DIR/$tfile
# Mask supported in stx_attributes by Lustre is
# STATX_ATTR_IMMUTABLE(0x10) | STATX_ATTR_APPEND(0x20) : (0x30).
touch $DIR/$tfile
# Mask supported in stx_attributes by Lustre is
# STATX_ATTR_IMMUTABLE(0x10) | STATX_ATTR_APPEND(0x20) : (0x30).
- mask=$($STATX -c %q $DIR/$tfile)
+ mask=$($STATX -c %p $DIR/$tfile)
[[ $mask == "30" ]] ||
error "supported stx_attributes: got '$mask', expected '30'"
chattr +i $DIR/$tfile || error "chattr +i $DIR/$tfile failed"
[[ $mask == "30" ]] ||
error "supported stx_attributes: got '$mask', expected '30'"
chattr +i $DIR/$tfile || error "chattr +i $DIR/$tfile failed"
"\t%%n file name\n"
"\t%%N quoted file name with dereference if symbolic link\n"
"\t%%o optimal I/O transfer size hint\n"
"\t%%n file name\n"
"\t%%N quoted file name with dereference if symbolic link\n"
"\t%%o optimal I/O transfer size hint\n"
- "\t%%q Mask to show what's supported in stx_attributes\n"
+ "\t%%p Mask to show what's supported in stx_attributes\n"
"\t%%r Flags conveying information about the file: "
"stx_attributes\n"
"\t%%s total size, in bytes\n"
"\t%%r Flags conveying information about the file: "
"stx_attributes\n"
"\t%%s total size, in bytes\n"