7f9b3f4598
- backport patches for lvm2 to avoid software abnormal work (bsc#1158861) + bug-1158861_01-config-remove-filter-typo.patch + bug-1158861_02-config-Fix-default-option-which-makes-no-sense.patch + bug-1158861_03-vgchange-don-t-fail-monitor-command-if-vg-is-exporte.patch + bug-1158861_04-fix-duplicate-pv-size-check.patch + bug-1158861_05-hints-fix-copy-of-filter.patch + bug-1158861_06-fix-segfault-for-invalid-characters-in-vg-name.patch + bug-1158861_07-vgck-let-updatemetadata-repair-mismatched-metadata.patch + bug-1158861_08-hints-fix-mem-leaking-buffers.patch + bug-1158861_09-pvcreate-pvremove-fix-reacquiring-global-lock-after.patch - add necessary patches for passing lvm2 testsuite (bsc#1158628) + bug-1158628_01-tests-replaces-grep-q-usage.patch + bug-1158628_02-tests-fix-ra-checking.patch + bug-1158628_03-tests-simplify-some-var-settings.patch + bug-1158628-04-pvmove-correcting-read_ahead-setting.patch + bug-1158628_05-activation-add-synchronization-point.patch + bug-1158628_06-pvmove-add-missing-synchronization.patch + bug-1158628_07-activation-extend-handling-of-pending_delete.patch + bug-1158628_08-lv_manip-add-synchronizations.patch + bug-1158628_09-lvconvert-improve-validation-thin-and-cache-pool-con.patch + bug-1158628_10-thin-activate-layer-pool-aas-read-only-LV.patch + bug-1158628_11-tests-mdadm-stop-in-test-cleanup.patch + bug-1158628_12-test-increase-size-of-raid10-LV-allowing-tests-to-su.patch + bug-1158628_13-lvconvert-fix-return-value-when-zeroing-fails.patch + bug-1158628_14-tests-add-extra-settle.patch + bug-1158628_15-test-Fix-handling-leftovers-from-previous-tests.patch OBS-URL: https://build.opensuse.org/request/show/755483 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=260
88 lines
3.1 KiB
Diff
88 lines
3.1 KiB
Diff
From 3596210e02452f3785f0639115f6744f8f7e2dfc Mon Sep 17 00:00:00 2001
|
|
From: Zdenek Kabelac <zkabelac@redhat.com>
|
|
Date: Mon, 17 Jun 2019 22:47:35 +0200
|
|
Subject: [PATCH] tests: replaces grep -q usage
|
|
|
|
Since we use 'set -euE -o pipefail' for shell execution,
|
|
any failure of any command in the 'piped' shell can result
|
|
in failure of whole executed chain - resulting in typically
|
|
unsually test skip, that was left unnoticed.
|
|
|
|
Since checked command have usually short output, the simplest
|
|
fix seems to be to let grep parse whole output instead
|
|
of quiting after first match.
|
|
---
|
|
test/lib/aux.sh | 14 +++++++-------
|
|
1 file changed, 7 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
|
|
index e3f624cda8..81e8f91c98 100644
|
|
--- a/test/lib/aux.sh
|
|
+++ b/test/lib/aux.sh
|
|
@@ -26,7 +26,7 @@ expect_failure() {
|
|
check_daemon_in_builddir() {
|
|
# skip if we don't have our own deamon...
|
|
if test -z "${installed_testsuite+varset}"; then
|
|
- (which "$1" 2>/dev/null | grep -q "$abs_builddir") || skip "$1 is not in executed path."
|
|
+ (which "$1" 2>/dev/null | grep "$abs_builddir" >/dev/null ) || skip "$1 is not in executed path."
|
|
fi
|
|
rm -f debug.log strace.log
|
|
}
|
|
@@ -167,7 +167,7 @@ prepare_clvmd() {
|
|
|
|
test -e "$DM_DEV_DIR/control" || dmsetup table >/dev/null # create control node
|
|
# skip if singlenode is not compiled in
|
|
- (clvmd --help 2>&1 | grep "Available cluster managers" | grep -q "singlenode") || \
|
|
+ (clvmd --help 2>&1 | grep "Available cluster managers" | grep "singlenode" >/dev/null) || \
|
|
skip "Compiled clvmd does not support singlenode for testing."
|
|
|
|
# lvmconf "activation/monitoring = 1"
|
|
@@ -531,7 +531,7 @@ teardown() {
|
|
dm_table | not grep -E -q "$vg|$vg1|$vg2|$vg3|$vg4" || {
|
|
# Avoid activation of dmeventd if there is no pid
|
|
cfg=$(test -s LOCAL_DMEVENTD || echo "--config activation{monitoring=0}")
|
|
- if dm_info suspended,name | grep -q "^Suspended:.*$PREFIX" ; then
|
|
+ if dm_info suspended,name | grep "^Suspended:.*$PREFIX" >/dev/null ; then
|
|
echo "## skipping vgremove, suspended devices detected."
|
|
else
|
|
vgremove -ff "$cfg" \
|
|
@@ -662,7 +662,7 @@ prepare_scsi_debug_dev() {
|
|
|
|
# Skip test if scsi_debug module is unavailable or is already in use
|
|
modprobe --dry-run scsi_debug || skip
|
|
- lsmod | not grep -q scsi_debug || skip
|
|
+ lsmod | not grep scsi_debug >/dev/null || skip
|
|
|
|
# Create the scsi_debug device and determine the new scsi device's name
|
|
# NOTE: it will _never_ make sense to pass num_tgts param;
|
|
@@ -1447,7 +1447,7 @@ driver_at_least() {
|
|
}
|
|
|
|
have_thin() {
|
|
- lvm segtypes 2>/dev/null | grep -q thin$ || {
|
|
+ lvm segtypes 2>/dev/null | grep thin$ >/dev/null || {
|
|
echo "Thin is not built-in." >&2
|
|
return 1
|
|
}
|
|
@@ -1471,7 +1471,7 @@ have_thin() {
|
|
}
|
|
|
|
have_vdo() {
|
|
- lvm segtypes 2>/dev/null | grep -q vdo$ || {
|
|
+ lvm segtypes 2>/dev/null | grep vdo$ >/dev/null || {
|
|
echo "VDO is not built-in." >&2
|
|
return 1
|
|
}
|
|
@@ -1507,7 +1507,7 @@ have_raid4 () {
|
|
}
|
|
|
|
have_cache() {
|
|
- lvm segtypes 2>/dev/null | grep -q cache$ || {
|
|
+ lvm segtypes 2>/dev/null | grep cache$ >/dev/null || {
|
|
echo "Cache is not built-in." >&2
|
|
return 1
|
|
}
|
|
--
|
|
2.24.0
|
|
|