master - tests: fix running tests on systems without udevd
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=750fc2e876f49d48e8f...
Commit: 750fc2e876f49d48e8f883e4e342338b8c4676cd
Parent: 285413b502e1f0f5a016b24c93b871419381c1fc
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Mar 14 11:23:14 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Mar 15 11:01:04 2018 +0100
tests: fix running tests on systems without udevd
Variable was unbound on systems without running udevd.
---
test/lib/utils.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/lib/utils.sh b/test/lib/utils.sh
index a1f7a01..b6c2ab0 100644
--- a/test/lib/utils.sh
+++ b/test/lib/utils.sh
@@ -209,8 +209,8 @@ init_udev_transaction() {
}
finish_udev_transaction() {
- if test "$DM_UDEV_SYNCHRONISATION" = 1 && test -n "$DM_UDEV_COOKIE" ; then
- dmsetup udevreleasecookie
+ if test "$DM_UDEV_SYNCHRONISATION" = 1 && test -n "${DM_UDEV_COOKIE-}" ; then
+ dmsetup udevreleasecookie || true
unset DM_UDEV_COOKIE
fi
}
6 years, 1 month
master - cleanup: missing dots and indent
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=285413b502e1f0f5a01...
Commit: 285413b502e1f0f5a016b24c93b871419381c1fc
Parent: d794444715d9a762d2b6f06fe465ef6348085673
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Mar 14 21:00:20 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Mar 15 11:01:04 2018 +0100
cleanup: missing dots and indent
---
lib/device/dev-io.c | 4 ++--
lib/metadata/metadata.c | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/lib/device/dev-io.c b/lib/device/dev-io.c
index f9422b1..cb3a234 100644
--- a/lib/device/dev-io.c
+++ b/lib/device/dev-io.c
@@ -1185,13 +1185,13 @@ const char *dev_read_circular(struct device *dev, uint64_t offset, size_t len,
}
if (!dev_read_buf(dev, offset, len, reason, buf)) {
- log_error("Read from %s failed", dev_name(dev));
+ log_error("Read from %s failed.", dev_name(dev));
dm_free(buf);
return NULL;
}
if (!dev_read_buf(dev, offset2, len2, reason, buf + len)) {
- log_error("Circular read from %s failed", dev_name(dev));
+ log_error("Circular read from %s failed.", dev_name(dev));
dm_free(buf);
return NULL;
}
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 2e77a55..b5b97c2 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -5623,10 +5623,8 @@ uint32_t vg_lock_newname(struct cmd_context *cmd, const char *vgname)
}
lvmcache_force_next_label_scan();
lvmcache_label_scan(cmd);
- if (!lvmcache_fmt_from_vgname(cmd, vgname, NULL, 0)) {
- /* vgname not found after scanning */
- return SUCCESS;
- }
+ if (!lvmcache_fmt_from_vgname(cmd, vgname, NULL, 0))
+ return SUCCESS; /* vgname not found after scanning */
}
}
6 years, 1 month
master - activation: check for prioritized_section
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d794444715d9a762d2b...
Commit: d794444715d9a762d2b6f06fe465ef6348085673
Parent: 6365f011b00357e7f67fbe3aca0ca00ccf17ba66
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Mar 15 10:28:43 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Mar 15 11:01:04 2018 +0100
activation: check for prioritized_section
Detect we are in prioritezed section instead of critical one,
since these operation were supposed to NOT be happining during
whole set of operation.
This patch fixes verification of udev operations.
---
lib/activate/fs.c | 4 ++--
lib/metadata/metadata.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/activate/fs.c b/lib/activate/fs.c
index a0b8bff..498ec8f 100644
--- a/lib/activate/fs.c
+++ b/lib/activate/fs.c
@@ -441,7 +441,7 @@ static int _fs_op(fs_op_t type, const char *dev_dir, const char *vg_name,
const char *lv_name, const char *dev, const char *old_lv_name,
int check_udev)
{
- if (critical_section()) {
+ if (prioritized_section()) {
if (!_stack_fs_op(type, dev_dir, vg_name, lv_name, dev,
old_lv_name, check_udev))
return_0;
@@ -487,7 +487,7 @@ int fs_rename_lv(const struct logical_volume *lv, const char *dev,
void fs_unlock(void)
{
- if (!critical_section()) {
+ if (!prioritized_section()) {
log_debug_activation("Syncing device names");
/* Wait for all processed udev devices */
if (!dm_udev_wait(_fs_cookie))
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index c529abf..2e77a55 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -3862,7 +3862,7 @@ static struct volume_group *_vg_read(struct cmd_context *cmd,
lvmcache_label_scan(cmd);
if (!(fmt = lvmcache_fmt_from_vgname(cmd, vgname, vgid, 1))) {
/* Independent MDAs aren't supported under low memory */
- if (!cmd->independent_metadata_areas && critical_section())
+ if (!cmd->independent_metadata_areas && prioritized_section())
return_NULL;
lvmcache_force_next_label_scan();
lvmcache_label_scan(cmd);
@@ -4034,7 +4034,7 @@ static struct volume_group *_vg_read(struct cmd_context *cmd,
log_debug_metadata("Cached VG %s had incorrect PV list",
vgname);
- if (critical_section())
+ if (prioritized_section())
inconsistent = 1;
else {
release_vg(correct_vg);
@@ -4074,7 +4074,7 @@ static struct volume_group *_vg_read(struct cmd_context *cmd,
inconsistent = 0;
/* Independent MDAs aren't supported under low memory */
- if (!cmd->independent_metadata_areas && critical_section())
+ if (!cmd->independent_metadata_areas && prioritized_section())
return_NULL;
lvmcache_force_next_label_scan();
lvmcache_label_scan(cmd);
6 years, 1 month
master - locking: introduce prioritized_section
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6365f011b00357e7f67...
Commit: 6365f011b00357e7f67fbe3aca0ca00ccf17ba66
Parent: 043f58452a0a2c136dd6a90f1d60b063ae17a866
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Mar 15 09:07:24 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Mar 15 10:59:42 2018 +0100
locking: introduce prioritized_section
Introduce prioritized_section() as a closer match to previous logic
of critical_section() that has been held over longer sequence of
ioctl commands - essentially it's matching operation on a single
cookie.
While 'critical_section()' now corresponds to locked memory - we hold
this memory only between suspend/resume thus notion of 'cookie' was
lost.
This patch restores some logic unintentionaly lost with dropping
memory locking for just activation/deactivation calls.
---
WHATS_NEW | 1 +
lib/mm/memlock.c | 5 +++++
lib/mm/memlock.h | 1 +
3 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index a545a5d..da5f5f4 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.178 -
=====================================
+ Add prioritized_section() to restore cookie boundaries (2.02.177).
Enhance error messages when read error happens.
Enhance mirror log initialization for old mirror target.
Skip private crypto and stratis devices.
diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c
index 897bf10..b55cc97 100644
--- a/lib/mm/memlock.c
+++ b/lib/mm/memlock.c
@@ -634,6 +634,11 @@ int critical_section(void)
return _critical_section;
}
+int prioritized_section(void)
+{
+ return _priority_raised;
+}
+
/*
* The memlock_*_daemon functions will force the mlockall() call that we need
* to stay in memory, but they will have no effect on device scans (unlike
diff --git a/lib/mm/memlock.h b/lib/mm/memlock.h
index ef2ebcb..d0807d5 100644
--- a/lib/mm/memlock.h
+++ b/lib/mm/memlock.h
@@ -34,6 +34,7 @@ struct cmd_context;
void critical_section_inc(struct cmd_context *cmd, const char *reason);
void critical_section_dec(struct cmd_context *cmd, const char *reason);
int critical_section(void);
+int prioritized_section(void);
void memlock_inc_daemon(struct cmd_context *cmd);
void memlock_dec_daemon(struct cmd_context *cmd);
int memlock_count_daemon(void);
6 years, 1 month
master - libdm-stats: fix error messages
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=043f58452a0a2c136dd...
Commit: 043f58452a0a2c136dd6a90f1d60b063ae17a866
Parent: a082ce2613f3a9587b0109df0bbc3ebb7e6b1e75
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Mar 14 21:00:46 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Mar 15 10:56:31 2018 +0100
libdm-stats: fix error messages
When function dm_stats_populate() returns 0 it's an error and needs
log_error() message - function can't have 'success' returning 0 or
error without reasons.
---
WHATS_NEW_DM | 1 +
libdm/libdm-stats.c | 11 ++++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 2fafe74..34c6833 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.147 -
=====================================
+ Add missing log_error() into dm_stats_populate() returning 0.
Avoid calling dm_stats_populat() for DM devices without any stats regions.
Support DM_DEBUG_WITH_LINE_NUMBERS envvar for debug msg with source:line.
Configured command for thin pool threshold handling gets whole environment.
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index c74444a..94ad380 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -403,7 +403,7 @@ static int _stats_bound(const struct dm_stats *dms)
if (dms->bind_major > 0 || dms->bind_name || dms->bind_uuid)
return 1;
/* %p format specifier expects a void pointer. */
- log_debug("Stats handle at %p is not bound.", dms);
+ log_error("Stats handle at %p is not bound.", dms);
return 0;
}
@@ -2336,6 +2336,11 @@ int dm_stats_populate(struct dm_stats *dms, const char *program_id,
return 0;
}
+ if (!dms->nr_regions) {
+ log_error("No regions registered.");
+ return 0;
+ }
+
/* allow zero-length program_id for populate */
if (!program_id)
program_id = dms->program_id;
@@ -2347,10 +2352,6 @@ int dm_stats_populate(struct dm_stats *dms, const char *program_id,
goto_bad;
}
- /* successful list but no regions registered */
- if (!dms->nr_regions)
- return 0;
-
dms->walk_flags = DM_STATS_WALK_REGION;
dm_stats_walk_start(dms);
do {
6 years, 1 month
master - dmstatus: check nr_regions ahead of find call
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a082ce2613f3a9587b0...
Commit: a082ce2613f3a9587b0109df0bbc3ebb7e6b1e75
Parent: 4c925692f58912fbe088a09cdbbc75bfa9e865f5
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Mar 14 21:01:22 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Mar 15 10:54:19 2018 +0100
dmstatus: check nr_regions ahead of find call
Prevent call of dm_stats_populate(), when there has been no
stats region detected for a DM device.
Such skip is evaluated as 'correct' visit of stats call and
not causing 'dmstats' command failure.
---
WHATS_NEW_DM | 1 +
tools/dmsetup.c | 6 ++++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 09e6fc0..2fafe74 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.147 -
=====================================
+ Avoid calling dm_stats_populat() for DM devices without any stats regions.
Support DM_DEBUG_WITH_LINE_NUMBERS envvar for debug msg with source:line.
Configured command for thin pool threshold handling gets whole environment.
Fix tests for failing dm_snprintf() in stats code.
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index 64a45a6..95a15dd 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -910,6 +910,12 @@ static int _display_info_cols(struct dm_task *dmt, struct dm_info *info)
if (!(obj.stats = dm_stats_create(DM_STATS_PROGRAM_ID)))
goto_out;
+ if (!dm_stats_get_nr_regions(obj.stats)) {
+ log_debug("Skipping %s with no regions.", dm_task_get_name(dmt));
+ r = 1;
+ goto out;
+ }
+
dm_stats_bind_devno(obj.stats, info->major, info->minor);
if (!dm_stats_populate(obj.stats, _program_id, DM_STATS_REGIONS_ALL))
6 years, 1 month
master - dmsetup: loop output table as verbose
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4c925692f58912fbe08...
Commit: 4c925692f58912fbe088a09cdbbc75bfa9e865f5
Parent: 70ad633638b15568d53312afdfca699f85a26fd1
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Mar 14 21:02:32 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Mar 15 10:50:30 2018 +0100
dmsetup: loop output table as verbose
Resulting loop table line was streamed to 'stderr' stream - assuming this
was not a feature when user used '-v' for more verbose output
and properly show it via 'log_verbose()' on 'stdout'.
---
tools/dmsetup.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index eac3bb6..64a45a6 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -6606,7 +6606,7 @@ static int _loop_table(char *table, size_t tlen, char *file,
return_0;
if (_switches[VERBOSE_ARG] > 1)
- log_error("Table: %s", table);
+ log_verbose("Table: %s", table);
return 1;
6 years, 1 month
master - devcache: add reason and always log_error
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=70ad633638b15568d53...
Commit: 70ad633638b15568d53312afdfca699f85a26fd1
Parent: 2b3b486a371bd9e98f20d14bbad320d610f3ece7
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Mar 14 19:33:20 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Mar 15 10:50:28 2018 +0100
devcache: add reason and always log_error
With these read errors it's useful to know the reason.
Also avoid to log error just once so we know exactly
how many times we did failing read.
On the other hand reduce repeated log_error() on code 'backtrace'
path and change severity of message to just log_debug() so the
actual read error is printed once for one read.
---
WHATS_NEW | 1 +
lib/device/dev-io.c | 32 ++++++++++++++++----------------
2 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index faf43fe..a545a5d 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.178 -
=====================================
+ Enhance error messages when read error happens.
Enhance mirror log initialization for old mirror target.
Skip private crypto and stratis devices.
Skip frozen raid devices from scanning.
diff --git a/lib/device/dev-io.c b/lib/device/dev-io.c
index 50b1ba8..f9422b1 100644
--- a/lib/device/dev-io.c
+++ b/lib/device/dev-io.c
@@ -238,10 +238,11 @@ int dev_async_getevents(void)
dev_read_callback_fn(0, AIO_SUPPORTED_CODE_PATH, dev_read_callback_context, (char *)devbuf->buf + devbuf->data_offset);
} else {
/* FIXME If partial read is possible, resubmit remainder */
- log_error_once("%s: Asynchronous I/O failed: read only %" PRIu64 " of %" PRIu64 " bytes at %" PRIu64,
- dev_name(devbuf->where.dev),
- (uint64_t) _aio_events[event_nr].res, (uint64_t) devbuf->where.size,
- (uint64_t) devbuf->where.start);
+ log_error("%s: asynchronous read only I/O failed (" FMTd64 ") of " FMTu64 " bytes at " FMTu64 " (for %s): %s",
+ dev_name(devbuf->where.dev), _aio_events[event_nr].res,
+ (uint64_t) devbuf->where.size, (uint64_t) devbuf->where.start,
+ _reason_text(devbuf->reason),
+ ((int64_t)_aio_events[event_nr].res < 0) ? strerror(-(int64_t)_aio_events[event_nr].res) : 0);
_release_devbuf(devbuf);
if (dev_read_callback_fn)
dev_read_callback_fn(1, AIO_SUPPORTED_CODE_PATH, dev_read_callback_context, NULL);
@@ -407,12 +408,13 @@ static int _io_sync(struct device_buffer *devbuf)
while ((n < 0) && ((errno == EINTR) || (errno == EAGAIN)));
if (n < 0)
- log_error_once("%s: %s failed after %" PRIu64 " of %" PRIu64
- " at %" PRIu64 ": %s", dev_name(where->dev),
- devbuf->write ? "write" : "read",
- (uint64_t) total,
- (uint64_t) where->size,
- (uint64_t) where->start, strerror(errno));
+ log_error("%s: synchronous %s failed after %" PRIu64 " of %" PRIu64
+ " at %" PRIu64 " (for %s): %s", dev_name(where->dev),
+ devbuf->write ? "write" : "read",
+ (uint64_t) total,
+ (uint64_t) where->size, (uint64_t) where->start,
+ _reason_text(devbuf->reason),
+ strerror(errno));
if (n <= 0)
break;
@@ -1126,7 +1128,7 @@ static int _dev_read_callback(struct device *dev, uint64_t offset, size_t len, d
ret = _aligned_io(&where, NULL, 0, reason, ioflags, dev_read_callback_fn, callback_context);
if (!ret) {
- log_error("Read from %s failed", dev_name(dev));
+ log_debug("Read from %s failed (for %s).", dev_name(dev), _reason_text(reason));
_dev_inc_error_count(dev);
}
@@ -1160,11 +1162,9 @@ const char *dev_read(struct device *dev, uint64_t offset, size_t len, dev_io_rea
/* Read into supplied retbuf owned by the caller. */
int dev_read_buf(struct device *dev, uint64_t offset, size_t len, dev_io_reason_t reason, void *retbuf)
{
- if (!_dev_read_callback(dev, offset, len, reason, 0, NULL, NULL)) {
- log_error("Read from %s failed", dev_name(dev));
- return 0;
- }
-
+ if (!_dev_read_callback(dev, offset, len, reason, 0, NULL, NULL))
+ return_0;
+
memcpy(retbuf, DEV_DEVBUF_DATA(dev, reason), len);
return 1;
6 years, 1 month
master - libdm: support for DM_DEBUG_WITH_LINE_NUMBERS
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2b3b486a371bd9e98f2...
Commit: 2b3b486a371bd9e98f20d14bbad320d610f3ece7
Parent: eae54b67d8b7e6236816aa6c4b9bfa95f81d65fe
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Mar 14 18:08:16 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Mar 15 10:49:24 2018 +0100
libdm: support for DM_DEBUG_WITH_LINE_NUMBERS
For any libdm tool using default debugging function allow
to show source filename and code line number when this
functionality is available.
---
WHATS_NEW_DM | 1 +
libdm/libdm-common.c | 17 +++++++++++++----
man/lvm.8_main | 3 +++
3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 5c1f4a1..09e6fc0 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.147 -
=====================================
+ Support DM_DEBUG_WITH_LINE_NUMBERS envvar for debug msg with source:line.
Configured command for thin pool threshold handling gets whole environment.
Fix tests for failing dm_snprintf() in stats code.
Parsing mirror status accepts 'userspace' keyword in status.
diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c
index 2ab5bd1..99cf0c8 100644
--- a/libdm/libdm-common.c
+++ b/libdm/libdm-common.c
@@ -108,12 +108,12 @@ void dm_lib_init(void)
*/
__attribute__((format(printf, 5, 0)))
-static void _default_log_line(int level,
- const char *file __attribute__((unused)),
- int line __attribute__((unused)), int dm_errno_or_class,
- const char *f, va_list ap)
+static void _default_log_line(int level, const char *file,
+ int line, int dm_errno_or_class,
+ const char *f, va_list ap)
{
static int _abort_on_internal_errors = -1;
+ static int _debug_with_line_numbers = -1;
FILE *out = log_stderr(level) ? stderr : stdout;
level = log_level(level);
@@ -121,6 +121,15 @@ static void _default_log_line(int level,
if (level <= _LOG_WARN || _verbose) {
if (level < _LOG_WARN)
out = stderr;
+
+ if (_debug_with_line_numbers < 0)
+ /* Set when env DM_DEBUG_WITH_LINE_NUMBERS is not "0" */
+ _debug_with_line_numbers =
+ strcmp(getenv("DM_DEBUG_WITH_LINE_NUMBERS") ? : "0", "0");
+
+ if (_debug_with_line_numbers)
+ fprintf(out, "%s:%d ", file, line);
+
vfprintf(out, f, ap);
fputc('\n', out);
}
diff --git a/man/lvm.8_main b/man/lvm.8_main
index bd5d8a7..7bbf44a 100644
--- a/man/lvm.8_main
+++ b/man/lvm.8_main
@@ -481,6 +481,9 @@ Abort processing if the code detects a non-fatal internal error.
.B DM_DISABLE_UDEV
Avoid interaction with udev. LVM will manage the relevant nodes in /dev
directly.
+.TP
+.B DM_DEBUG_WITH_LINE_NUMBERS
+Prepends source file name and code line number with libdm debugging.
.
.SH FILES
.
6 years, 1 month
master - test: Skip tests which require too much RAM
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=eae54b67d8b7e623681...
Commit: eae54b67d8b7e6236816aa6c4b9bfa95f81d65fe
Parent: 90512910e5ecf1a4b1538d9d9165cb0f44e2c291
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Tue Mar 13 13:41:33 2018 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Tue Mar 13 13:42:45 2018 +0100
test: Skip tests which require too much RAM
- Tests for RAID reshape under load require too much RAM
---
test/shell/lvconvert-raid-reshape-load.sh | 3 +++
.../lvconvert-raid-reshape-stripes-load-fail.sh | 3 +++
.../lvconvert-raid-reshape-stripes-load-reload.sh | 6 ++++++
test/shell/lvconvert-raid-reshape-stripes-load.sh | 3 +++
4 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/test/shell/lvconvert-raid-reshape-load.sh b/test/shell/lvconvert-raid-reshape-load.sh
index d17b186..23046e5 100644
--- a/test/shell/lvconvert-raid-reshape-load.sh
+++ b/test/shell/lvconvert-raid-reshape-load.sh
@@ -17,6 +17,9 @@ SKIP_WITH_LVMPOLLD=1
# Test reshaping under io load
+# FIXME: This test requires 3GB in /dev/shm!
+test $(aux total_mem) -gt $((4096*1024)) || skip
+
which mkfs.ext4 || skip
aux have_raid 1 13 1 || skip
diff --git a/test/shell/lvconvert-raid-reshape-stripes-load-fail.sh b/test/shell/lvconvert-raid-reshape-stripes-load-fail.sh
index 3fac9a4..e7066be 100644
--- a/test/shell/lvconvert-raid-reshape-stripes-load-fail.sh
+++ b/test/shell/lvconvert-raid-reshape-stripes-load-fail.sh
@@ -20,6 +20,9 @@ skip
# Test reshaping under io load
+# FIXME: This test requires 3GB in /dev/shm!
+test $(aux total_mem) -gt $((4096*1024)) || skip
+
which mkfs.ext4 || skip
aux have_raid 1 13 1 || skip
diff --git a/test/shell/lvconvert-raid-reshape-stripes-load-reload.sh b/test/shell/lvconvert-raid-reshape-stripes-load-reload.sh
index f0a71c3..fc463bf 100644
--- a/test/shell/lvconvert-raid-reshape-stripes-load-reload.sh
+++ b/test/shell/lvconvert-raid-reshape-stripes-load-reload.sh
@@ -17,6 +17,9 @@ SKIP_WITH_LVMPOLLD=1
# Test reshaping under io load
+# FIXME: This test requires 3GB in /dev/shm!
+test $(aux total_mem) -gt $((4096*1024)) || skip
+
which mkfs.ext4 || skip
aux have_raid 1 13 2 || skip
@@ -49,10 +52,13 @@ mount "$DM_DEV_DIR/$vg/$lv1" $mount_dir
mkdir -p $mount_dir/1 $mount_dir/2
echo 3 >/proc/sys/vm/drop_caches
+# FIXME: This is filling up ram disk. Use sane amount of data please! Rate limit the data written!
cp -r /usr/bin $mount_dir/1 >/dev/null 2>/dev/null &
cp -r /usr/bin $mount_dir/2 >/dev/null 2>/dev/null &
+# FIXME: should this wait for above two processes and sync then?
sync &
+# FIXME: wait_for_sync - is this really testing anything under load?
aux wait_for_sync $vg $lv1
aux delay_dev "$dev2" 0 200
diff --git a/test/shell/lvconvert-raid-reshape-stripes-load.sh b/test/shell/lvconvert-raid-reshape-stripes-load.sh
index 785ee76..2143b4c 100644
--- a/test/shell/lvconvert-raid-reshape-stripes-load.sh
+++ b/test/shell/lvconvert-raid-reshape-stripes-load.sh
@@ -17,6 +17,9 @@ SKIP_WITH_LVMPOLLD=1
# Test reshaping under io load
+# FIXME: This test requires 3GB in /dev/shm!
+test $(aux total_mem) -gt $((4096*1024)) || skip
+
which mkfs.ext4 || skip
aux have_raid 1 13 1 || skip
6 years, 1 month