Whamcloud - gitweb
LU-10136 test: Lockahead test fixes 84/29684/5
authorPatrick Farrell <paf@cray.com>
Mon, 13 Nov 2017 16:02:21 +0000 (11:02 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 22 Nov 2017 03:55:54 +0000 (03:55 +0000)
Two fixes:
1. Add version check for interop testing
2. Reduce count of locks requested in test15.  At 5000
locks, we would sometimes get some locks reclaimed during
the test due to memory pressure.  Reduce count to 500.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I693f8543b3579819aa64101ef30453627637ead6
Reviewed-on: https://review.whamcloud.com/29684
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/tests/.gitignore
lustre/tests/lockahead_test.c
lustre/tests/sanity.sh

index eb86343..35cd3f1 100644 (file)
@@ -35,6 +35,7 @@
 /ll_sparseness_write
 /llverdev
 /llverfs
+/lockahead_test
 /logs
 /lovstripe
 /mcreate
index 11cb843..7e05e31 100644 (file)
@@ -427,7 +427,7 @@ static int test15(void)
 
        advice = malloc(sizeof(struct llapi_lu_ladvise)*count);
 
-       for (i = 0; i < 5000; i++) {
+       for (i = 0; i < 500; i++) {
                /* The 'UL' designators are required to avoid undefined
                 * behavior which GCC turns in to an infinite loop */
                __u64 start = i * 1024UL * 1024UL * 10UL;
@@ -477,7 +477,7 @@ static int test15(void)
 
        /* We have to map our expected return in to the range of valid return
         * codes, 0-255. */
-       expected_lock_count = expected_lock_count/1000;
+       expected_lock_count = expected_lock_count/100;
 
        return expected_lock_count;
 }
index 4859d9e..eb602f6 100755 (executable)
@@ -14967,6 +14967,10 @@ test_255c() {
        local difference
        local i
        local rc
+
+       [ $(lustre_version_code ost1) -lt $(version_code 2.10.50) ] &&
+               skip "lustre < 2.10.53 does not support lockahead" && return
+
        test_mkdir -p $DIR/$tdir
        $SETSTRIPE -i 0 $DIR/$tdir
 
@@ -15020,9 +15024,9 @@ test_255c() {
                       ldlm.namespaces.$FSNAME-OST0000*osc-f*.lock_unused_count)
                difference="$((new_count - count))"
 
-               # Test 15 output is divided by 1000 to map down to valid return
+               # Test 15 output is divided by 100 to map down to valid return
                if [ $i -eq 15 ]; then
-                       rc="$((rc * 1000))"
+                       rc="$((rc * 100))"
                fi
 
                if [ $difference -ne $rc ]; then