Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upR4.0 rc3 qvm-check's output and retcode kind of buggy #3496
Comments
andrewdavidwong
added
bug
C: core
P: minor
labels
Jan 27, 2018
andrewdavidwong
added this to the Release 4.0 milestone
Jan 27, 2018
andrewdavidwong
modified the milestones:
Release 4.0,
Release 4.0 updates
Mar 31, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
taradiddles commentedJan 26, 2018
Qubes OS version:
R4.0 rc3
Steps to reproduce the behavior:
I'm scripting some stuff in dom0 and need to check if a VM exists ; qvm-check seems to be the way to go rather than grepping the output of qvm-ls.
Let's assume that a VM named "work" exists and that a VM named "work1" doesn't.
Case 1: checking if VM "work" is running: works as expected
Case 2: adding the --quiet arg: the output isn't suppressed
Case 3: finding out what the retcode for a wrong syntax is (to compare with case 4 below)
Case 4: checking if a non existent VM exists: usage() is displayed and usage()'s retcode is returned despite the syntax being right; one would expect the retcode "1"
I looked at /usr/lib/python3.5/site-packages/qubesadmin/tests/tools/qvm_check.py to try to fix it and send a PR, but it was a bit too cryptic for me.
Very minor issue BTW.