From: Patrick Farrell Date: Mon, 13 Nov 2017 16:02:21 +0000 (-0500) Subject: LU-10136 test: Lockahead test fixes X-Git-Tag: 2.10.56~43 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=ef3a461acebe0e6e134c13734c0d40a5551fa917;p=fs%2Flustre-release.git LU-10136 test: Lockahead test fixes 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 Change-Id: I693f8543b3579819aa64101ef30453627637ead6 Reviewed-on: https://review.whamcloud.com/29684 Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Tested-by: Jenkins Reviewed-by: James Nunez Tested-by: Maloo --- diff --git a/lustre/tests/.gitignore b/lustre/tests/.gitignore index eb86343..35cd3f1 100644 --- a/lustre/tests/.gitignore +++ b/lustre/tests/.gitignore @@ -35,6 +35,7 @@ /ll_sparseness_write /llverdev /llverfs +/lockahead_test /logs /lovstripe /mcreate diff --git a/lustre/tests/lockahead_test.c b/lustre/tests/lockahead_test.c index 11cb843..7e05e31 100644 --- a/lustre/tests/lockahead_test.c +++ b/lustre/tests/lockahead_test.c @@ -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; } diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 4859d9e..eb602f6 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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