aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xm-test/lib
Commit message (Collapse)AuthorAgeFilesLines
* xm-test: An additional ACM security test case for the test suite.Keir Fraser2007-12-061-1/+7
| | | | Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* Implement legacy XML-RPC interface for ACM commands.Keir Fraser2007-12-051-47/+11
| | | | | | | | | | | | | | | | | | | | | | | | This patch implements a (non Xen-API) legacy XML-RPC interface for the ACM commands and funnels the calls into code introduced by the Xen-API support for ACM security management. Since some of the functionality has changed, also the xm applications have changed. In particular the following old commands have been removed along with some tools the have become obsolete now: - loadpolicy (included in: setpolicy) - makepolicy (included in: setpolicy) - cfgbootpolicy (included in: setpolicy) and the following commands been introduced: - setpolicy - getpolicy - resetpolicy All tools have been adapted to work in Xen-API and legacy XML-RPC mode. Both modes support the same functionality. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* xm-test: various fixesKeir Fraser2007-10-251-2/+9
| | | | | | | | | | | - recently I added an other_config field to the VTPM record which now needs to be accounted for otherwise the test determines a bad key - the dry-run command was throwing a different type of exception (ACMError) than what was caught (XSMError) - the tests based on the raw Xen-API need to build the PV_args parameters from the old 'root' and 'extra' parameters. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* Replace sysctl.physinfo.sockets_per_node with more directly usefulKeir Fraser2007-10-192-5/+2
| | | | | | | | sysctl.physinfo.nr_cpus. This also avoids miscalculation of sockets_per_node by Xen where the number of CPUs in the system is clipped. From: Elizabeth Kon <eak@us.ibm.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* xm-test: Fix bugzilla #1051.Keir Fraser2007-10-021-1/+1
| | | | | | | | This is a patch to fix xm-test's network errors http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1051 From: Lukasz Szymanski <Lukasz.Szymanski@unisys.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* [XM-TEST] Fixes a parameter to the external tools usedKeir Fraser2007-09-201-1/+1
| | | | Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* [xm-test] Set "console=xvc0" for xm-test guests on Intel architecture platforms.James Bulpin2007-09-111-1/+6
| | | | | | | Tests have been failing because the console for the test ramdisk wasn't using xvc0 so testcases were not able to interact with it. Signed-off-by: James Bulpin <james@xensource.com>
* Fix xm-test python import after XSM security changes.kfraser@localhost.localdomain2007-09-061-1/+1
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* xm-test: Allow dom0 network interface used in tests to be overridenJames Bulpin2007-08-123-7/+10
| | | | ./configure --with-dom0-intf=<intf> (default vif0.0)
* [ACM] Some more fixeskfraser@localhost.localdomain2007-07-301-0/+4
| | | | | | | | | | | - don't reload the policy if it has been loaded - don't always load the policy in the test suite when the policy is already loaded - skip tests 07 and 09 when ACM is not enabled and xm is not using the Xen-API - fix a problem when trying to remove an invalid label Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* [Xm-Test] Additional tests for the xm-test suitekfraser@localhost.localdomain2007-07-182-9/+47
| | | | | | | This adds a couple of test cases exercising the new policy management functionality to the security tests. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* xm-test: ia64 min memory & arbitrarily large ramdiskkfraser@localhost.localdomain2007-05-241-0/+14
| | | | | | | | | | | | | | | | | | | 1) Sets a minimum of 128MB RAM for an ia64 domU; this limit was set after experimentation, which seems to indicate it's a reasonable lower limit (the 32MB limit previously in place did not allow an ia64 domU to start). If there's any problem with this, I don't mind splitting the patch and sending it to the ia64 list, but it was small, so I hope it's okay to include it. 2) xm-test uses ramdisks built with uClibc, which doesn't compile on ia64. I was able to create a ramdisk by hand, but as it was too large, the resultant domU crashed after boot. This patch enables the use of an arbitrarily large ramdisk, so long as it's uncompressed. As xm-test builds only uncompressed ramdisks, I figured this was reasonable for that specific application. Suggestions on how to detect and handle a compressed ramdisk would be welcome. Signed-off-by: Alex Williamson <alex.williamson@hp.com>
* [XM-TEST] Move network_utils.py to lib directoryTom Wilkie2007-04-261-0/+60
| | | | signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
* xm-test: Scale memory parameter for tests using XenAPIDomain.kfraser@localhost.localdomain2007-04-241-0/+2
| | | | | | | | | Scale the memory parameter for domains using the XenAPIDomain to create a domain. Those domains use the normal configuration where the memory parameter is given in 'Mb', so it needs to be adapted to 'bytes'. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* Make Xm Test default to bridge when cannot read config fileTom Wilkie2007-04-121-1/+5
| | | | signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
* Remove unused import; library movedTom Wilkie2007-03-281-1/+0
| | | | signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
* Replace tabs with spaces.Ewan Mellor2007-03-235-15/+15
| | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* Use the new xen-python-path to set PYTHONPATH, rather than trying to do it inEwan Mellor2007-02-011-20/+0
| | | | | | XmTestLib.__init__ (and getting it wrong). Signed-off-by: Ewan Mellor <ewan@xensource.com>
* Copy the definition of DOM0_UUID into XenDomain so that we don't need to importEwan Mellor2007-02-011-0/+3
| | | | | | large swathes of the server to run the Xen-API tests. Signed-off-by: Ewan Mellor <ewan@xensource.com>
* This patch does the following:Ewan Mellor2007-01-113-65/+81
| | | | | | | | | | | | | | | - renames the XenManagedDomain.py file to XenAPIDomain.py, since this name better reflects its functionality/purpose - adds domain tracking to the XenAPIDomain class so that xend-managed domains can be deleted in an 'atexit' handler upon test case termination - adds one basic xapi-related test which is part of the grouptests 'xapi' - refactors the vtpm-related test using xen-api and adds it to the grouptest 'xapi' - adds documentation to the README for how to configure xm and xend to use XML-RPC or Xen-API for communication Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* I added a parameter '-md' to 'runtest.sh' for running the xm test suiteEwan Mellor2007-01-111-0/+2
| | | | | | | | | | in a mode where all created domains a created as xend-managed domains. This patch also fixes a problem related to calling 'xm domid' on a currently suspended domain if that domain is a managed domain. In that case a 'None' is returned by Xend, which I default to '-1'. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* This simple patch allows domains created in the xm-test suite to beEwan Mellor2007-01-092-4/+67
| | | | | | | | created as managed domains using either a parameter to the XenTestDomain() constructor or by setting the environment variable XM_MANAGED_DOMAINS and running the tests with it. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* Only try to label resources if ACM is enabled.Ewan Mellor2006-12-161-0/+2
| | | | Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* merge with xen-unstable.hgawilliam@xenbuild.aw2006-12-051-2/+3
|\
| * This adds a recently added parameter to the vm.start call.Ewan Mellor2006-12-041-2/+3
| | | | | | | | Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* | merge with xen-unstable.hgawilliam@xenbuild.aw2006-12-042-0/+242
|\|
| * Revert the change to destroy all VMs when skipping or failing tests -- thisEwan Mellor2006-12-031-3/+0
| | | | | | | | | | | | | | | | needs more thought, because people shouldn't need to set up their Xen-API server to run the non-Xen-API bits of the test, and at the moment, you get authentication failures on every SKIP. Signed-off-by: Ewan Mellor <ewan@xensource.com>
| * MergeAlastair Tse2006-12-017-0/+0
| |
| * Use the new xen-api.sock for the calls to the Xen-API server.Ewan Mellor2006-12-011-1/+1
| | | | | | | | Signed-off-by: Ewan Mellor <ewan@xensource.com>
| * This patch provides XmTestManagedDomain and XenManagedDomain classesEwan Mellor2006-12-013-0/+245
|/ | | | | | | | | | | | | | | | | | | similar to the XmTestDomain and XenDomain classes. I have wrapped the xen-api for VM configuration creation, starting and stopping of VMs and destruction of the VM configuration in the XenManagedDomain class's methods. No device-related functions are provided through the class. The managed domains' UUIDs are tracked and all created VMs are destroyed upon failure or skipping of the test or by calling xapi.vm_destroy_all(). I am adding a new grouptest 'xapi' for running xen-api tests. Only caveat: I am using an empty username and password (XmTestList/xapi.py) with Xend's authentication deactivated to run these tests. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* This fixes another missing part for x86-64 support in the xm testsuite.Ewan Mellor2006-11-011-0/+4
| | | | Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* [XEN] Replace hvm_setup_platform() with hvm_domain_initialise()kaf24@localhost.localdomain2006-11-051-1/+0
| | | | | | | | and extra code in hvm_vcpu_initialise(). Remove 'apic' config option -- HVM CPUs will always have an APIC (which should be set up in virtual wire mode for backward compatibility, just as in a real system). Signed-off-by: Keir Fraser <keir@xensource.com>
* Add x86_64 to the supported architectures since otherwise the testsEwan Mellor2006-10-241-1/+2
| | | | | | don't run. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* This puts two small fixes in the xm-test suite:Ewan Mellor2006-10-241-1/+1
| | | | | | | | - it turns off verbose mode of the ACM module - copies the test policy to the policies directory only if the directory has been created Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* Default to appending to "extra" in XenConfig.Ewan Mellor2006-10-231-0/+3
| | | | | | | PowerPC needs console information from the command line. Resetting the whole command line causes false failures. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
* Add ability to inspect messages from domain for arbitrary strings.Ewan Mellor2006-10-232-0/+25
| | | | | | Used on PowerPC to FAIL(), if the guest domain hits a BUG() and enters XMON. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
* Add configuration data for powerpc.Ewan Mellor2006-10-232-0/+32
| | | | | | Allows for building of initrd, and running of tests. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
* Refactor code to encapsulate architecture decisions in one place.Ewan Mellor2006-10-234-66/+161
| | | | | | Also includes some whitespace fixes. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
* [TPM] Allow all tests of the xm test suite to be run when ACMkfraser@localhost.localdomain2006-10-183-2/+18
| | | | | | | | | | | | | | security is turned on in hypervisor. This is done by implicitly labeling VMs and resources if they have not been labeled through explicit calls. To allow the xm tests suite to label resources automatically, run ./configure --enable-full-labeling once. To turn it off, the '--enable-full-labeling' parameter should be omitted. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* [TPM] Add tests cases for the ACM security hooks and tools tokfraser@localhost.localdomain2006-10-182-0/+82
| | | | | | | | | | | | | | | | | | | | | | the xm test suite. The tests can be run with ACM turned off (not compiled into Xen; see user doc for this), but most of them will be skipped then. They can be run with a command like make -C tests/security-acm check-TESTS from the xm-test directory. They are also part of the default tests in the tests suite and part of a new group test 'security'. Since some of the tests require resources to be labeled, one must explicitly enable the resources to be allowed to be labeled by the test suite by running ./configure --enable-full-labeling once. To turn it off, the '--enable-full-labeling' parameter should be omitted. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* [XM-TEST] Fix network tests for -route and -natkaf24@localhost.localdomain2006-08-121-0/+1
| | | | | | | | | | | | vif-nat and vif-route need to know domU ethX IP addresses in order to set up the appropriate routes.The new network test infrastructure is not providing the IP address on the vif line in /tmp/xm-test.conf; adding it turns out to be a one-liner. Tested with xm-test running with -bridge, -route, and -nat network scripts. Signed-off-by: Jim Dykman <dykman@us.ibm.com>
* [XM-TEST] Improve detection of a guest having booted to prompt.kaf24@firebug.cl.cam.ac.uk2006-06-191-29/+39
| | | | | | | | | | | | | | | | | | Lots of xm-test tests are failing with console timeouts on some machines at the moment. I reproduced the problem and found it was due to some probing activity in the boot process of the -xen kernel. The behaviour of the current xm-test code is to assume that the boot process has finished after performing three one-second waits for input---when the probing activity introduces more than three one-second delays the test suite breaks. This patch changes the test suite to wait for the command prompt before attempting to submit a command. The timeout is increased from 3 seconds to 3 minutes but the wait exits early when the prompt is found so the test suite doesn't take any longer to run. Signed-off-by: Harry Butterworth <butterwo@uk.ibm.com>
* Abstract block-attach and block-detach calls, and add to that the correctemellor@leeni.uk.xensource.com2006-05-071-0/+53
| | | | | | | polling waiting for the device to connect and disconnect. Signed-off-by: Ewan Mellor <ewan@xensource.com>
* Move the logic to find the Xen Python scripts above the import statements.emellor@leeni.uk.xensource.com2006-05-061-7/+10
| | | | | Signed-off-by: Ewan Mellor <ewan@xensource.com>
* Use the auxbin module to find the appropriate install directory for our Pythonemellor@leeni.uk.xensource.com2006-05-051-3/+17
| | | | | | | | | scripts. This fixes a bug with xm-test not working on 64-bit systems. Signed-off-by: Ewan Mellor <ewan@xensource.com>
* Add new networking infrastructure to Xm-Test. The goal is to makestekloff@dyn9047022152.beaverton.ibm.com2006-05-046-113/+625
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | creating domains with networking very easy. This patch: 1) Adds new XenDevice class, with the XenNetDevice subclass. These classes represent devices for xm-test and are tied to XenDomains. This can eventually be used for block devices as well. Currently, devices must be added to domains prior to starting the domain. The attach and detach needs to be handled. 2) Adds a new NetConfig class to handle configuring the network environment in which the tests run. This patch only handles ranges of IPs in a bridged environment. DHCP needs to be added as well as handling NAT and routed environments. 3) Modifies XenDomain class to handle XenDevices. 4) Adds new configuration options for defining a range of IPs, their network address, and their netmask. 5) Removes the old Network.py and Network class. 6) Modifies the existing tests to use the new infrastructure. 7) Adds some documentation to help creating domains. Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
* Second step toward a new network infrastructure, move XmConsole to beemellor@leeni.uk.xensource.com2006-05-043-8/+50
| | | | | | | | | in XenDomain. The devices we will add, like network, will need to run console commands when a domain is started. So I have made console be a part of domain object, which it's tied to anyway. Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
* First step to network infrastructure, add a type to XenDomain to identifystekloff@dyn9047022152.beaverton.ibm.com2006-05-041-5/+13
| | | | | | | | | | it as HVM or PV rather than using the config time option. The forthcoming XenNetDevice will need to check. This is also the first step toward running PV and HVM domains at the same time. Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
* Small Memory fix patch #2: I forgot to change the XmTestDomain methodstekloff@dyn9047022152.beaverton.ibm.com2006-04-191-1/+1
| | | | | | | | minSafeMem from 16 to 32. Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
* Fix the 15_create_smallmem_pos.py test, which was failing because thestekloff@dyn9047022152.beaverton.ibm.com2006-04-191-2/+2
| | | | | | | | | | | | | | | | | | | | set console.limit command in the test was never being run. The select in Console.py was never timing out because there was always someting to read on the fd, the OOM messages are constant. So the test would hang. The fix includes: 1) Changing MEM in 15_create_smallmem_pos.py to 32MBs, which is the default for the tools that should work. 2) Change the XmConsole init to add an argument to set the console limit when it's created. 3) Set a default large limit for console so we won't hang in the future. 4) Added a new 16_create_smallmem_neg.py test to handle failure situation. 5) Added comment in README. Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>