- 18 1月, 2017 3 次提交
-
-
由 Peter Krempa 提交于
Add test monitor infrastructure that will test the commands verbatim rather than trying to do any smart handling.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
- 06 10月, 2016 1 次提交
-
-
由 Peter Krempa 提交于
Add code that takes a string and matches it against the data passed as arguments from qemu. This is a simpler version of qemuMonitorTestAddItemParams.
-
- 09 6月, 2016 3 次提交
-
-
由 Jiri Denemark 提交于
The current version uses the first JSON reply from the file as monitor greeting. With the new parameter the caller can now request a simple test monitor to be created, which uses an artificial greeting and uses all JSON strings from the file as regular replies. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
It's a convenient wrapper around qemuMonitorTestNew which feeds the test monitor with QMP replies from a specified file. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 11 3月, 2015 1 次提交
-
-
由 Peter Krempa 提交于
qemu HMP commands sent by libvirt are terminated just by a '\r'. The fake monitor used in tests wasn't prepared to handle this and the communication would hang on an attempt to do a HMP conversation. Add a special case for handling commands separated by \r in case HMP is used.
-
- 03 6月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
The qemu JSON monitor test allows to test also expected command arguments. As the error from the monitor simulator is returned as a simulated qemu error (in JSON) all other JSON contained in the error message needs to be escaped. This will happen if the monitor command under test receives a JSON array as an argument. This will improve the error message from: libvirt: error : internal error: cannot parse json { "error": { "desc": "Invalid value of argument 'keys' of command 'send-key': expected 'ble' got '[{"type":"number","data":43},{"type":"number","data":26}, {"type":"number","data":46},{"type":"number","data":32}]'", "class": "UnexpectedCommand" } }: lexical error: invalid string in json text. To: libvirt: QEMU Driver error : internal error: unable to execute QEMU command 'send-key': Invalid value of argument 'keys' of command 'send-key': expected 'ble' got '[{"type":"number","data":43}, {"type":"number","data":26},{"type":"number","data":46}, {"type":"number","data":32}]' This improvement will not have any effect on tests executing as expected, but it will help test development.
-
- 25 3月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
-
- 18 3月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
Any source file which calls the logging APIs now needs to have a VIR_LOG_INIT("source.name") declaration at the start of the file. This provides a static variable of the virLogSource type. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 21 10月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Most of the usage of getuid()/getgid() is in cases where we are considering what privileges we have. As such the code should be using the effective IDs, not real IDs. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 03 10月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
Join the worker thread no matter if it is running or zombie already. With current implementation the thread is joined iff @running is true. However, when worker executes the last line, @running is set to false. Hence qemuMonitorTestFree() won't join it (and free resources) even though we can clearly see worker has run (nobody else sets @running = false). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 01 10月, 2013 2 次提交
-
-
由 Michal Privoznik 提交于
In a few cases we might want to not care if monitor command executed on the mocked monitor matches the one we have reply for. Sounds crazy, but if we just want monitor to return certain values (e.g. read from a file) there is no need to care about command match. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Currently, when creating a new mocked monitor, the greeting can't be chosen. This is crucial for next patches, because some info as qemu version is obtained in the greeting message. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 26 9月, 2013 3 次提交
-
-
由 Daniel P. Berrange 提交于
The virDomainChrSourceDef variable should be memset to 0, so that the cleanup block does not free uninitialized data on OOM. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The qemuMonitorCommonTestInit method did not allocate the test object, so it should not free it upon failure. Doing so causes a double free with the caller. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Don't leak the path string in qemuMonitorCommonTestNew if an OOM occurs. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 26 8月, 2013 4 次提交
-
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
The driver is then passed to monitor event handlers.
-
由 Jiri Denemark 提交于
Some tests need the monitor to operate on an already existing VM object rather than on a new mock-up the monitor test normally creates.
-
由 Jiri Denemark 提交于
We will have to pass a mock-up of the driver when testing monitor events.
-
- 02 8月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
When allocation of memory failed the error path didn't call va_end() causing a coverity failure. Reported by John Ferlan.
-
- 31 7月, 2013 10 次提交
-
-
由 Peter Krempa 提交于
This patch adds helpers that allow to check for argument values in commands sent to the monitor.
-
由 Peter Krempa 提交于
Use the JSON error messages to report errors back to the caller in addition to erroring out. The error reported from the event loop from the mock function of the monitor was later overwritten by the call to the monitor/agent interaction API. This will also allow testing of error reporting.
-
由 Peter Krempa 提交于
Add helper functions to open guest agent connections and a handler for replying to the "guest-sync" command.
-
由 Peter Krempa 提交于
The normal monitor uses windows line endings, where the agent monitor uses only newlines. Change this to tolerate both approaches and allow to use the utilities for guest agent tests.
-
由 Peter Krempa 提交于
Refactor the test helpers to allow adding callbacks to verify the monitor responses instead of simple command name checking and clean up various parts to prepare for adding guest agent tests.
-
由 Peter Krempa 提交于
The instrumentation for the monitor test can be hacked for qemu agent testing. Split out the monitor specific stuff to allow using the code in guest agent tests in the future.
-
由 Peter Krempa 提交于
The qemumonitorjsontest crashed when one of the initialization steps done before starting the worker thread failed. This patch fixes this by trying to pthread_join() the thread only after it was created.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Simplify the code using the existing helpers instead of open coding the same functionality.
-
由 Peter Krempa 提交于
-
- 10 7月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 21 5月, 2013 1 次提交
-
-
由 Osier Yang 提交于
-
- 14 5月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Follows on the heels of other bool cleanups, such as commit 93002b98. * src/qemu/qemu_monitor.h (qemuMonitorOpen, qemuMonitorOpenFD): Update json parameter type. * src/qemu/qemu_monitor.c (qemuMonitorOpen, qemuMonitorOpenFD): Likewise. (_qemuMonitor): Adjust field type. * src/qemu/qemu_domain.h (_qemuDomainObjPrivate): Likewise. * src/qemu/qemu_domain.c (qemuDomainObjPrivateXMLParse): Adjust client. * src/qemu/qemu_process.c (qemuProcessStart): Likewise. * tests/qemumonitortestutils.c (qemuMonitorTestNew): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 10 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 02 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
The source code base needs to be adapted as well. Some files include virutil.h just for the string related functions (here, the include is substituted to match the new file), some include virutil.h without any need (here, the include is removed), and some require both.
-
- 20 4月, 2013 1 次提交
-
-
由 Eric Blake 提交于
http://www.uhv.edu/ac/newsletters/writing/grammartip2009.07.01.htm (and several other sites) give hints that 'onto' is best used if you can also add 'up' just before it and still make sense. In many cases in the code base, we really want the two-word form, or even a simplification to just 'on' or 'to'. * docs/hacking.html.in: Use correct 'on to'. * python/libvirt-override.c: Likewise. * src/lxc/lxc_controller.c: Likewise. * src/util/virpci.c: Likewise. * daemon/THREADS.txt: Use simpler 'on'. * docs/formatdomain.html.in: Better usage. * docs/internals/rpc.html.in: Likewise. * src/conf/domain_event.c: Likewise. * src/rpc/virnetclient.c: Likewise. * tests/qemumonitortestutils.c: Likewise. * HACKING: Regenerate. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 05 4月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
This patch is the result of running: for i in $(git ls-files | grep -v html | grep -v \.po$ ); do sed -i -e "s/virDomainXMLConf/virDomainXMLOption/g" -e "s/xmlconf/xmlopt/g" $i done and a few manual tweaks.
-