]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: Fix virsh-snapshot/checkpoint without readline-devel v5.6.0-rc2
authorEric Blake <eblake@redhat.com>
Fri, 2 Aug 2019 13:20:08 +0000 (08:20 -0500)
committerEric Blake <eblake@redhat.com>
Fri, 2 Aug 2019 14:44:41 +0000 (09:44 -0500)
commit8bfb1371d900b47f0824e89050d54ac17f68f71e
tree93eb35567751828574bc47c550016ce166b3d98e
parentbd24bab96a823ce1f45397e261deb6ea810653bb
tests: Fix virsh-snapshot/checkpoint without readline-devel

readline-devel is an optional build dependency; when it is not
present, the output of 'virsh <<EOF ... EOF' is different in that the
input provided by the user is not echoed, and prompts become
interleaved on the same line as actual output, which in turn causes
the sed doing prompt filtering to mess up:

| ./virsh-snapshot
| --- exp 2019-07-31 18:42:31.107399428 -0300
| +++ out.cooked 2019-07-31 18:42:31.108399437 -0300
| @@ -1,8 +1,3 @@
| -
| -
| -Domain snapshot s3 created from 's3.xml'
| -Domain snapshot s2 created from 's2.xml'
| -Name:           s2
|  Domain:         test
|  Current:        yes
|  State:          running

Maybe we should fix virsh in interactive mode to echo regardless of
whether readline-devel was used, but the quicker fix is to make the
test use 'virsh "..."' rather than reading its input from stdin.

Reported-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
tests/virsh-checkpoint
tests/virsh-snapshot