- 21 11月, 2013 7 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
There is a background tcpdump thread that records DHCP leases in the env["address_cache"] dictionary. Sometimes, this thread might write to this dictionary while the environment object is being saved, triggering a RuntimeError in virt-test. So the solution involves: 1) Creating a save lock, (a threading reentrant lock object), that is acquired by the env.save() method when it wants to save env.data to a pickle file, and for methods that alter env.data. 2) Move the tcpdump thread to a env object attribute, rather than one of the keys of env.data, given that the lock object can't be pickled. With the implementation of env.save_lock, we can also fix the problem identified by the locking unittest. The base of the solution was Pavel's idea, including a good deal of the implementation, so kudos to him. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
由 Lucas Meneghel Rodrigues 提交于
Sometimes, while virt-test is saving Env to a file, the tcpdump thread writes to the Env dictionary "address_cache", generating a: RuntimeError: dictionary changed size during iteration exception. Of course, any thread that modifies env data while saving is taking place is going to create this problem. So I implemented a similar situation in the Env unittest code, so we have a reproducer, that can be later fixed to use new Env locking mechanisms. So, in case it is not clear, this unittest is supposed to fail right now, and after said locking mechanism is implemented, the test will start passing. Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
由 Lucas Meneghel Rodrigues 提交于
qemu.tests: Use qemu-kvm -M ? to get machine type for physical resource ...
-
由 Lucas Meneghel Rodrigues 提交于
virt-libvirt: Extend test-runner default tests
-
由 Chris Evich 提交于
By default, the runner was running all variants of a single test. This makes it harder to spot certain types of test-specific problems. Instead, the runner should run a wider variety of tests, spreading the variant choices across a range of underlying functionality. Unfortunately, there's not a cleaner way to specify a wide range of tests w/o simply listing them all. However, the list can be read in from a file, which will help keep the maintenance effort low. I hard-coded list file path as relative to wherever the test runner module is located, since there's no reason to over complicate it. I expect this list will change over time, so this is only a reasonable starting place. Included are about 80 libvirt tests from across the board, with at least one positive and one negative test for each topic. I attempted to pick different operational varients from each set so, for example, it doesn't just exercize the same set of parameters repeatidly. Including the install and remove, they all complete on my intel i7 based laptop in under 30min, which was found to be reasonable. Signed-off-by: NChris Evich <cevich@redhat.com>
-
由 Yiqiao Pu 提交于
Find in utils_misc the cpu vendor and flag check code are duplicate. Remove the duplicate one and update related scripts need to update. Signed-off-by: NYiqiao Pu <ypu@redhat.com>
-
由 Lucas Meneghel Rodrigues 提交于
Add option '--log-level' to control log level for the top level log file
-
- 20 11月, 2013 12 次提交
-
-
由 Rudá Moura 提交于
Virsh Snapshot-edit test
-
由 Chris Evich 提交于
Signed-off-by: NChris Evich <cevich@redhat.com>
-
由 Chris Evich 提交于
Fix duplication of 'type_name' property from base-class. In other words, ``libvirt_xml/devices/base.py`` defines ``TypedDeviceBase`` which already handles setting up methods for ``get_type_name(), set_type_name(), del_type_name()`` to work on device elements ``<device_name type='foobar'>``. So there's no point in having a subclass re-define accessor methods for the same ``type`` attribute. Worse, it's using a python built-in (``type``) which encourages other bad names down the stack. I searched high and low for any usage of this ``type`` attribute and any calls to instance methods ``get_type(), set_type(), and del_type()`` but found none. Signed-off-by: NChris Evich <cevich@redhat.com>
-
由 Chris Evich 提交于
Identified four unittests which were incorrectly sharing state internally and externally. In most cases the fixes were simple: isolate test state for every test via setup(). In the case of tests needing to mock virsh functions, I took the extra precautionary step of forcing them to first over-ride ALL virsh functions/methods with an exception. This way, any functions that should be mocked in unittests but are not, will be immediatly clear :) Signed-off-by: NChris Evich <cevich@redhat.com>
-
由 Chris Evich 提交于
All entry points must import the common module. Signed-off-by: NChris Evich <cevich@redhat.com>
-
由 Chris Evich 提交于
The Virsh class automatically sucks in all callable symbols found in the module and converts them into methods. However, an omission from the exclusion list caused the VirshConnectBack class to be needlessly exposed as a method (since classes are callable). This has the potential to mess with unittests which must mock Virsh methods, but at the same time may need to use this class. Adding it to the exclusion list will prevent those problems.
-
由 Chris Evich 提交于
Devices were not properly having the virsh instance passed on to them. Signed-off-by: NChris Evich <cevich@redhat.com>
-
由 Chris Evich 提交于
There is a secondary set of propcan instances used behind the scenes inside accessor factories. Whenever they were trying to retrieve non-existing data, or receive invalid input, they toss a variaety of LibvirtXMLError exception sub-classes by API design. However, this doesn't jive with the standard attribute/dictionary key-check method behavior. The libvirt_xml API is defined such that all internally sourced problems always throw a LibvirtXMLError exception or subclass. However, since libvirt_base is also a propcan subclass, these classes were get in the way of the regular python __contains__ and has_key() behavior. This change makes LibvirtXML subclasses all conform to the python dict and instance-attribute access convention. Without it, one would need to wrap the 'has_key()' call inside a try...except LibvirtXMLError, which is unnatural. Signed-off-by: NChris Evich <cevich@redhat.com>
-
由 Chris Evich 提交于
Added ability to get/set/del '<model type=>' element + attribute. Signed-off-by: NChris Evich <cevich@redhat.com>
-
由 Chris Evich 提交于
Since PropcanBase is now fully pickle-able, there is no need for custom string-conversion (which was used for pickling in virtnet). Removed these special methods to just let normal python dict string conversion take over. Signed-off-by: NChris Evich <cevich@redhat.com>
-
由 Chris Evich 提交于
Signed-off-by: NChris Evich <cevich@redhat.com>
-
由 Li Yang 提交于
Signed-off-by: NLi Yang <liyang.fnst@cn.fujitsu.com>
-
- 19 11月, 2013 6 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
由 Lucas Meneghel Rodrigues 提交于
Modifying spice cfg file to use nettype = bridge
-
由 Yu Mingfei 提交于
Signed-off-by: NYu Mingfei <yumingfei@cn.fujitsu.com>
-
由 Lukáš Doktor 提交于
virttest: Record the output from QMP monitor when failed to get the gree...
-
由 Yang Feng 提交于
virttest: Update khugepaged test timeout
-
由 Swapna Krishnan 提交于
-
- 18 11月, 2013 4 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
由 Yang Feng 提交于
Fix a typo in netperf result
-
由 Amos Kong 提交于
We compute rpkt_per_exit by tx_pkts, and compute tpkt_per_exit by rx_pkts. It's wrong. Signed-off-by: NAmos Kong <akong@redhat.com>
-
由 Yiqiao Pu 提交于
Record the json output from QMP monitor when we raise the MonitorProtocolError. It may help us to analyse what failed this step. Signed-off-by: NYiqiao Pu <ypu@redhat.com>
-
- 15 11月, 2013 8 次提交
-
-
由 Chris Evich 提交于
Signed-off-by: NChris Evich <cevich@redhat.com>
-
由 Yu Mingfei 提交于
Signed-off-by: NYu Mingfei <yumingfei@cn.fujitsu.com>
-
由 Yu Mingfei 提交于
Signed-off-by: NYu Mingfei <yumingfei@cn.fujitsu.com>
-
由 Kyla Zhang 提交于
Signed-off-by: NKyla Zhang <weizhan@redhat.com>
-
由 Kyla Zhang 提交于
Signed-off-by: NKyla Zhang <weizhan@redhat.com>
-
由 Kyla Zhang 提交于
1. change the function place and improve implementation 2. Add option for sync Signed-off-by: NKyla Zhang <weizhan@redhat.com>
-
由 Kyla Zhang 提交于
1. Add snapshot-edit, snapshot-parent command 2. Modify snapshot-current to output xml/name or command output Signed-off-by: NKyla Zhang <weizhan@redhat.com>
-
由 Yiqiao Pu 提交于
As the khugepaged process will quit slowly in some OS, enlarge the timeout for khugepaged test from 5s to 50s. And also use the method that check process status in a while loop which will break when the khugepaged process status is changed as expect instead of time.sleep(timeout). Signed-off-by: NYiqiao Pu <ypu@redhat.com>
-
- 14 11月, 2013 3 次提交
-
-
由 Yiqiao Pu 提交于
The old method to get expect machine type can not fit machine type check for q35 and pc. So update it by get the machine type string from the output of qemu-kvm -M ?. Signed-off-by: NYiqiao Pu <ypu@redhat.com>
-
由 Ruda Moura 提交于
Test possible values for option '--log-level' based on a list of fixed log level names (stored in SUPPORTED_LOG_LEVELS). Signed-off-by: NRuda Moura <rmoura@redhat.com>
-
由 Ruda Moura 提交于
Initial effort to add the parameter "--log-level" when running tests, to control the log level. For example: ./run -t qemu --log-level=error Will only log ERROR messages. Note that The default value remains DEBUG level. Currently it only applies to log/debug.log. Signed-off-by: NRuda Moura <rmoura@redhat.com>
-