3cba7f3163
- Fix test failures about read ahead issue, see bsc#1043040 + bug-1043040_test-fix-read-ahead-issues-in-test-scripts.patch - Reorder the patches to put them into the right groups - Don't package dynamic directories in /run - Fix test failures about read ahead issue, see bsc#1043040 + bug-1043040_test-fix-read-ahead-issues-in-test-scripts.patch - Reorder the patches to put them into the right groups - Don't package dynamic directories in /run - Fix test failures about read ahead issue, see bsc#1043040 + bug-1043040_test-fix-read-ahead-issues-in-test-scripts.patch - Reorder the patches to put them into the right groups OBS-URL: https://build.opensuse.org/request/show/504374 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=189
61 lines
2.2 KiB
Diff
61 lines
2.2 KiB
Diff
From e1db89755455dfae9596c648c68a3e731d4419c7 Mon Sep 17 00:00:00 2001
|
|
From: Eric Ren <zren@suse.com>
|
|
Date: Sat, 17 Jun 2017 21:32:40 +0800
|
|
Subject: [PATCH] test: fix read ahead issues in test scripts
|
|
|
|
We have a SUSE specific kernel patch, which
|
|
tunes the kernel "VM_MAX_READAHEAD" from
|
|
128k to 512k. Thus, some testing scripts are
|
|
affected by this change. See bsc#1043040 for
|
|
more infos.
|
|
|
|
Signed-off-by: Eric Ren <zren@suse.com>
|
|
---
|
|
test/shell/lvcreate-usage.sh | 4 ++--
|
|
test/shell/read-ahead.sh | 8 +++++++-
|
|
2 files changed, 9 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/test/shell/lvcreate-usage.sh b/test/shell/lvcreate-usage.sh
|
|
index f7b4704..9001b64 100644
|
|
--- a/test/shell/lvcreate-usage.sh
|
|
+++ b/test/shell/lvcreate-usage.sh
|
|
@@ -159,10 +159,10 @@ check lv_field $vg/$lv3 lv_read_ahead "8.00k"
|
|
check lv_field $vg/$lv3 lv_kernel_read_ahead "8.00k"
|
|
lvcreate -L 8 -n $lv4 --readahead auto $vg
|
|
check lv_field $vg/$lv4 lv_read_ahead "auto"
|
|
-check lv_field $vg/$lv4 lv_kernel_read_ahead "128.00k"
|
|
+check lv_field $vg/$lv4 lv_kernel_read_ahead "512.00k"
|
|
lvcreate -L 8 -n $lv5 -i2 --stripesize 16k --readahead auto $vg
|
|
check lv_field $vg/$lv5 lv_read_ahead "auto"
|
|
-check lv_field $vg/$lv5 lv_kernel_read_ahead "128.00k"
|
|
+check lv_field $vg/$lv5 lv_kernel_read_ahead "512.00k"
|
|
lvcreate -L 8 -n $lv6 -i2 --stripesize 128k --readahead auto $vg
|
|
check lv_field $vg/$lv6 lv_read_ahead "auto"
|
|
check lv_field $vg/$lv6 lv_kernel_read_ahead "512.00k"
|
|
diff --git a/test/shell/read-ahead.sh b/test/shell/read-ahead.sh
|
|
index 6e4bd35..3f9a9fd 100644
|
|
--- a/test/shell/read-ahead.sh
|
|
+++ b/test/shell/read-ahead.sh
|
|
@@ -31,11 +31,17 @@ lvchange -r 640 $vg/$lv
|
|
check lv_field $vg/$lv lv_read_ahead 640 --units s --nosuffix
|
|
lvremove -ff $vg
|
|
|
|
+#See bsc#1043040
|
|
+default_ra=$(blockdev --getra "$dev1")
|
|
#COMM "read ahead is properly inherited from underlying PV"
|
|
blockdev --setra 768 "$dev1"
|
|
vgscan
|
|
lvcreate -n $lv -L4m $vg "$dev1"
|
|
-test $(blockdev --getra "$DM_DEV_DIR/$vg/$lv") -eq 768
|
|
+if [ "$default_ra" -lt 768 ]; then
|
|
+ test $(blockdev --getra "$DM_DEV_DIR/$vg/$lv") -eq 768
|
|
+else
|
|
+ test $(blockdev --getra "$DM_DEV_DIR/$vg/$lv") -eq "$default_ra"
|
|
+fi
|
|
lvremove -ff $vg
|
|
|
|
# Check default, active/inactive values for read_ahead / kernel_read_ahead
|
|
--
|
|
2.10.2
|
|
|