[PATCH kvm-unit-tests v2 3/8] Introduce memory barriers.

2010-08-31 Thread Jason Wang
Signed-off-by: Jason Wang --- lib/x86/smp.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/x86/smp.h b/lib/x86/smp.h index c2e7350..df5fdba 100644 --- a/lib/x86/smp.h +++ b/lib/x86/smp.h @@ -1,6 +1,10 @@ #ifndef __SMP_H #define __SMP_H +#define mb() asm

[PATCH kvm-unit-tests v2 2/8] Increase max_cpu to 64

2010-08-31 Thread Jason Wang
Signed-off-by: Jason Wang --- x86/cstart.S |2 +- x86/cstart64.S |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x86/cstart.S b/x86/cstart.S index ae1fdbb..bc8d563 100644 --- a/x86/cstart.S +++ b/x86/cstart.S @@ -6,7 +6,7 @@ boot_idt = 0 ipi_vector = 0x20

[PATCH kvm-unit-tests v2 1/8] Introduce some type definiations.

2010-08-31 Thread Jason Wang
Signed-off-by: Jason Wang --- lib/libcflat.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/libcflat.h b/lib/libcflat.h index d0d3df2..9cb90cf 100644 --- a/lib/libcflat.h +++ b/lib/libcflat.h @@ -23,10 +23,14 @@ #include typedef unsigned char u8; +typedef

[PATCH kvm-unit-tests v2 0/8] Tests for kvmclock

2010-08-31 Thread Jason Wang
64988 --- Jason Wang (8): Introduce some type definiations. Increase max_cpu to 64 Introduce memory barriers. Introduce atomic operations Export tsc related helpers Introduce atol() Add a simple kvmclock driver Add tests for kvm-clock config-x86-commo

Re: [PATCH kvm-unit-test 6/6] Add a test for kvm-clock

2010-08-29 Thread Jason Wang
- "Zachary Amsden" wrote: > On 08/26/2010 07:49 PM, Jason Wang wrote: > > This patch implements two tests for kvmclock. First one check > whether > > the date of time returned by kvmclock matches the value got from > > host. Second one check w

Re: [PATCH kvm-unit-test 6/6] Add a test for kvm-clock

2010-08-29 Thread Jason Wang
- "Glauber Costa" wrote: > On Fri, Aug 27, 2010 at 01:49:53PM +0800, Jason Wang wrote: > > This patch implements two tests for kvmclock. First one check > whether > > the date of time returned by kvmclock matches the value got from > > host. Second one c

Re: [PATCH kvm-unit-test 5/6] Add a simple kvmclock driver

2010-08-29 Thread Jason Wang
- "Glauber Costa" wrote: > On Fri, Aug 27, 2010 at 01:49:45PM +0800, Jason Wang wrote: > > +#define unlikely(x)__builtin_expect(!!(x), 0) > > + > > +struct pvclock_vcpu_time_info hv_clock[MAX_CPU]; > this structure have to be 4-byte aligned. Let th

Re: [PATCH kvm-unit-test 6/6] Add a test for kvm-clock

2010-08-29 Thread Jason Wang
- "Glauber Costa" wrote: > On Fri, Aug 27, 2010 at 01:49:53PM +0800, Jason Wang wrote: > > This patch implements two tests for kvmclock. First one check > whether > > the date of time returned by kvmclock matches the value got from > > host. Second one c

[PATCH] KVM: pit: Do not check pending pit timer in vcpu thread

2010-08-27 Thread Jason Wang
Pit interrupt injection was done by workqueue, so no need to check pending pit timer in vcpu thread which could lead unnecessary unblocking of vcpu. Signed-off-by: Jason Wang --- arch/x86/kvm/i8254.c |9 - arch/x86/kvm/irq.c |7 +-- 2 files changed, 1 insertions(+), 15

[PATCH kvm-unit-test 6/6] Add a test for kvm-clock

2010-08-26 Thread Jason Wang
-01-01 00:00:00 UTC which could be easily get through date +%s and the max accepted offset value between the tod of guest and host. Signed-off-by: Jason Wang --- config-x86-common.mak |6 ++ x86/README|2 + x86/kvmclock_test.c | 145

[PATCH kvm-unit-test 5/6] Add a simple kvmclock driver

2010-08-26 Thread Jason Wang
Most of the codes were borrowed from arxh/x86/kernel/kvmclock.c. A special bit: PV_CLOCK_CYCLE_RAW_TEST_BIT is used to notify the driver to return unadjusted cycles. Signed-off-by: Jason Wang --- x86/kvmclock.c | 166 x86/kvmclock.h

[PATCH kvm-unit-test 4/6] Introduce atol()

2010-08-26 Thread Jason Wang
Signed-off-by: Jason Wang --- lib/string.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/lib/string.c b/lib/string.c index acac3c0..1f19f5c 100644 --- a/lib/string.c +++ b/lib/string.c @@ -30,3 +30,34 @@ void *memset(void *s, int c

[PATCH kvm-unit-test 3/6] Export tsc related helpers

2010-08-26 Thread Jason Wang
Signed-off-by: Jason Wang --- lib/x86/processor.h | 22 ++ x86/tsc.c | 16 +--- x86/vmexit.c| 15 --- 3 files changed, 23 insertions(+), 30 deletions(-) diff --git a/lib/x86/processor.h b/lib/x86/processor.h index 67d7ca5

[PATCH kvm-unit-test 2/6] Introduce atomic operations

2010-08-26 Thread Jason Wang
Signed-off-by: Jason Wang --- config-x86-common.mak |1 lib/x86/atomic.c | 38 +++ lib/x86/atomic.h | 164 + 3 files changed, 203 insertions(+), 0 deletions(-) create mode 100644 lib/x86/atomic.c create mode 100644 lib

[PATCH kvm-unit-test 1/6] Introduce memory barriers.

2010-08-26 Thread Jason Wang
Signed-off-by: Jason Wang --- lib/x86/smp.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/x86/smp.h b/lib/x86/smp.h index c2e7350..df5fdba 100644 --- a/lib/x86/smp.h +++ b/lib/x86/smp.h @@ -1,6 +1,10 @@ #ifndef __SMP_H #define __SMP_H +#define mb() asm

[PATCH kvm-unit-test 0/6] Kvmclock test

2010-08-26 Thread Jason Wang
The following series implements test of kvmlock. --- Jason Wang (6): Introduce memory barriers. Introduce atomic operations Export tsc related helpers Introduce atol() Add a simple kvmclock driver Add a test for kvm-clock config-x86-common.mak |7

[PATCH kvm-unit-tests v2 10/10] Add 32 bit smp initialization code

2010-08-26 Thread Jason Wang
Add smp initlaization codes for 32bit. This would make the 32bit smp tests available. Signed-off-by: Jason Wang --- x86/cstart.S | 179 -- 1 files changed, 173 insertions(+), 6 deletions(-) diff --git a/x86/cstart.S b/x86/cstart.S index

[PATCH kvm-unit-tests v2 09/10] Do not test IA32_EFER in 32bit mode.

2010-08-26 Thread Jason Wang
Signed-off-by: Jason Wang --- x86/msr.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/x86/msr.c b/x86/msr.c index 9c85369..c3e0014 100644 --- a/x86/msr.c +++ b/x86/msr.c @@ -49,9 +49,11 @@ struct msr_info msr_info[] = { .index = 0xc102, .name

[PATCH kvm-unit-tests v2 08/10] Do not check cr8 access when running in 32 bit

2010-08-26 Thread Jason Wang
CR8 is only available in long mode. Signed-off-by: Jason Wang --- x86/vmexit.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/x86/vmexit.c b/x86/vmexit.c index 819c24b..84c384d 100644 --- a/x86/vmexit.c +++ b/x86/vmexit.c @@ -49,6 +49,7 @@ static void vmcall(void

[PATCH kvm-unit-tests v2 07/10] Correct the tss size

2010-08-26 Thread Jason Wang
TSS size should be 104 bytes. Signed-off-by: Jason Wang --- x86/cstart64.S |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/x86/cstart64.S b/x86/cstart64.S index 5d358ad..ef09d82 100644 --- a/x86/cstart64.S +++ b/x86/cstart64.S @@ -68,7 +68,7 @@ tss: .rept

[PATCH kvm-unit-tests v2 06/10] Remove the duplicated rdmsr/wrmsr

2010-08-26 Thread Jason Wang
They have been implemented in lib/x86/processor.h. Also rename the cpuid to cpuid_test because cpuid have been defined. Signed-off-by: Jason Wang --- x86/msr.c| 16 +--- x86/vmexit.c | 20 +++- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a

[PATCH kvm-unit-tests v2 05/10] Drop print.S

2010-08-26 Thread Jason Wang
We've already had lib/printf.c. Signed-off-by: Jason Wang --- config-x86-common.mak |9 - x86/print.S | 31 --- 2 files changed, 4 insertions(+), 36 deletions(-) delete mode 100644 x86/print.S diff --git a/config-x86-common.mak b/confi

[PATCH kvm-unit-tests v2 04/10] Correct the path in README

2010-08-26 Thread Jason Wang
Signed-off-by: Jason Wang --- README | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README b/README index 6a83831..9c0c518 100644 --- a/README +++ b/README @@ -7,17 +7,17 @@ Tests uses a qemu's virtual test device, named testdev, for services like printi

[PATCH kvm-unit-tests v2 02/10] Remove trailing whitespaces

2010-08-26 Thread Jason Wang
Signed-off-by: Jason Wang --- config-x86-common.mak | 14 +++--- x86/access.c |2 +- x86/cstart64.S|4 ++-- x86/print.S |6 +++--- x86/sieve.c |2 +- x86/vm.c |6 +++--- 6 files changed, 17 insertions(+), 17

[PATCH kvm-unit-tests v2 03/10] Makefile cleanup

2010-08-26 Thread Jason Wang
Remove the obsoleted target and directories. Signed-off-by: Jason Wang --- Makefile |9 + 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 5347ce8..d25e6f2 100644 --- a/Makefile +++ b/Makefile @@ -30,10 +30,6 @@ CFLAGS += -O1 CFLAGS

[PATCH kvm-unit-tests v2 01/10] Do not track config.mak and kvmtrace

2010-08-26 Thread Jason Wang
config.mak was generated by configure and kvmtrace were compiled throuh makefile. Signed-off-by: Jason Wang --- config.mak |8 kvmtrace | Bin 2 files changed, 0 insertions(+), 8 deletions(-) delete mode 100644 config.mak delete mode 100755 kvmtrace diff --git a/config.mak b

[PATCH kvm-unit-tests v2 00/10] Minor cleanup and fix for

2010-08-26 Thread Jason Wang
32bit test The following series implements... Change from v1: Remove one quad word from RSP filed instead of IST. Compile out cr8 access test for 32bit test. --- Jason Wang (10): Do not track config.mak and kvmtrace Remove trailing whitespaces Makefile cleanup Correct

Re: [PATCH kvm-unit-tests 07/10] Correct the tss size

2010-08-26 Thread Jason Wang
- "Avi Kivity" wrote: > On 08/25/2010 04:00 PM, Jason Wang wrote: > > > > 00400bb8<__setup_args>: > >400bb8: 41 55 push %r13 > >400bba: 41 54 push %r12 > >400bbc:

Re: [PATCH kvm-unit-tests 07/10] Correct the tss size

2010-08-25 Thread Jason Wang
- "Avi Kivity" wrote: > On 08/25/2010 03:27 PM, Jason Wang wrote: > > - "Avi Kivity" wrote: > > > >> On 08/25/2010 12:40 PM, Jason Wang wrote: > >>> - "Avi Kivity" wrote: > >>> > &

Re: [PATCH kvm-unit-tests 07/10] Correct the tss size

2010-08-25 Thread Jason Wang
- "Avi Kivity" wrote: > On 08/25/2010 12:40 PM, Jason Wang wrote: > > - "Avi Kivity" wrote: > > > >> On 08/24/2010 04:47 PM, Jason Wang wrote: > >>> TSS size should be 104 byte. > >>> > >>> Signed-off-by:

Re: [PATCH kvm-unit-tests 07/10] Correct the tss size

2010-08-25 Thread Jason Wang
- "Avi Kivity" wrote: > On 08/24/2010 04:47 PM, Jason Wang wrote: > > TSS size should be 104 byte. > > > > Signed-off-by: Jason Wang > > --- > > x86/cstart64.S |2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > >

[PATCH kvm-unit-tests 10/10] Add the 32bit smp initialization code

2010-08-24 Thread Jason Wang
Add the smp initlaization codes for 32bit. This would make the 32bit smp tests available. Signed-off-by: Jason Wang --- x86/cstart.S | 179 -- 1 files changed, 173 insertions(+), 6 deletions(-) diff --git a/x86/cstart.S b/x86/cstart.S

[PATCH kvm-unit-tests 09/10] Do not test IA32_EFER in 32bit mode.

2010-08-24 Thread Jason Wang
Signed-off-by: Jason Wang --- x86/msr.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/x86/msr.c b/x86/msr.c index 9c85369..c3e0014 100644 --- a/x86/msr.c +++ b/x86/msr.c @@ -49,9 +49,11 @@ struct msr_info msr_info[] = { .index = 0xc102, .name

[PATCH kvm-unit-tests 08/10] Check whether in long mode before testing vmexit caused by cr8 access

2010-08-24 Thread Jason Wang
CR8 is only availabe when in long mode. Signed-off-by: Jason Wang --- x86/vmexit.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/x86/vmexit.c b/x86/vmexit.c index 819c24b..34b0af4 100644 --- a/x86/vmexit.c +++ b/x86/vmexit.c @@ -48,6 +48,7 @@ static void

[PATCH kvm-unit-tests 06/10] Remove the duplicated rdmsr/wrmsr

2010-08-24 Thread Jason Wang
They have been implemented in lib/x86/processor.h. Also rename the cpuid to cpuid_test because cpuid have been defined. Signed-off-by: Jason Wang --- x86/msr.c| 16 +--- x86/vmexit.c | 20 +++- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a

[PATCH kvm-unit-tests 07/10] Correct the tss size

2010-08-24 Thread Jason Wang
TSS size should be 104 byte. Signed-off-by: Jason Wang --- x86/cstart64.S |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/x86/cstart64.S b/x86/cstart64.S index 5d358ad..b871153 100644 --- a/x86/cstart64.S +++ b/x86/cstart64.S @@ -69,7 +69,7 @@ tss: .long 0

[PATCH kvm-unit-tests 05/10] Drop print.S

2010-08-24 Thread Jason Wang
We've already had lib/printf.c. Signed-off-by: Jason Wang --- config-x86-common.mak |9 - x86/print.S | 31 --- 2 files changed, 4 insertions(+), 36 deletions(-) delete mode 100644 x86/print.S diff --git a/config-x86-common.mak b/confi

[PATCH kvm-unit-tests 04/10] Correct the path in README

2010-08-24 Thread Jason Wang
Signed-off-by: Jason Wang --- README | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README b/README index 6a83831..9c0c518 100644 --- a/README +++ b/README @@ -7,17 +7,17 @@ Tests uses a qemu's virtual test device, named testdev, for services like printi

[PATCH kvm-unit-tests 03/10] Makefile cleanup

2010-08-24 Thread Jason Wang
Remove the obsoleted target and directories. Signed-off-by: Jason Wang --- Makefile |9 + 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 5347ce8..d25e6f2 100644 --- a/Makefile +++ b/Makefile @@ -30,10 +30,6 @@ CFLAGS += -O1 CFLAGS

[PATCH kvm-unit-tests 02/10] Remove trailing whitespaces

2010-08-24 Thread Jason Wang
Signed-off-by: Jason Wang --- config-x86-common.mak | 14 +++--- x86/access.c |2 +- x86/cstart64.S|4 ++-- x86/print.S |6 +++--- x86/sieve.c |2 +- x86/vm.c |6 +++--- 6 files changed, 17 insertions(+), 17

[PATCH kvm-unit-tests 01/10] Do not track config.mak and kvmtrace

2010-08-24 Thread Jason Wang
config.mak was generated by configure and kvmtrace were compiled throuh makefile. Signed-off-by: Jason Wang --- config.mak |8 kvmtrace | Bin 2 files changed, 0 insertions(+), 8 deletions(-) delete mode 100644 config.mak delete mode 100755 kvmtrace diff --git a/config.mak b

[PATCH kvm-unit-tests 00/10] Minor cleanup and fix for 32bit test

2010-08-24 Thread Jason Wang
The following series do some minor cleanup and fix for the 32bit test. --- Jason Wang (10): Do not track config.mak and kvmtrace Remove trailing whitespaces Makefile cleanup Correct the path in README Drop print.S Remove the duplicated rdmsr/wrmsr

[PATCH 3/3] test: Add test for kvmclock

2010-07-25 Thread Jason Wang
provide monotonic cycles. Signed-off-by: Jason Wang --- kvm/test/x86/kvmclock_test.c | 128 ++ kvm/test/x86/unittests.cfg |4 + 2 files changed, 132 insertions(+), 0 deletions(-) create mode 100644 kvm/test/x86/kvmclock_test.c diff --git a/kvm/test

[PATCH 2/3] test: Add kvmclock driver

2010-07-25 Thread Jason Wang
This patch add a kvmclock driver for unittest. A special bit: PV_CLOCK_CYCLE_RAW_TEST_BIT is used to notify the driver to return just the raw cycle supplied by the hypervisor. Signed-off-by: Jason Wang --- kvm/test/x86/kvmclock.c | 206 +++ kvm/test

[PATCH 1/3] test: Drop print.S

2010-07-25 Thread Jason Wang
We have already had lib/printf.c. Signed-off-by: Jason Wang --- kvm/test/x86/print.S | 31 --- 1 files changed, 0 insertions(+), 31 deletions(-) delete mode 100644 kvm/test/x86/print.S diff --git a/kvm/test/config-x86-common.mak b/kvm/test/config-x86-common.mak

[PATCH v2] KVM: Fix typos in Documentation/kvm/mmu.txt

2010-06-17 Thread Jason Wang
Signed-off-by: Jason Wang --- Documentation/kvm/mmu.txt |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/kvm/mmu.txt b/Documentation/kvm/mmu.txt index 8cb42b9..142cc51 100644 --- a/Documentation/kvm/mmu.txt +++ b/Documentation/kvm/mmu.txt @@ -77,10 +77,10

Re: [PATCH] KVM: Fix typos in Documentation/kvm/mmu.txt

2010-06-17 Thread Jason Wang
Avi Kivity wrote: > On 06/17/2010 08:32 AM, Jason Wang wrote: > >> Signed-off-by: Jason Wang >> --- >> Documentation/kvm/mmu.txt |4 ++-- >> 1 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/Documentation/kvm/mmu.txt b/Documenta

Re: [PATCH 03/17] Unify vendor TSC logic

2010-06-17 Thread Jason Wang
Zachary Amsden wrote: > On 06/15/2010 10:10 PM, Jason Wang wrote: > >> Zachary Amsden wrote: >> >> >>> Move the TSC control logic from the vendor backends into x86.c >>> by adding adjust_tsc_offset to x86 ops. Now all TSC decisions >>

Re: [PATCH 03/17] Unify vendor TSC logic

2010-06-17 Thread Jason Wang
Glauber Costa wrote: > On Wed, Jun 16, 2010 at 04:10:10PM +0800, Jason Wang wrote: > >> Zachary Amsden wrote: >> >>> >>> void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) >>> { >>> + kvm_x86_ops->vc

[PATCH] KVM: Fix typos in Documentation/kvm/mmu.txt

2010-06-16 Thread Jason Wang
Signed-off-by: Jason Wang --- Documentation/kvm/mmu.txt |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/kvm/mmu.txt b/Documentation/kvm/mmu.txt index 8cb42b9..5d3343f 100644 --- a/Documentation/kvm/mmu.txt +++ b/Documentation/kvm/mmu.txt @@ -77,10 +77,10

Re: [PATCH 12/17] Add helper function get_kernel_ns

2010-06-16 Thread Jason Wang
Zachary Amsden wrote: > On 06/14/2010 10:41 PM, Avi Kivity wrote: > >> On 06/15/2010 10:34 AM, Zachary Amsden wrote: >> >>> Add a helper function for the multiple places this is used. Note >>> that it >>> must not be called in preemptible context, as that would mean the kernel >>> could e

Re: [PATCH 11/17] Fix a possible backwards warp of kvmclock

2010-06-16 Thread Jason Wang
Zachary Amsden wrote: > Kernel time, which advances in discrete steps may progress much slower > than TSC. As a result, when kvmclock is adjusted to a new base, the > apparent time to the guest, which runs at a much higher, nsec scaled > rate based on the current TSC, may have already been observe

Re: [PATCH 04/17] Fix deep C-state TSC desynchronization

2010-06-16 Thread Jason Wang
Zachary Amsden wrote: > When CPUs with unstable TSCs enter deep C-state, TSC may stop > running. This causes us to require resynchronization. Since > we can't tell when this may potentially happen, we assume the > worst by forcing re-compensation for it at every point the VCPU > task is deschedul

Re: [PATCH 05/17] Keep SMP VMs more in sync on unstable TSC

2010-06-16 Thread Jason Wang
Zachary Amsden wrote: > SMP VMs on machines with unstable TSC have their TSC offset adjusted by the > local offset delta from last measurement. This does not take into account how > long it has been since the measurement, leading to drift. Minimize the drift > by accounting for any time differenc

Re: [PATCH 03/17] Unify vendor TSC logic

2010-06-16 Thread Jason Wang
Zachary Amsden wrote: > Move the TSC control logic from the vendor backends into x86.c > by adding adjust_tsc_offset to x86 ops. Now all TSC decisions > can be done in one place. > > Also, rename some variable in the VCPU structure to more accurately > reflect their actual content. > > VMX backend

[PATCH] KVM test: Measure the timedrift after continuing a stopped vm

2010-05-28 Thread Jason Wang
This test extends the timedifrt test and measures the timedirft across the vm stopping and continuing. Two helpers function are also added in kvm_test_utils to do the stop and continue. Signed-off-by: Jason Wang --- client/tests/kvm/tests/timedrift_with_stop.py | 97

[PATCH 3/3] KVM test: Add implementation of network based unattended installation

2010-05-28 Thread Jason Wang
rk is too slow to do this. Only the unattended files for RHEL and Fedora gues ts are modified, others are kept unmodified and could do the installation from cdrom. Signed-off-by: Jason Wang --- client/tests/kvm/scripts/unattended.py | 107 +++- client/tests/kvm/tests_bas

[PATCH 2/3] KVM test: Do not use the hard-coded address during unattended installation

2010-05-28 Thread Jason Wang
When we do the unattended installation in tap mode, we should use vm.get_address() instead of the 'localhost' in order the connect to the finish program running in the guest. Signed-off-by: Jason Wang --- client/tests/kvm/tests/unattended_install.py | 25 +---

[PATCH 1/3] KVM test: Add the support of kernel and initrd option for qemu-kvm

2010-05-28 Thread Jason Wang
"-kernel" option is useful for both unattended installation and the unittest in /kvm/user/test. Signed-off-by: Jason Wang --- client/tests/kvm/kvm_vm.py | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm

Re: [PATCH 2/3] KVM test: Do not use the hard-coded address during unattended installation

2010-05-28 Thread Jason Wang
Lucas Meneghel Rodrigues wrote: > On Wed, 2010-05-19 at 17:20 +0800, Jason Wang wrote: > >> When we do the unattended installation in tap mode, we should use >> vm.get_address() instead of the 'localhost' in order the connect to >> the finish program running

Re: [PATCH v2 00/10] Redirct and make use of the guest serial console

2010-05-28 Thread Jason Wang
Lucas Meneghel Rodrigues wrote: > On Tue, 2010-05-11 at 17:03 +0800, Jason Wang wrote: > >> The guest console is useful for failure troubleshooting especially for >> the one who has calltrace. And as we plan to push the network related >> test in the next few weeks, we

Re: [Autotest] [v3 PATCH] KVM test: Add a helper to search the panic in the log

2010-05-24 Thread Jason Wang
Michael Goldish wrote: > On 05/19/2010 12:13 PM, Jason Wang wrote: > >> This checker serves as the post_command to find the panic information >> in the file which contains the content of guest serial console. >> >> Changes from v2: >> - Put all thin

[PATCH 3/3] KVM test: Add implementation of network based unattended installation

2010-05-19 Thread Jason Wang
could do the installation from cdrom. Signed-off-by: Jason Wang --- client/tests/kvm/scripts/unattended.py | 103 +- client/tests/kvm/tests_base.cfg.sample |1 client/tests/kvm/unattended/Fedora-10.ks |2 - client/tests/kvm/unattended/Fedora-1

[PATCH 2/3] KVM test: Do not use the hard-coded address during unattended installation

2010-05-19 Thread Jason Wang
When we do the unattended installation in tap mode, we should use vm.get_address() instead of the 'localhost' in order the connect to the finish program running in the guest. Signed-off-by: Jason Wang --- client/tests/kvm/tests/unattended_install.py | 25 +---

[PATCH 1/3] KVM test: Add the support of kernel and initrd option for qemu-kvm

2010-05-19 Thread Jason Wang
"-kernel" option is useful for both unattended installation and the unittest in /kvm/user/test. Signed-off-by: Jason Wang --- client/tests/kvm/kvm_vm.py | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm

[v3 PATCH] KVM test: Add a helper to search the panic in the log

2010-05-19 Thread Jason Wang
This checker serves as the post_command to find the panic information in the file which contains the content of guest serial console. Changes from v2: - Put all things into __main__ - Fix some typos Signed-off-by: Jason Wang --- client/tests/kvm/scripts/check_serial.py | 24

Re: [PATCH v2 10/10] KVM test: Add a helper to search the panic in the log

2010-05-17 Thread Jason Wang
Michael Goldish wrote: On 05/11/2010 12:04 PM, Jason Wang wrote: This checker serves as the post_command to find the panic information in the file which contains the content of guest serial console. Signed-off-by: Jason Wang --- client/tests/kvm/scripts/check_serial.py | 41

[PATCH 2/2] KVM test: Add rtc into the guest test

2010-05-17 Thread Jason Wang
rtc test is a test for rtc driver which could also be useful for testing the rtc emulation in kvm. Signed-off-by: Jason Wang --- 0 files changed, 0 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/autotest_control/rtc.control b/client/tests/kvm/autotest_control/rtc.control new file

[PATCH 1/2] Adding rtctest as client test

2010-05-17 Thread Jason Wang
This new autotest module implements a simple test for the driver of realtime clock. It do the testing of interrupt, date reading, alarm and frequency. Please refer the Documentation/rtc.txt for details. Signed-off-by: Jason Wang --- client/tests/rtc/src/Makefile | 19 +++ client/tests/rtc

[PATCH v2 10/10] KVM test: Add a helper to search the panic in the log

2010-05-11 Thread Jason Wang
This checker serves as the post_command to find the panic information in the file which contains the content of guest serial console. Signed-off-by: Jason Wang --- client/tests/kvm/scripts/check_serial.py | 41 ++ client/tests/kvm/tests_base.cfg.sample |7

[PATCH v2 09/10] KVM test: Enable the serial console during unattended installation

2010-05-11 Thread Jason Wang
This patch enable the serial console during unattended installation for all linux guests. Signed-off-by: Jason Wang --- client/tests/kvm/tests_base.cfg.sample |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests

[PATCH v2 08/10] KVM test: Enable the serial console for all linux guests

2010-05-11 Thread Jason Wang
As we have the ability to dump the content from serial console or use a session through it, we need to redirect the console to serial through unattended files to make use of it. The patch also keep the tty0 accroding to the suggestion of Michael Goldish. Signed-off-by: Jason Wang --- client

[PATCH v2 07/10] KVM test: Introduce local_login()

2010-05-11 Thread Jason Wang
rvers. But it would be useful for the network related test which may cause the network unresponsive such as driver load/unload or some kinds of network stress testing. Signed-off-by: Jason Wang --- client/tests/kvm/kvm_vm.py | 25 + 1 files changed, 25 insertions(+), 0

[PATCH v2 06/10] KVM test: Return none when met unknown type in kvm_vm.remote_login().

2010-05-11 Thread Jason Wang
None is returned when met the unknown type of shell_client in kvm_vm.remote_login() in order to avoid the traceback. Signed-off-by: Jason Wang --- client/tests/kvm/kvm_vm.py |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests

[PATCH v2 05/10] KVM test: Log the content from guest serial console

2010-05-11 Thread Jason Wang
Signed-off-by: Jason Wang --- client/tests/kvm/kvm_preprocessing.py | 59 +++- client/tests/kvm/tests_base.cfg.sample |1 + 2 files changed, 59 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessin

[PATCH v2 04/10] KVM test: Redirect the serial to the unix domain socket

2010-05-11 Thread Jason Wang
This patch redirect the guest serial to the unix domain socket which would be used by the following patches to dump its content or use it as a session. Signed-off-by: Jason Wang --- client/tests/kvm/kvm_vm.py | 19 --- 1 files changed, 12 insertions(+), 7 deletions(-) diff

[PATCH v2 03/10] KVM test: Make the login re suitable for serial console

2010-05-11 Thread Jason Wang
Current matching re ^\s*[Ll]ogin:\s*$ is not suitable for the serial console, so change it to [Ll]ogin:\s*$. Signed-off-by: Jason Wang --- client/tests/kvm/kvm_utils.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm

[PATCH v2 02/10] KVM test: Send the username in remote_login()

2010-05-11 Thread Jason Wang
In order to let the serial console work, we must let the remote_login() send the username when met the username prompt. This patch fails the progress if if it met the username prompt twice. Signed-off-by: Jason Wang --- client/tests/kvm/kvm_utils.py | 23 --- 1 files

[PATCH v2 01/10] KVM test: Introduce prompt assist

2010-05-11 Thread Jason Wang
We need to send an assist string to a session in order to get the prompt when re-connecting to session through serial. This patch sends assist string before matching the prompt in remote_login(). Signed-off-by: Jason Wang --- client/tests/kvm/kvm_utils.py |9 +++-- 1 files changed, 7

[PATCH v2 00/10] Redirct and make use of the guest serial console

2010-05-11 Thread Jason Wang
installation - Add a helper to check whether the panic information was occured - Keep the porcess() at its original location in preprocess() --- Jason Wang (10): KVM test: Introduce prompt assist KVM test: Send the username in remote_login() KVM test: Make the login re suitable for

Re: [Autotest] [PATCH 1/3] KVM test: Use customized command to get the version of kvm and its

2010-05-07 Thread Jason Wang
- "Lucas Meneghel Rodrigues" wrote: > On Fri, 2010-05-07 at 18:10 +0800, Jason Wang wrote: > > Lucas Meneghel Rodrigues wrote: > > > On Mon, Apr 26, 2010 at 7:07 AM, Jason Wang > wrote: > > > > > >> userspace > > >>

Re: [Autotest] [PATCH 1/3] KVM test: Use customized command to get the version of kvm and its

2010-05-07 Thread Jason Wang
Lucas Meneghel Rodrigues wrote: On Mon, Apr 26, 2010 at 7:07 AM, Jason Wang wrote: userspace Current method may or may not work for various kinds of distribution. So this patch enable the ability to use customized commands to get the version of kvm and its userspace. "kvm_ver_cmd&quo

Re: [PATCH 9/9] KVM test: Redirect the console to serial for all linux guests

2010-05-05 Thread Jason Wang
Michael Goldish wrote: On 04/26/2010 01:04 PM, Jason Wang wrote: As we have the ability to dump the content from serial console or use a session through it, we need to redirect the console to serial through unattended files to make use of it. Signed-off-by: Jason Wang --- client/tests/kvm

Re: [PATCH 7/9] KVM test: Introduce the local_login()

2010-05-05 Thread Jason Wang
Michael Goldish wrote: On 04/26/2010 01:04 PM, Jason Wang wrote: This patch introduces a new method which is used to log into the guest through the guest serial console. The serial_mode must be set to "session" in order to make use of this patch. In what cases would we w

Re: [PATCH 5/9] KVM test: Log the content from guest serial console

2010-05-05 Thread Jason Wang
Michael Goldish wrote: On 04/26/2010 01:04 PM, Jason Wang wrote: This patch tries to get the content of guest serial and log it into the debug directoy of the testcase through a dedicated thread which is created in the preprocessing and ended in the postprocessing. The params of serial_mode

Re: [PATCH 3/9] KVM test: Make the login re suitable for serial console

2010-05-05 Thread Jason Wang
Michael Goldish wrote: On 04/26/2010 01:03 PM, Jason Wang wrote: Current matching re ^\s*[Ll]ogin:\s*$ is not suitable for the serial console, so change it to [Ll]ogin:. Signed-off-by: Jason Wang --- client/tests/kvm/kvm_utils.py |2 +- 1 files changed, 1 insertions(+), 1 deletions

Re: [PATCH 1/9] KVM test: Introduce the prompt assist

2010-05-05 Thread Jason Wang
Michael Goldish wrote: On 04/26/2010 01:03 PM, Jason Wang wrote: Sometimes we need to send an assist string to a session in order to get the prompt especially when re-connecting to an already logged serial session. This patch send the assist string before doing the pattern matching of

[PATCH] KVM test: Add the missing blank for the extra params of balloon check

2010-04-27 Thread Jason Wang
Add the missing blank for the extra params of balloon check in order to get the correct qemu-kvm command line. Signed-off-by: Jason Wang --- client/tests/kvm/tests_base.cfg.sample |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/tests_base.cfg.sample b

[PATCH 3/3] KVM test: Remove the duplicated KERNEL paramters in the pxe configuration file

2010-04-26 Thread Jason Wang
Remove the duplicated "KERNEL vmlinuz" in unattended.py Signed-off-by: Jason Wang --- client/tests/kvm/scripts/unattended.py |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/scripts/unattended.py b/client/tests/kvm/scripts/unattended.py ind

[PATCH 2/3] KVM test: Create ksm scanner through pre_command

2010-04-26 Thread Jason Wang
KSM may have various control interface for different distributions,so this patch launch ksm through pre_command instead of the hard-coded bits in the test. User may specify their owner suitable commands or paramteres. Signed-off-by: Jason Wang --- client/tests/kvm/tests/ksm_overcommit.py | 15

[PATCH 1/3] KVM test: Use customized command to get the version of kvm and its

2010-04-26 Thread Jason Wang
userspace Current method may or may not work for various kinds of distribution. So this patch enable the ability to use customized commands to get the version of kvm and its userspace. "kvm_ver_cmd" is used for kvm verison and "kvm_userspace_ver_cmd" is for its userspace.

[PATCH 9/9] KVM test: Redirect the console to serial for all linux guests

2010-04-26 Thread Jason Wang
As we have the ability to dump the content from serial console or use a session through it, we need to redirect the console to serial through unattended files to make use of it. Signed-off-by: Jason Wang --- client/tests/kvm/unattended/Fedora-10.ks |2 +- client/tests/kvm/unattended

[PATCH 8/9] KVM test: Create the background threads before calling process()

2010-04-26 Thread Jason Wang
If the screendump and scrialdump threads are created after the process(), we may lose the progress tracking of guest shutting down. So this patch creates them before calling process() in preprocess. Signed-off-by: Jason Wang --- client/tests/kvm/kvm_preprocessing.py |5 ++--- 1 files

[PATCH 7/9] KVM test: Introduce the local_login()

2010-04-26 Thread Jason Wang
This patch introduces a new method which is used to log into the guest through the guest serial console. The serial_mode must be set to "session" in order to make use of this patch. Signed-off-by: Jason Wang --- client/tests/kvm/kvm_vm.py | 25 + 1 files c

[PATCH 6/9] KVM test: Raise error when met unknown type in kvm_vm.remote_login().

2010-04-26 Thread Jason Wang
Need to raise the error when met the unknown type of shell_client in kvm_vm.remote_login() in order to avoid the traceback. Signed-off-by: Jason Wang --- client/tests/kvm/kvm_vm.py |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client

[PATCH 5/9] KVM test: Log the content from guest serial console

2010-04-26 Thread Jason Wang
Signed-off-by: Jason Wang --- client/tests/kvm/kvm_preprocessing.py | 59 +++- client/tests/kvm/tests_base.cfg.sample |1 + 2 files changed, 59 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessin

[PATCH 4/9] KVM test: Redirect the serial to the unix domain socket

2010-04-26 Thread Jason Wang
This patch redirect the guest serial to the unix domain socket which would be used by the following patches to dump its content or use it as a session. Signed-off-by: Jason Wang --- client/tests/kvm/kvm_vm.py | 19 --- 1 files changed, 12 insertions(+), 7 deletions(-) diff

[PATCH 3/9] KVM test: Make the login re suitable for serial console

2010-04-26 Thread Jason Wang
Current matching re ^\s*[Ll]ogin:\s*$ is not suitable for the serial console, so change it to [Ll]ogin:. Signed-off-by: Jason Wang --- client/tests/kvm/kvm_utils.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm

[PATCH 2/9] KVM test: Add the ability to send the username in remote_login()

2010-04-26 Thread Jason Wang
In order to let the serial console work, we must let the remote_login() send the username when needed. Signed-off-by: Jason Wang --- client/tests/kvm/kvm_utils.py | 14 ++ 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests

[PATCH 1/9] KVM test: Introduce the prompt assist

2010-04-26 Thread Jason Wang
Sometimes we need to send an assist string to a session in order to get the prompt especially when re-connecting to an already logged serial session. This patch send the assist string before doing the pattern matching of remote_login. Signed-off-by: Jason Wang --- client/tests/kvm/kvm_utils.py

<    2   3   4   5   6   7   8   >