qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] iotests/check: move general long options to double dash


From: Vladimir Sementsov-Ogievskiy
Subject: [PATCH] iotests/check: move general long options to double dash
Date: Wed, 26 May 2021 21:16:59 +0300

So, the change:

  -makecheck -> --makecheck
  -valgrind  -> --valgrind
  -nocache   -> --nocache
  -misalign  -> --misalign

Motivation:

1. Several long options are already have double dash:
  --dry-run, --color, --groups, --exclude-groups, --start-from

2. -misalign is used to add --misalign option (two dashes) to qemu-io

3. qemu-io and qemu-nbd has --nocache option (two dashes)

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
 tests/check-block.sh         | 2 +-
 tests/qemu-iotests/check     | 8 ++++----
 tests/qemu-iotests/common.rc | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/check-block.sh b/tests/check-block.sh
index f86cb863de..90619454d3 100755
--- a/tests/check-block.sh
+++ b/tests/check-block.sh
@@ -77,7 +77,7 @@ export PYTHONUTF8=1
 
 ret=0
 for fmt in $format_list ; do
-    ${PYTHON} ./check -makecheck -$fmt $group || ret=1
+    ${PYTHON} ./check --makecheck -$fmt $group || ret=1
 done
 
 exit $ret
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index 2dd529eb75..3f3962dd75 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -32,11 +32,11 @@ def make_argparser() -> argparse.ArgumentParser:
 
     p.add_argument('-n', '--dry-run', action='store_true',
                    help='show me, do not run tests')
-    p.add_argument('-makecheck', action='store_true',
+    p.add_argument('--makecheck', action='store_true',
                    help='pretty print output for make check')
 
     p.add_argument('-d', dest='debug', action='store_true', help='debug')
-    p.add_argument('-misalign', action='store_true',
+    p.add_argument('--misalign', action='store_true',
                    help='misalign memory allocations')
     p.add_argument('--color', choices=['on', 'off', 'auto'],
                    default='auto', help="use terminal colors. The default "
@@ -46,7 +46,7 @@ def make_argparser() -> argparse.ArgumentParser:
     mg = g_env.add_mutually_exclusive_group()
     # We don't set default for cachemode, as we need to distinguish default
     # from user input later.
-    mg.add_argument('-nocache', dest='cachemode', action='store_const',
+    mg.add_argument('--nocache', dest='cachemode', action='store_const',
                     const='none', help='set cache mode "none" (O_DIRECT), '
                     'sets CACHEMODE environment variable')
     mg.add_argument('-c', dest='cachemode',
@@ -85,7 +85,7 @@ def make_argparser() -> argparse.ArgumentParser:
     g_bash.add_argument('-o', dest='imgopts',
                         help='options to pass to qemu-img create/convert, '
                         'sets IMGOPTS environment variable')
-    g_bash.add_argument('-valgrind', action='store_true',
+    g_bash.add_argument('--valgrind', action='store_true',
                         help='use valgrind, sets VALGRIND_QEMU environment '
                         'variable')
 
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index cbbf6d7c7f..e2f81cd41b 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -124,7 +124,7 @@ fi
 
 # Set the variables to the empty string to turn Valgrind off
 # for specific processes, e.g.
-# $ VALGRIND_QEMU_IO= ./check -qcow2 -valgrind 015
+# $ VALGRIND_QEMU_IO= ./check -qcow2 --valgrind 015
 
 : ${VALGRIND_QEMU_VM=$VALGRIND_QEMU}
 : ${VALGRIND_QEMU_IMG=$VALGRIND_QEMU}
@@ -134,7 +134,7 @@ fi
 
 # The Valgrind own parameters may be set with
 # its environment variable VALGRIND_OPTS, e.g.
-# $ VALGRIND_OPTS="--leak-check=yes" ./check -qcow2 -valgrind 015
+# $ VALGRIND_OPTS="--leak-check=yes" ./check -qcow2 --valgrind 015
 
 _qemu_proc_exec()
 {
-- 
2.29.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]