Blame SOURCES/lvm2-2_03_06-tests-open-file-limit.patch

26e710
 test/shell/open-file-limit.sh | 46 +++++++++++++++++++++++++++++++++++++++++++
26e710
 1 file changed, 46 insertions(+)
26e710
 create mode 100644 test/shell/open-file-limit.sh
26e710
26e710
diff --git a/test/shell/open-file-limit.sh b/test/shell/open-file-limit.sh
26e710
new file mode 100644
26e710
index 0000000..87b0f7e
26e710
--- /dev/null
26e710
+++ b/test/shell/open-file-limit.sh
26e710
@@ -0,0 +1,46 @@
26e710
+#!/bin/bash
26e710
+# Copyright (C) 2014 Red Hat, Inc. All rights reserved.
26e710
+#
26e710
+# This copyrighted material is made available to anyone wishing to use,
26e710
+# modify, copy, or redistribute it subject to the terms and conditions
26e710
+# of the GNU General Public License v.2.
26e710
+#
26e710
+# You should have received a copy of the GNU General Public License
26e710
+# along with this program; if not, write to the Free Software Foundation,
26e710
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26e710
+
26e710
+# Test scan_lvs config setting
26e710
+
26e710
+SKIP_WITH_LVMPOLLD=1
26e710
+SKIP_WITH_LVMLOCKD=1
26e710
+
26e710
+. lib/inittest
26e710
+
26e710
+aux lvmconf 'devices/pv_min_size = 1024'
26e710
+
26e710
+aux prepare_devs 200 1
26e710
+
26e710
+for i in $(seq 1 200); do
26e710
+	pvcreate "$DM_DEV_DIR/mapper/${PREFIX}pv$i"
26e710
+done
26e710
+
26e710
+pvs > out
26e710
+test "$(grep pv out | wc -l)" -eq 200
26e710
+
26e710
+# Set the soft limit to 100 fd's when 200 PVs need to be open.
26e710
+# This requires lvm to increase its soft limit in order to
26e710
+# process all the PVs.
26e710
+# Test this with and without udev providing device lists.
26e710
+
26e710
+aux lvmconf 'devices/obtain_device_list_from_udev = 0'
26e710
+
26e710
+prlimit --nofile=100: pvs > out
26e710
+
26e710
+test "$(grep pv out | wc -l)" -eq 200
26e710
+
26e710
+aux lvmconf 'devices/obtain_device_list_from_udev = 1'
26e710
+
26e710
+prlimit --nofile=100: pvs > out
26e710
+
26e710
+test "$(grep pv out | wc -l)" -eq 200
26e710
+