large_xattr_enabled &&
orig="$(generate_string $(max_xattr_size))" || orig="bar"
+ # Original extended attribute can be long. Print a small version of
+ # attribute if an error occurs
+ local sm_msg=$(printf "%.9s" $orig)
- mount_client $MOUNT2
+ mount_client $MOUNT2 || error "mount_client on $MOUNT2 failed"
mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
touch $DIR/$tdir/$tfile || error "touch $DIR/$tdir/$tfile failed"
replay_barrier $SINGLEMDS
fail $SINGLEMDS
new=$(get_xattr_value trusted.foo $MOUNT2/$tdir/$tfile)
[[ "$new" = "$orig" ]] ||
- error "xattr set ($orig) is not what was returned ($new)"
+ error "xattr set ($sm_msg...) differs from xattr get ($new)"
rm -f $DIR/$tdir/$tfile
rmdir $DIR/$tdir
cleanup_58
# PING_INTERVAL max(obd_timeout / 4, 1U)
sleep $((TIMEOUT / 4))
- mount_client $MOUNT2
+ # Original extended attribute can be long. Print a small version of
+ # attribute if an error occurs
+ local sm_msg=$(printf "%.9s" $orig)
+ local sm_msg1=$(printf "%.9s" $orig1)
+
+ mount_client $MOUNT2 || error "mount_client on $MOUNT2 failed"
mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
touch $DIR/$tdir/$tfile || error "touch $DIR/$tdir/$tfile failed"
drop_request "setfattr -n trusted.foo -v $orig $DIR/$tdir/$tfile" ||
error "drop_request for setfattr failed"
new=$(get_xattr_value trusted.foo $MOUNT2/$tdir/$tfile)
[[ "$new" = "$orig" ]] ||
- error "xattr set ($orig) is not what was returned ($new)"
+ error "xattr set ($sm_msg...) differs from xattr get ($new)"
drop_reint_reply "setfattr -n trusted.foo1 \
-v $orig1 $DIR/$tdir/$tfile" ||
- error "drop_request for setfattr failed"
+ error "drop_reint_reply for setfattr failed"
new=$(get_xattr_value trusted.foo1 $MOUNT2/$tdir/$tfile)
[[ "$new" = "$orig1" ]] ||
- error "second xattr set ($orig1) not what was returned ($new)"
+ error "second xattr set ($sm_msg1...) differs xattr get ($new)"
rm -f $DIR/$tdir/$tfile
rmdir $DIR/$tdir
cleanup_58