Whamcloud - gitweb
LU-4643 hsm: Improve sanity-hsm test_60 34/9534/2
authorMichael MacDonald <michael.macdonald@intel.com>
Thu, 6 Mar 2014 17:25:24 +0000 (12:25 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 11 Mar 2014 13:25:27 +0000 (13:25 +0000)
Small fix to further reduce the chance of false failures.
Also cleans up example HSM events in comments to address style
warnings.

Signed-off-by: Michael MacDonald <michael.macdonald@intel.com>
Change-Id: Icecb69ddc417cd33f80b38c9df623ac5fc0cc466
Reviewed-on: http://review.whamcloud.com/9534
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity-hsm.sh
lustre/utils/liblustreapi_hsm.c

index 5788fe7..97fc46e 100755 (executable)
@@ -2665,9 +2665,7 @@ test_60() {
        local elapsed=$((finish_at - start_at))
 
        # Ensure that the progress update occurred within the expected window.
        local elapsed=$((finish_at - start_at))
 
        # Ensure that the progress update occurred within the expected window.
-       if [ $elapsed -gt $progress_timeout ]; then
-               error "Expected progress update within $progress_timeout seconds"
-       elif [ $elapsed -lt $interval ]; then
+       if [ $elapsed -lt $interval ]; then
                error "Expected progress update after at least $interval seconds"
        fi
 
                error "Expected progress update after at least $interval seconds"
        fi
 
index 4831ad4..738c394 100644 (file)
@@ -309,16 +309,28 @@ out_free:
  * llapi_hsm_write_json_event:
  *
  * Copytool registration and deregistration:
  * llapi_hsm_write_json_event:
  *
  * Copytool registration and deregistration:
- * {"event_time": "2014-02-26 14:58:01 -0500", "event_type": "REGISTER", "archive": 0, "mount_point": "/mnt/lustre", "uuid": "80379a60-1f8a-743f-daf2-307cde793ec2"}
- * {"event_time": "2014-02-26 14:58:01 -0500", "event_type": "UNREGISTER", "archive": 0, "mount_point": "/mnt/lustre", "uuid": "80379a60-1f8a-743f-daf2-307cde793ec2"}
+ * {"event_time": "2014-02-26 14:58:01 -0500", "event_type": "REGISTER",
+ *  "archive": 0, "mount_point": "/mnt/lustre",
+ *  "uuid": "80379a60-1f8a-743f-daf2-307cde793ec2"}
+ * {"event_time": "2014-02-26 14:58:01 -0500", "event_type": "UNREGISTER",
+ *  "archive": 0, "mount_point": "/mnt/lustre",
+ *  "uuid": "80379a60-1f8a-743f-daf2-307cde793ec2"}
  *
  * An archive action, start to completion:
  *
  * An archive action, start to completion:
- * {"event_time": "2014-02-26 14:50:13 -0500", "event_type": "ARCHIVE_START", "total_bytes": 0, "lustre_path": "d71.sanity-hsm/f71.sanity-hsm", "source_fid": "0x2000013a1:0x2:0x0", "data_fid": "0x2000013a1:0x2:0x0"}
- * {"event_time": "2014-02-26 14:50:18 -0500", "event_type": "ARCHIVE_RUNNING", "current_bytes": 5242880, "total_bytes": 39000000, "lustre_path": "d71.sanity-hsm/f71.sanity-hsm", "source_fid": "0x2000013a1:0x2:0x0", "data_fid": "0x2000013a1:0x2:0x0"}
- * {"event_time": "2014-02-26 14:50:50 -0500", "event_type": "ARCHIVE_FINISH", "source_fid": "0x2000013a1:0x2:0x0", "data_fid": "0x2000013a1:0x2:0x0"}
+ * {"event_time": "2014-02-26 14:50:13 -0500", "event_type": "ARCHIVE_START",
+ *  "total_bytes": 0, "lustre_path": "d71.sanity-hsm/f71.sanity-hsm",
+ *  "source_fid": "0x2000013a1:0x2:0x0", "data_fid": "0x2000013a1:0x2:0x0"}
+ * {"event_time": "2014-02-26 14:50:18 -0500", "event_type": "ARCHIVE_RUNNING",
+ *  "current_bytes": 5242880, "total_bytes": 39000000,
+ *  "lustre_path": "d71.sanity-hsm/f71.sanity-hsm",
+ *  "source_fid": "0x2000013a1:0x2:0x0", "data_fid": "0x2000013a1:0x2:0x0"}
+ * {"event_time": "2014-02-26 14:50:50 -0500", "event_type": "ARCHIVE_FINISH",
+ *  "source_fid": "0x2000013a1:0x2:0x0", "data_fid": "0x2000013a1:0x2:0x0"}
  *
  * A log message:
  *
  * A log message:
- * {"event_time": "2014-02-26 14:50:13 -0500", "event_type": "LOGGED_MESSAGE", "level": "INFO", "message": "lhsmtool_posix[59401]: copytool fs=lustre archive#=2 item_count=1"}
+ * {"event_time": "2014-02-26 14:50:13 -0500", "event_type": "LOGGED_MESSAGE",
+ *  "level": "INFO",
+ *  "message": "lhsmtool_posix[42]: copytool fs=lustre archive#=2 item_count=1"}
  *
  * \param hcp                Opaque action handle returned by
  *                           llapi_hsm_action_start.
  *
  * \param hcp                Opaque action handle returned by
  *                           llapi_hsm_action_start.