Commit Graph
96 Commits
Author SHA1 Message Date
Matthew Fioravante b918dce5bb tools: Remove the vtpm process model
Remove the old vtpm process model. It doesn't work very
well and is no longer supported.

Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-11-13 10:47:00 +00:00
Keir Fraser 6102cace93 Remove unmaintained Access Control Module (ACM) from hypervisor.
Signed-off-by: Keir Fraser <keir@xen.org>
2011-03-25 21:47:57 +00:00
Keir Fraser c64f368519 cpupools [5/6]: xm-test add-ons
Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
2010-04-21 12:51:13 +01:00
Keir Fraser f0321cbffa Fix xapi xm-tests.
There were a couple of small bugs in the xapi xm-test:
o outdated XenAPI calls were removed from testcase
  (02_xapi-vbd_basic)
o minor problem with XendLocalStorageRepository
  is fixed (missed list_images() function - which
  is moved from the XenQCoWStroageRepo to the common
  base class XendStorageRepository)
  which was detected running 02_xapi-vbd_basic.
o XenAPI session handling and connecting is fixed.
o 03_xapi-network_pos was rewritten and now uses
  XenAPI.

Signed-off-by: Andreas Florath <xen@flonatel.org>
2009-08-20 10:30:53 +01:00
Keir Fraser 5239cb1be7 xm-test: fix network13 test (protocol and extensions)
Attached there is a patch that fixes the used protocol (was udp - but
nobody was listening...) to icmp echo and added the extension, that
the dom0 and the other guest ips are also pinged.
Because of the many different scenarios (three nested loops) over
packet sizes, two guests and different ip addresses, one run of this
test case takes now about 4.5 minutes.

Signed-off-by: Andreas Florath <xen@flonatel.org>
2009-08-05 13:38:38 +01:00
Keir Fraser 41859f6925 xm-test: Fix memset 01 and 02 tests: add support for sysfs memory interface
From: Andreas Florath <xen@flonatel.org>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-29 09:20:46 +01:00
Keir Fraser ed072758a7 tools: remove hard coded paths in example config files
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-06-24 11:17:11 +01:00
Keir Fraser 7468faf8d3 xm-test: Identifying the network env specified in xend config fails,
if an additional parameter is given for the network-bridge
(e.g. netdev=eth1) The patch splits the network command into the
command name and its parameters to determine the netenv (bridge,
route, nat)

Signed-off-by: juergen.gross@fujitsu-siemens.com
2009-03-06 18:56:28 +00:00
Keir Fraser 2bb1ceab62 Fix up python breakage for blkdev_name_to_number
Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-06-30 10:01:44 +01:00
Keir Fraser 1aa3c54a31 Remove defunct powerpc port.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-08 13:40:40 +01:00
Keir Fraser aac518b954 tools/docs: Fix example and default IP addresses.
In various places in documentation and code, IP addresses are provided
as examples, defaults, or dummy configuration.  In general the
specific IP addresses used in Xen are not always appropriate.  (For
example, 1.2.3.4 is used in a few places!)

The following addresses should be used:
 * For examples and documentation, 192.0.2.0/24.  (See RFC3330.)
 * For defaults for private networks, a random network from RFC1918.
   I have randomly selected 172.30.206.0/24 for this purpose and
   documented this in at the only registry I know of,
   www.ucam.org/cam-grin.  This network should henceforth be used for
   default configurations of local bridges, test networks, etc. in
   Xen tools.

The following addresses should NOT be used:
 * 10.0.*.*, 10.1.*.*, 192.168.0.*, 192.168.1.*, etc.  Using these
   addresses gives greatly increased likelihood of collision, as
   ignorant network administrators and reckless middlebox vendors
   often pick networks from the bottom of 10/8 and 192.168/16.
 * 169.254.*.*.  These are reserved for zeroconf (ad-hoc networking)
   and should not be used for Xen private networks, bridges, etc.,
   etc.  Use of these addresses by Xen scripts causes trouble on hosts
   (eg laptops) which find themselves in ad-hoc networking
   environments.  I think this is not hypothetical (!) since at least
   one Linux distribution have specific code to detect this case and
   cause Xen startup to fail iff the host already has an external
   zeroconf address.
 * 1.2.3.4.  WTF !?

I have also used 127.0.255.255 in one place where apparently a dummy
address is needed (some Linux kernels won't accept a lack of an NFS
server address).  If 127.0.255.255 is mistakenly used it is unlikely
to do any damage to real traffic even if it does escape into the
network at large.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-17 15:13:40 +00:00
Keir Fraser a814f6cd0f xm-test: An additional ACM security test case for the test suite.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-12-06 12:12:29 +00:00
Keir Fraser 0ea4d2fb34 Implement legacy XML-RPC interface for ACM commands.
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>
2007-12-05 09:44:20 +00:00
Keir Fraser 61d0b64c6c xm-test: various fixes
- 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>
2007-10-25 09:22:28 +01:00
Keir Fraser 07f557cb63 Replace sysctl.physinfo.sockets_per_node with more directly useful
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>
2007-10-19 18:00:10 +01:00
Keir Fraser c624ac637e xm-test: Fix bugzilla #1051.
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>
2007-10-02 09:26:18 +01:00
Keir Fraser 5c7379ebbe [XM-TEST] Fixes a parameter to the external tools used
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-09-20 13:30:14 +01:00
James Bulpin a3b3c4c98b [xm-test] Set "console=xvc0" for xm-test guests on Intel architecture platforms.
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>
2007-09-11 19:11:02 +01:00
kfraser@localhost.localdomain 6325216369 Fix xm-test python import after XSM security changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-06 18:10:04 +01:00
James Bulpin 9119ea5153 xm-test: Allow dom0 network interface used in tests to be overriden
./configure --with-dom0-intf=<intf>  (default vif0.0)
2007-08-12 16:09:13 +01:00
kfraser@localhost.localdomain 9039ed2bed [ACM] Some more fixes
- 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>
2007-07-30 16:03:16 +01:00
kfraser@localhost.localdomain 05a6e5c04e [Xm-Test] Additional tests for the xm-test suite
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>
2007-07-18 10:08:37 +01:00
kfraser@localhost.localdomain 34a0b876d2 xm-test: ia64 min memory & arbitrarily large ramdisk
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>
2007-05-24 15:40:54 +01:00
Tom Wilkie 21cdf90f7a [XM-TEST] Move network_utils.py to lib directory
signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2007-04-26 15:48:09 +01:00
kfraser@localhost.localdomain da9c0e9184 xm-test: Scale memory parameter for tests using XenAPIDomain.
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>
2007-04-24 15:01:13 +01:00
Tom Wilkie de2c5005c6 Make Xm Test default to bridge when cannot read config file
signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2007-04-12 11:32:25 +01:00
Tom Wilkie 97fef381d6 Remove unused import; library moved
signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2007-03-28 15:31:17 +01:00
Ewan Mellor 69869aa632 Replace tabs with spaces.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-03-23 11:11:41 +00:00
Ewan Mellor edb08a7488 Use the new xen-python-path to set PYTHONPATH, rather than trying to do it in
XmTestLib.__init__ (and getting it wrong).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2007-02-01 14:41:58 +00:00
Ewan Mellor 6880c9f6b7 Copy the definition of DOM0_UUID into XenDomain so that we don't need to import
large swathes of the server to run the Xen-API tests.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2007-02-01 11:42:50 +00:00
Ewan Mellor baacea8058 This patch does the following:
- 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>
2007-01-11 19:00:35 +00:00
Ewan Mellor aeb7c09a66 I added a parameter '-md' to 'runtest.sh' for running the xm test suite
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>
2007-01-11 18:56:59 +00:00
Ewan Mellor 00e5248813 This simple patch allows domains created in the xm-test suite to be
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>
2007-01-09 17:25:28 +00:00
Ewan Mellor 92e6c93c21 Only try to label resources if ACM is enabled.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-12-16 12:54:43 +00:00
awilliam@xenbuild.aw 9d64d3ff83 merge with xen-unstable.hg 2006-12-05 10:01:15 -07:00
Ewan Mellor 89ebc69e6a This adds a recently added parameter to the vm.start call.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-12-04 19:13:55 +00:00
awilliam@xenbuild.aw 793cb77839 merge with xen-unstable.hg 2006-12-04 08:24:41 -07:00
Ewan Mellor 43bbe5bc96 Revert the change to destroy all VMs when skipping or failing tests -- this
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>
2006-12-03 13:30:23 +00:00
Alastair Tse 63f6456e92 Merge 2006-12-01 18:33:11 +00:00
Ewan Mellor 468c5c0084 Use the new xen-api.sock for the calls to the Xen-API server.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-01 17:40:07 +00:00
Ewan Mellor cebaab7c6b This patch provides XmTestManagedDomain and XenManagedDomain classes
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>
2006-12-01 17:37:09 +00:00
Ewan Mellor c51e990ede This fixes another missing part for x86-64 support in the xm testsuite.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-11-01 08:34:55 +00:00
kaf24@localhost.localdomain 6bc01e4efd [XEN] Replace hvm_setup_platform() with hvm_domain_initialise()
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>
2006-11-05 20:17:40 +00:00
Ewan Mellor 86ba178e4f Add x86_64 to the supported architectures since otherwise the tests
don't run.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-10-24 16:46:02 +01:00
Ewan Mellor 64dd1b77ae This puts two small fixes in the xm-test suite:
- 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>
2006-10-24 14:47:41 +01:00
Ewan Mellor c4549d574a Default to appending to "extra" in XenConfig.
PowerPC needs console information from the command line.  Resetting the whole
command line causes false failures.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
2006-10-23 10:17:10 +01:00
Ewan Mellor 1cbb1ec85e Add ability to inspect messages from domain for arbitrary strings.
Used on PowerPC to FAIL(), if the guest domain hits a BUG() and enters XMON.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
2006-10-23 10:16:20 +01:00
Ewan Mellor 7c0553c867 Add configuration data for powerpc.
Allows for building of initrd, and running of tests.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
2006-10-23 10:15:39 +01:00
Ewan Mellor 3c1dd690bc Refactor code to encapsulate architecture decisions in one place.
Also includes some whitespace fixes.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
2006-10-23 10:14:13 +01:00
kfraser@localhost.localdomain 8917832a55 [TPM] Allow all tests of the xm test suite to be run when ACM
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>
2006-10-18 16:08:58 +01:00