[libvirt] [PATCH 3/3] tests: optparse: Use --config with the setmaxmem command

Erik Skultety eskultet at redhat.com
Thu Jul 25 08:19:40 UTC 2019


The virsh-optparse test broke after commit @6ac402c456a because it
always assumed the max memory limit can be adjusted on a running domain
which used to be the case in the old code.
This is only a hot fix for the CI build. The proper fix here is to
re-write the whole test in a self-test/unit-test manner where we only
test virsh's ability to parse various values, not running actual
commands.

Signed-off-by: Erik Skultety <eskultet at redhat.com>
---
 tests/virsh-optparse | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/virsh-optparse b/tests/virsh-optparse
index 1aef8d8d95..090d6c205c 100755
--- a/tests/virsh-optparse
+++ b/tests/virsh-optparse
@@ -219,13 +219,13 @@ test -s out && fail=1
 compare exp-err err || fail=1
 
 # Numeric value with valid suffix
-virsh -q -c $test_url setmaxmem test 42MB >out 2>err || fail=1
+virsh -q -c $test_url setmaxmem test 42MB --config >out 2>err || fail=1
 test -s out && fail=1
 test -s err && fail=1
 
 # Numeric value bigger than INT_MAX. No failure here because
 # scaled numeric values are unsigned long long
-virsh -q -c $test_url setmaxmem test 2147483648 >out 2>err || fail=1
+virsh -q -c $test_url setmaxmem test 2147483648 --config >out 2>err || fail=1
 test -s out && fail=1
 test -s err && fail=1
 
@@ -248,7 +248,7 @@ test -s out && fail=1
 compare exp-err err || fail=1
 
 # Numeric value
-virsh -q -c $test_url setmaxmem test 42 >out 2>err || fail=1
+virsh -q -c $test_url setmaxmem test 42 --config >out 2>err || fail=1
 test -s out && fail=1
 test -s err && fail=1
 
-- 
2.21.0




More information about the libvir-list mailing list