All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Asleson <tasleson@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - lvmdbusd: Fix env variable LVM_DBUSD_TEST_MODE
Date: Thu, 30 Jun 2022 16:00:42 +0000 (GMT)	[thread overview]
Message-ID: <20220630160042.9ADB6386F0CE@sourceware.org> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b3d7aff6a3a8fd55790f61b9b0b33d599841030b
Commit:        b3d7aff6a3a8fd55790f61b9b0b33d599841030b
Parent:        47c61907b4adbdead50f5bb5ac95c0f5d0fe263e
Author:        Tony Asleson <tasleson@redhat.com>
AuthorDate:    Wed May 25 16:21:14 2022 -0500
Committer:     Tony Asleson <tasleson@redhat.com>
CommitterDate: Thu Jun 30 10:55:16 2022 -0500

lvmdbusd: Fix env variable LVM_DBUSD_TEST_MODE

Make it more logical.
---
 test/dbus/lvmdbustest.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py
index 3eef77fd7..d876a1748 100755
--- a/test/dbus/lvmdbustest.py
+++ b/test/dbus/lvmdbustest.py
@@ -40,9 +40,10 @@ pv_device_list = os.getenv('LVM_DBUSD_PV_DEVICE_LIST', None)
 
 # Default is to test all modes
 # 0 == Only test fork & exec mode
-# 1 == Test both fork & exec & lvm shell mode (default)
+# 1 == Only test lvm shell mode
+# 2 == Test both fork & exec & lvm shell mode (default)
 # Other == Test just lvm shell mode
-test_shell = os.getenv('LVM_DBUSD_TEST_MODE', 1)
+test_shell = os.getenv('LVM_DBUSD_TEST_MODE', 2)
 
 # LVM binary to use
 LVM_EXECUTABLE = os.getenv('LVM_BINARY', '/usr/sbin/lvm')
@@ -2081,16 +2082,19 @@ if __name__ == '__main__':
 	if mode == 0:
 		std_err_print('\n*** Testing only lvm fork & exec test mode ***\n')
 	elif mode == 1:
+		std_err_print('\n*** Testing only lvm shell mode ***\n')
+	elif mode == 2:
 		std_err_print('\n*** Testing fork & exec & lvm shell mode ***\n')
 	else:
-		std_err_print('\n*** Testing only lvm shell mode ***\n')
+		std_err_print("Unsupported \"LVM_DBUSD_TEST_MODE\"=%d, [0-2] valid" % mode)
+		sys.exit(1)
 
 	for g_tmo in [0, 15]:
 		std_err_print('Testing TMO=%d\n' % g_tmo)
 		if mode == 0:
 			if set_execution(False, r):
 				r.register_result(unittest.main(exit=False))
-		elif mode == 2:
+		elif mode == 1:
 			if set_execution(True, r):
 				r.register_result(unittest.main(exit=False))
 		else:


                 reply	other threads:[~2022-06-30 16:00 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=20220630160042.9ADB6386F0CE@sourceware.org \
    --to=tasleson@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.