Commit Graph
266 Commits
Author SHA1 Message Date
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 66b0efa936 xm-test: Have domains deleted if they are managed domains
Have the domains deleted if they are managed by xend and the tests are
run with '-md' as parameter to runtest.sh.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-03-03 10:54:24 +00: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 53f48ca221 Fix some build system error handling.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2007-12-20 13:16:21 +00:00
Keir Fraser 343a76fb58 xm-test: Don't run security test if ACM is not enabled.
I forgot to put in the check to prevent this test case from running
when ACM is not compiled into Xen. I am resetting the policy so that
an update with the prepared policy can be done without changing that
policy's header to match the current policy's version.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-12-10 12:02:46 +00:00
Keir Fraser 8256ad693d xm-test, acm: fixes an API call due to recent changes.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-12-08 15:47:31 +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 f0a8a3f3fb [VTPM] Make vTPM hotplug scripts use the UUID of the vTPM instance
Make the vTPM hotplug script use the UUID of the vTPM instance for
associating it with its instance number rather than the name of the
domain.
Also change the cleanup in the xm test to use the atexit mechanism
rather than explicitly calling a function to clean up.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-07-17 10:33:26 +01:00
kfraser@localhost.localdomain be259653f3 Extended the physinfo sysctl to export NUMA cpu_to_node topology info.
Print this in 'xm info'.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-06 16:12:07 +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 fc0ab3e65a [XM-TEST] Add test for new network functions
signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2007-04-26 16:15:08 +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 8c706ec28d acm: Changes to XML schema of the policy
This patch changes the XML schema of the ACM policy to require a
version and that every conflict set have a name. Every VM label must
have one Chinese Wall Type and every resource label one Simple Type
Enforcement Type. As a consequence of this some example policies
needed to be changed. Also not offering that many configuration
options for compiling xen anymore to make things simpler.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-04-25 09:31:52 +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
Keir Fraser 37b9dfbf71 [vtpm] Return a proper error when in the Xen-API call.
Fix a bug in the test.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-04-19 19:29:45 +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
Tom Wilkie 54a101a7dd Make 06_destroy_dom0_neg pass with xm via XenAPI.
Make check case insensitive.

signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2007-03-26 16:18:16 +01:00
Ewan Mellor a48a059e84 Fix typos.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2007-03-23 11:12:25 +00: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 282cd380d9 Change the eyecatcher to be case-insensitive, so that "Internal error" is
detected.

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2007-03-20 17:26:05 +00:00
Ewan Mellor 06979e1dc4 Have xm-test wait for the network device to detach. This is an asynchronous
process, so xm-test needs to poll.

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2007-03-20 16:52:33 +00:00
Ewan Mellor a72d446f86 Fix typo in xm-test.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2007-03-14 21:37:00 +00:00
kfraser@localhost.localdomain f4575fb04a [XM-TEST] vTPM test changes
Remove an uninitialized variable.
For some reason the 'ps aux' command does not see the process anymore
(since some time on the weekend). Need to add 'COLUMNS=n'.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-03-13 09:52:51 +00:00
Ewan Mellor 81c452f998 Make the VTPM.destroy method return 'void' upon success and adapt the
test case to reflect that.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-03-09 02:32:52 +00:00
kfraser@localhost.localdomain 8705acb340 xm-test, acm: Use xvda* device name instead of sdb* device inside guest domain.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-02-26 09:13:50 +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
kaf24@localhost.localdomain a36b1fbb02 Align vTPM support in the Xen-API, documentation and lib-xen
(after the recent changes).

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-01-30 14:51:05 +00:00
Alastair Tse 54210714d5 [XM-TEST] Allow building of ramdisk on x86_64
Signed-off-by: Alastair Tse <atse@xensource.com>
2007-01-23 11:39:32 +00:00
Alastair Tse c1e978c7cf [XEND] Fix get_dev_property_by_uuid
This patch replaces calls to get_dev_property() by calls to
get_dev_property_by_uuid() in XenAPI.py and fixes the implementation
of get_dev_property_by_uuid.

I am adding a test case to the xapi grouptests to verify the fixes.
There's a FIXME note in the test case which should be looked at.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-01-22 17:23:53 +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 e3e7d81e41 Update sched-credit test to match new format from xm sched-credit.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2007-01-09 17:38:48 +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 e4658203b4 Add needed modules to the ramdisk if the modules exist on the current system.
(i.e. the current system contains a modularized kernel)

Signed-off-by: Lynn Bendixsen <lbendixs@novell.com>
2007-01-09 17:23:22 +00:00
Steven Hand 2ea27d8c99 [XM-TEST] Tweak 06_block-destroy_check_list_pos to allow more time to check
block device has gone away from point of view of domain sxp.

Signed-off-by: Steven Hand <steven@xensource.com>
2007-01-04 15:08:40 +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@xenbuild2.aw 0741834153 merge with xen-unstable.hg 2006-12-08 09:09:18 -07:00