[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Xen automated testing framework
> On Fri, 2005-01-21 at 22:58 +0000, Ian Pratt wrote: > > It would be great if someone with spare machines could run these > > benchmarks on the nightly snapshots and record the results. Running > > various milestones since the 2.0 (or even 1.2) release would be good too > > for comparison. > We'll have some machines doing that once we get a workable tool in > place. The tool is the first priority so that hopefully even more > people could do this if interested. > > We'd also like to add tests to this as development goes forward. So, if > anyone has xen-specific tests, feel free to send them my way! I'd like > to start putting together a testsuite for this at some point. One area where it would be useful to have specific tests is to exercise the various mechanisms for accessing thread local storage that have been used by different versions of libc. Ideally, these tests would be run simultaneously in two domains running on the same CPU, to ensure everything gets context switched OK. I've appended a little test written by Keir that exercises fs/gs with segments from an LDT. We should probably augment it with tests that use set_thread_area. Has LTP already got tests that exercise NPTL? Running these in two domains on the same CPU may be sufficient. Another area where it would be worth writing Xen specific tests is to test time by comparing the progress of gettimeofday against the cycle counter to ensure that it progresses monotonically and 'smoothly' when the domain is running, and to compare it against the RTC to check the rate. I've previously posted a test that does part of this. Ian -- #include <stdio.h> #include <stdlib.h> /* Structure passed on `modify_ldt' call. */ struct modify_ldt_ldt_s { unsigned int entry_number; unsigned long int base_addr; unsigned int limit; unsigned int seg_32bit:1; unsigned int contents:2; unsigned int read_exec_only:1; unsigned int limit_in_pages:1; unsigned int seg_not_present:1; unsigned int useable:1; unsigned int empty:25; }; static void DO_CLEAR_LDT(unsigned int nr) { int rc; struct modify_ldt_ldt_s ldt_entry = { nr, (unsigned long)0, 0, 0, 0, 0, 0, 0, 0, 0 }; __asm__ __volatile__ ( "int $0x80" : "=&a" (rc) : "0" (123), "b" (1), "c" (&ldt_entry), "d" (sizeof(ldt_entry))); if (rc != 0) { printf("Urk! %d\n", rc); exit(0); } } static void DO_MODIFY_LDT(void *descr, unsigned int nr) { int rc; struct modify_ldt_ldt_s ldt_entry = { nr, (unsigned long)descr, 0xfffff /* 4GB in pages */, 1, 0, 0, 1, 0, 1, 0 }; printf("Setting LDT entry...\n"); __asm__ __volatile__ ( "int $0x80" : "=&a" (rc) : "0" (123), "b" (1), "c" (&ldt_entry), "d" (sizeof(ldt_entry))); if (rc != 0) { printf("Urk! %d\n", rc); exit(0); } printf("LDT entry set.\nLoading FS...\n"); __asm__ __volatile__ ("movw %w0, %%fs" : : "q" (nr * 8 + 7)); printf("FS loaded.\n"); } unsigned long segment [8192] = { 0xaaaaaaaa }; int main(int argc, char **argv) { int i = 0, nr; unsigned long foo, fs, gs; memset(segment, 0xaa, sizeof(segment)); if ( argc != 2 ) { printf("Usage: %s <entry number>\n", argv[0]); return 0; } nr = atoi(argv[1]); printf("Going for desc %d\n", nr); DO_MODIFY_LDT(segment, nr); __asm__ __volatile__ ("movl %%fs:(%0),%0" : "=&a" (foo) : "0" (0) ); printf("Found %08lx\n", foo); while ( 1 ) { usleep(10000); __asm__ __volatile__ ( "pushl %%fs; pushl %%gs; popl %%eax; popl %%ebx" : "=a" (gs), "=b" (fs) ); // if ( ((fs&0xffff) != (nr*8+7)) ) printf("Urkle! %08lx %08lx\n", fs, gs); DO_CLEAR_LDT(nr); if ( i++ == 100 ) { i = 0; printf("."); fflush(stdout); } } return 0; } ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |