}
run_test 12q "file attributes are refreshed after restore"
+test_12r() {
+ # test needs a running copytool
+ copytool setup
+
+ mkdir -p $DIR/$tdir
+ local f=$DIR/$tdir/$tfile
+ local fid=$(copy_file /etc/hosts $f)
+
+ $LFS hsm_archive $f || error "archive of $f failed"
+ wait_request_state $fid ARCHIVE SUCCEED
+ $LFS hsm_release $f || error "release of $f failed"
+
+ offset=$(lseek_test -d 7 $f)
+
+ # we check we had a restore done
+ wait_request_state $fid RESTORE SUCCEED
+ [[ $offset == 7 ]] || error "offset $offset != 7"
+}
+run_test 12r "lseek restores released file"
+
test_13() {
local -i i j k=0
for i in {1..10}; do
md5sum $f2 &
sleep 2
+ do_facet $SINGLEMDS "$LCTL get_param $HSM_PARAM.actions"
# after umount hsm_actions->O/x/x log shouldn't have
# double RESTORE records like below
#[0x200000401:0x1:0x0]...0x58d03a0d/0x58d03a0c action=RESTORE...WAITING
sleep 30 &&
do_facet $SINGLEMDS "$LCTL get_param $HSM_PARAM.actions"&
fail $SINGLEMDS
+ do_facet $SINGLEMDS $LCTL set_param fail_loc=0
+
+ do_facet $SINGLEMDS "$LCTL get_param $HSM_PARAM.actions"
copytool_continue
- wait_request_state $fid RESTORE SUCCEED
+ wait_all_done 100 $fid
}
run_test 407 "Check for double RESTORE records in llog"