Whamcloud - gitweb
LU-9679 general: add missing spaces to folded strings.
[fs/lustre-release.git] / lustre / obdclass / llog_test.c
index 6b2628f..ac66301 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/init.h>
 #include <linux/kthread.h>
 #include <linux/delay.h>
+#include <linux/random.h>
 
 #include <obd_class.h>
 #include <lustre_fid.h>
@@ -1058,8 +1059,7 @@ static int llog_test_7_sub(const struct lu_env *env, struct llog_ctxt *ctxt)
                GOTO(out_close, rc);
        }
        if (process_count != plain_counter) {
-               CERROR("7_sub: Reverse/direct processing found different"
-                      "number of records: %d/%d\n",
+               CERROR("7_sub: Reverse/direct processing found different number of records: %d/%d\n",
                       plain_counter, process_count);
                GOTO(out_close, rc = -EINVAL);
        }
@@ -1355,6 +1355,7 @@ static int llog_test_9_sub(const struct lu_env *env, struct llog_ctxt *ctxt)
                CERROR("9_sub: write recs failed at #1: %d\n", rc);
                GOTO(out_close, rc);
        }
+       /* The below message is checked in sanity.sh test_60a (run-llog.sh) */
        CWARN("9_sub: record type %x in log "DFID_NOBRACE"\n",
              llog_records.lrh.lrh_type, PFID(&fid));
 out_close:
@@ -1478,6 +1479,7 @@ static int cat_check_old_cb(const struct lu_env *env, struct llog_handle *llh,
                cfs_fail_loc = OBD_FAIL_ONCE | OBD_FAIL_LLOG_PROCESS_TIMEOUT;
                cfs_fail_val = (unsigned int) (llh->lgh_id.lgl_oi.oi.oi_id &
                                               0xFFFFFFFF);
+               msleep(1 * MSEC_PER_SEC);
        }
        *prev_fid = fid;
 
@@ -2040,6 +2042,7 @@ static int llog_test_10(const struct lu_env *env, struct obd_device *obd)
 
        kthread_run(llog_test_process_thread, &lpi, "llog_test_process_thread");
 
+       msleep(1 * MSEC_PER_SEC / 2);
        enospc = 0;
        eok = 0;
        CWARN("10h: write %d more log records\n", llog_test_recnum);
@@ -2246,7 +2249,7 @@ static int llog_test_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
        ctxt->loc_dir = o;
        llog_ctxt_put(ctxt);
 
-       llog_test_rand = cfs_rand();
+       llog_test_rand = prandom_u32();
 
        rc = llog_run_tests(&env, tgt);
        if (rc)
@@ -2259,7 +2262,7 @@ cleanup_env:
        RETURN(rc);
 }
 
-static struct obd_ops llog_obd_ops = {
+static const struct obd_ops llog_obd_ops = {
        .o_owner       = THIS_MODULE,
        .o_setup       = llog_test_setup,
        .o_cleanup     = llog_test_cleanup,