All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - tests: add basic validation of running services
Date: Fri, 26 Mar 2021 12:18:02 +0000 (GMT)	[thread overview]
Message-ID: <20210326121802.317523858024@sourceware.org> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=85fae836c09daf457f3f8f14e3eae2179cfd2ffa
Commit:        85fae836c09daf457f3f8f14e3eae2179cfd2ffa
Parent:        9bcc76b63c14566e5ced09ac18129e1c9a98e8e4
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Fri Mar 26 11:13:56 2021 +0100
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Mar 26 11:13:56 2021 +0100

tests: add basic validation of running services

For determinist test results lvm2/dm service shall not be present
and running in the system as it may randomize test results.

In case they are found present, this test ends with warning (not failure).
---
 test/shell/000-basic.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/test/shell/000-basic.sh b/test/shell/000-basic.sh
index 1e511d1f0..a7b80c72b 100644
--- a/test/shell/000-basic.sh
+++ b/test/shell/000-basic.sh
@@ -34,3 +34,15 @@ get_devs
 # ensure we do not crash on a bug in config file
 aux lvmconf 'log/prefix = 1""'
 not lvs "${DEVICES[@]}"
+
+# validate testing machine with its services is in expected state and will not interfere with tests
+if systemctl -a >out 2>/dev/null ; then
+	for i in dm-event lvm2-lvmpolld lvm2-monitor ; do
+	echo $i
+		grep $i out | not grep -v masked || {
+			cat out
+			should not echo "Present unmasked $i service/socket may randomize testing results!"
+			echo "+++++ Stop & Mask with systemctl +++++"
+		}
+	done
+fi



                 reply	other threads:[~2021-03-26 12:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210326121802.317523858024@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.