All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
@ 2021-12-21  9:21 ` Thomas Huth
  0 siblings, 0 replies; 18+ messages in thread
From: Thomas Huth @ 2021-12-21  9:21 UTC (permalink / raw)
  To: kvm, Laurent Vivier, Andrew Jones, Paolo Bonzini; +Cc: kvm-ppc, Eric Auger

Instead of failing the tests, we should rather skip them if ncat is
not available.
While we're at it, also mention ncat in the README.md file as a
requirement for the migration tests.

Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 README.md             | 4 ++++
 scripts/arch-run.bash | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 6e6a9d0..a82da56 100644
--- a/README.md
+++ b/README.md
@@ -54,6 +54,10 @@ ACCEL=name environment variable:
 
     ACCEL=kvm ./x86-run ./x86/msr.flat
 
+For running tests that involve migration from one QEMU instance to another
+you also need to have the "ncat" binary (from the nmap.org project) installed,
+otherwise the related tests will be skipped.
+
 # Tests configuration file
 
 The test case may need specific runtime configurations, for
diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
index 43da998..cd92ed9 100644
--- a/scripts/arch-run.bash
+++ b/scripts/arch-run.bash
@@ -108,7 +108,7 @@ run_migration ()
 {
 	if ! command -v ncat >/dev/null 2>&1; then
 		echo "${FUNCNAME[0]} needs ncat (netcat)" >&2
-		return 2
+		return 77
 	fi
 
 	migsock=$(mktemp -u -t mig-helper-socket.XXXXXXXXXX)
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
@ 2021-12-21  9:21 ` Thomas Huth
  0 siblings, 0 replies; 18+ messages in thread
From: Thomas Huth @ 2021-12-21  9:21 UTC (permalink / raw)
  To: kvm, Laurent Vivier, Andrew Jones, Paolo Bonzini; +Cc: kvm-ppc, Eric Auger

Instead of failing the tests, we should rather skip them if ncat is
not available.
While we're at it, also mention ncat in the README.md file as a
requirement for the migration tests.

Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 README.md             | 4 ++++
 scripts/arch-run.bash | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 6e6a9d0..a82da56 100644
--- a/README.md
+++ b/README.md
@@ -54,6 +54,10 @@ ACCEL=name environment variable:
 
     ACCEL=kvm ./x86-run ./x86/msr.flat
 
+For running tests that involve migration from one QEMU instance to another
+you also need to have the "ncat" binary (from the nmap.org project) installed,
+otherwise the related tests will be skipped.
+
 # Tests configuration file
 
 The test case may need specific runtime configurations, for
diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
index 43da998..cd92ed9 100644
--- a/scripts/arch-run.bash
+++ b/scripts/arch-run.bash
@@ -108,7 +108,7 @@ run_migration ()
 {
 	if ! command -v ncat >/dev/null 2>&1; then
 		echo "${FUNCNAME[0]} needs ncat (netcat)" >&2
-		return 2
+		return 77
 	fi
 
 	migsock=$(mktemp -u -t mig-helper-socket.XXXXXXXXXX)
-- 
2.27.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
  2021-12-21  9:21 ` Thomas Huth
@ 2021-12-21  9:58   ` Paolo Bonzini
  -1 siblings, 0 replies; 18+ messages in thread
From: Paolo Bonzini @ 2021-12-21  9:58 UTC (permalink / raw)
  To: Thomas Huth, kvm, Laurent Vivier, Andrew Jones; +Cc: kvm-ppc, Eric Auger

On 12/21/21 10:21, Thomas Huth wrote:
> Instead of failing the tests, we should rather skip them if ncat is
> not available.
> While we're at it, also mention ncat in the README.md file as a
> requirement for the migration tests.
> 
> Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
> Signed-off-by: Thomas Huth <thuth@redhat.com>

I would rather remove the migration tests.  There's really no reason for 
them, the KVM selftests in the Linux tree are much better: they can find 
migration bugs deterministically and they are really really easy to 
debug.  The only disadvantage is that they are harder to write.

Paolo

> ---
>   README.md             | 4 ++++
>   scripts/arch-run.bash | 2 +-
>   2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/README.md b/README.md
> index 6e6a9d0..a82da56 100644
> --- a/README.md
> +++ b/README.md
> @@ -54,6 +54,10 @@ ACCEL=name environment variable:
>   
>       ACCEL=kvm ./x86-run ./x86/msr.flat
>   
> +For running tests that involve migration from one QEMU instance to another
> +you also need to have the "ncat" binary (from the nmap.org project) installed,
> +otherwise the related tests will be skipped.
> +
>   # Tests configuration file
>   
>   The test case may need specific runtime configurations, for
> diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
> index 43da998..cd92ed9 100644
> --- a/scripts/arch-run.bash
> +++ b/scripts/arch-run.bash
> @@ -108,7 +108,7 @@ run_migration ()
>   {
>   	if ! command -v ncat >/dev/null 2>&1; then
>   		echo "${FUNCNAME[0]} needs ncat (netcat)" >&2
> -		return 2
> +		return 77
>   	fi
>   
>   	migsock=$(mktemp -u -t mig-helper-socket.XXXXXXXXXX)
> 


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
@ 2021-12-21  9:58   ` Paolo Bonzini
  0 siblings, 0 replies; 18+ messages in thread
From: Paolo Bonzini @ 2021-12-21  9:58 UTC (permalink / raw)
  To: Thomas Huth, kvm, Laurent Vivier, Andrew Jones; +Cc: kvm-ppc, Eric Auger

On 12/21/21 10:21, Thomas Huth wrote:
> Instead of failing the tests, we should rather skip them if ncat is
> not available.
> While we're at it, also mention ncat in the README.md file as a
> requirement for the migration tests.
> 
> Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
> Signed-off-by: Thomas Huth <thuth@redhat.com>

I would rather remove the migration tests.  There's really no reason for 
them, the KVM selftests in the Linux tree are much better: they can find 
migration bugs deterministically and they are really really easy to 
debug.  The only disadvantage is that they are harder to write.

Paolo

> ---
>   README.md             | 4 ++++
>   scripts/arch-run.bash | 2 +-
>   2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/README.md b/README.md
> index 6e6a9d0..a82da56 100644
> --- a/README.md
> +++ b/README.md
> @@ -54,6 +54,10 @@ ACCEL=name environment variable:
>   
>       ACCEL=kvm ./x86-run ./x86/msr.flat
>   
> +For running tests that involve migration from one QEMU instance to another
> +you also need to have the "ncat" binary (from the nmap.org project) installed,
> +otherwise the related tests will be skipped.
> +
>   # Tests configuration file
>   
>   The test case may need specific runtime configurations, for
> diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
> index 43da998..cd92ed9 100644
> --- a/scripts/arch-run.bash
> +++ b/scripts/arch-run.bash
> @@ -108,7 +108,7 @@ run_migration ()
>   {
>   	if ! command -v ncat >/dev/null 2>&1; then
>   		echo "${FUNCNAME[0]} needs ncat (netcat)" >&2
> -		return 2
> +		return 77
>   	fi
>   
>   	migsock=$(mktemp -u -t mig-helper-socket.XXXXXXXXXX)
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
  2021-12-21  9:58   ` Paolo Bonzini
@ 2021-12-21 10:12     ` Thomas Huth
  -1 siblings, 0 replies; 18+ messages in thread
From: Thomas Huth @ 2021-12-21 10:12 UTC (permalink / raw)
  To: Paolo Bonzini, kvm, Laurent Vivier, Andrew Jones; +Cc: kvm-ppc, Eric Auger

On 21/12/2021 10.58, Paolo Bonzini wrote:
> On 12/21/21 10:21, Thomas Huth wrote:
>> Instead of failing the tests, we should rather skip them if ncat is
>> not available.
>> While we're at it, also mention ncat in the README.md file as a
>> requirement for the migration tests.
>>
>> Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
> 
> I would rather remove the migration tests.  There's really no reason for 
> them, the KVM selftests in the Linux tree are much better: they can find 
> migration bugs deterministically and they are really really easy to debug.  
> The only disadvantage is that they are harder to write.

I disagree: We're testing migration with QEMU here - the KVM selftests don't 
include QEMU, so we'd lose some test coverage here.
And at least the powerpc/sprs.c test helped to find some nasty bugs in the 
past already.

  Thomas


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
@ 2021-12-21 10:12     ` Thomas Huth
  0 siblings, 0 replies; 18+ messages in thread
From: Thomas Huth @ 2021-12-21 10:12 UTC (permalink / raw)
  To: Paolo Bonzini, kvm, Laurent Vivier, Andrew Jones; +Cc: kvm-ppc, Eric Auger

On 21/12/2021 10.58, Paolo Bonzini wrote:
> On 12/21/21 10:21, Thomas Huth wrote:
>> Instead of failing the tests, we should rather skip them if ncat is
>> not available.
>> While we're at it, also mention ncat in the README.md file as a
>> requirement for the migration tests.
>>
>> Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
> 
> I would rather remove the migration tests.  There's really no reason for 
> them, the KVM selftests in the Linux tree are much better: they can find 
> migration bugs deterministically and they are really really easy to debug.  
> The only disadvantage is that they are harder to write.

I disagree: We're testing migration with QEMU here - the KVM selftests don't 
include QEMU, so we'd lose some test coverage here.
And at least the powerpc/sprs.c test helped to find some nasty bugs in the 
past already.

  Thomas

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
  2021-12-21 10:12     ` Thomas Huth
@ 2021-12-21 14:48       ` Eric Auger
  -1 siblings, 0 replies; 18+ messages in thread
From: Eric Auger @ 2021-12-21 14:48 UTC (permalink / raw)
  To: Thomas Huth, Paolo Bonzini, kvm, Laurent Vivier, Andrew Jones; +Cc: kvm-ppc

Hi,
On 12/21/21 11:12 AM, Thomas Huth wrote:
> On 21/12/2021 10.58, Paolo Bonzini wrote:
>> On 12/21/21 10:21, Thomas Huth wrote:
>>> Instead of failing the tests, we should rather skip them if ncat is
>>> not available.
>>> While we're at it, also mention ncat in the README.md file as a
>>> requirement for the migration tests.
>>>
>>> Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>
>> I would rather remove the migration tests.  There's really no reason
>> for them, the KVM selftests in the Linux tree are much better: they
>> can find migration bugs deterministically and they are really really
>> easy to debug.  The only disadvantage is that they are harder to write.
>
> I disagree: We're testing migration with QEMU here - the KVM selftests
> don't include QEMU, so we'd lose some test coverage here.
> And at least the powerpc/sprs.c test helped to find some nasty bugs in
> the past already.
I do agree. The ITS migration tests were good reproducer for upstream bugs.

Thanks

Eric
>
>  Thomas
>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
@ 2021-12-21 14:48       ` Eric Auger
  0 siblings, 0 replies; 18+ messages in thread
From: Eric Auger @ 2021-12-21 14:48 UTC (permalink / raw)
  To: Thomas Huth, Paolo Bonzini, kvm, Laurent Vivier, Andrew Jones; +Cc: kvm-ppc

Hi,
On 12/21/21 11:12 AM, Thomas Huth wrote:
> On 21/12/2021 10.58, Paolo Bonzini wrote:
>> On 12/21/21 10:21, Thomas Huth wrote:
>>> Instead of failing the tests, we should rather skip them if ncat is
>>> not available.
>>> While we're at it, also mention ncat in the README.md file as a
>>> requirement for the migration tests.
>>>
>>> Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>
>> I would rather remove the migration tests.  There's really no reason
>> for them, the KVM selftests in the Linux tree are much better: they
>> can find migration bugs deterministically and they are really really
>> easy to debug.  The only disadvantage is that they are harder to write.
>
> I disagree: We're testing migration with QEMU here - the KVM selftests
> don't include QEMU, so we'd lose some test coverage here.
> And at least the powerpc/sprs.c test helped to find some nasty bugs in
> the past already.
I do agree. The ITS migration tests were good reproducer for upstream bugs.

Thanks

Eric
>
>  Thomas
>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
  2021-12-21 10:12     ` Thomas Huth
@ 2021-12-21 17:25       ` Paolo Bonzini
  -1 siblings, 0 replies; 18+ messages in thread
From: Paolo Bonzini @ 2021-12-21 17:25 UTC (permalink / raw)
  To: Thomas Huth, kvm, Laurent Vivier, Andrew Jones; +Cc: kvm-ppc, Eric Auger

On 12/21/21 11:12, Thomas Huth wrote:
> On 21/12/2021 10.58, Paolo Bonzini wrote:
>> On 12/21/21 10:21, Thomas Huth wrote:
>>> Instead of failing the tests, we should rather skip them if ncat is
>>> not available.
>>> While we're at it, also mention ncat in the README.md file as a
>>> requirement for the migration tests.
>>>
>>> Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>
>> I would rather remove the migration tests.  There's really no reason 
>> for them, the KVM selftests in the Linux tree are much better: they 
>> can find migration bugs deterministically and they are really really 
>> easy to debug. The only disadvantage is that they are harder to write.
> 
> I disagree: We're testing migration with QEMU here - the KVM selftests 
> don't include QEMU, so we'd lose some test coverage here.
> And at least the powerpc/sprs.c test helped to find some nasty bugs in 
> the past already.

I understand that this is testing QEMU, but I'm not sure that testing 
QEMU should be part of kvm-unit-tests.  Migrating an instance of QEMU 
that runs kvm-unit-tests would be done more easily in avocado-vt or 
avocado-qemu.

Paolo


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
@ 2021-12-21 17:25       ` Paolo Bonzini
  0 siblings, 0 replies; 18+ messages in thread
From: Paolo Bonzini @ 2021-12-21 17:25 UTC (permalink / raw)
  To: Thomas Huth, kvm, Laurent Vivier, Andrew Jones; +Cc: kvm-ppc, Eric Auger

On 12/21/21 11:12, Thomas Huth wrote:
> On 21/12/2021 10.58, Paolo Bonzini wrote:
>> On 12/21/21 10:21, Thomas Huth wrote:
>>> Instead of failing the tests, we should rather skip them if ncat is
>>> not available.
>>> While we're at it, also mention ncat in the README.md file as a
>>> requirement for the migration tests.
>>>
>>> Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>
>> I would rather remove the migration tests.  There's really no reason 
>> for them, the KVM selftests in the Linux tree are much better: they 
>> can find migration bugs deterministically and they are really really 
>> easy to debug. The only disadvantage is that they are harder to write.
> 
> I disagree: We're testing migration with QEMU here - the KVM selftests 
> don't include QEMU, so we'd lose some test coverage here.
> And at least the powerpc/sprs.c test helped to find some nasty bugs in 
> the past already.

I understand that this is testing QEMU, but I'm not sure that testing 
QEMU should be part of kvm-unit-tests.  Migrating an instance of QEMU 
that runs kvm-unit-tests would be done more easily in avocado-vt or 
avocado-qemu.

Paolo

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
  2021-12-21 17:25       ` Paolo Bonzini
@ 2021-12-23 15:46         ` Andrew Jones
  -1 siblings, 0 replies; 18+ messages in thread
From: Andrew Jones @ 2021-12-23 15:46 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Thomas Huth, kvm, Laurent Vivier, kvm-ppc, Eric Auger

On Tue, Dec 21, 2021 at 06:25:30PM +0100, Paolo Bonzini wrote:
> On 12/21/21 11:12, Thomas Huth wrote:
> > On 21/12/2021 10.58, Paolo Bonzini wrote:
> > > On 12/21/21 10:21, Thomas Huth wrote:
> > > > Instead of failing the tests, we should rather skip them if ncat is
> > > > not available.
> > > > While we're at it, also mention ncat in the README.md file as a
> > > > requirement for the migration tests.
> > > > 
> > > > Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
> > > > Signed-off-by: Thomas Huth <thuth@redhat.com>
> > > 
> > > I would rather remove the migration tests.  There's really no reason
> > > for them, the KVM selftests in the Linux tree are much better: they
> > > can find migration bugs deterministically and they are really really
> > > easy to debug. The only disadvantage is that they are harder to
> > > write.
> > 
> > I disagree: We're testing migration with QEMU here - the KVM selftests
> > don't include QEMU, so we'd lose some test coverage here.
> > And at least the powerpc/sprs.c test helped to find some nasty bugs in
> > the past already.
> 
> I understand that this is testing QEMU, but I'm not sure that testing QEMU
> should be part of kvm-unit-tests.  Migrating an instance of QEMU that runs
> kvm-unit-tests would be done more easily in avocado-vt or avocado-qemu.
>

Migrating is easier with avocado*, but if we want to migrate kut unit
tests, and the unit tests want to ensure the guest is in a specific state
at the time of the migration, then we'll still need the getchar() stuff.
And, if we need the getchar() stuff, then I think we also need a
lightweight way to test migration, which is currently the ncat-based
run_migration bash function. IOW, I vote we keep the code we have, but I'm
also in favor of people building new test harnesses for the kut *.flat
files which can better exercise QEMU or whatever.

Thanks,
drew


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
@ 2021-12-23 15:46         ` Andrew Jones
  0 siblings, 0 replies; 18+ messages in thread
From: Andrew Jones @ 2021-12-23 15:46 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Thomas Huth, kvm, Laurent Vivier, kvm-ppc, Eric Auger

On Tue, Dec 21, 2021 at 06:25:30PM +0100, Paolo Bonzini wrote:
> On 12/21/21 11:12, Thomas Huth wrote:
> > On 21/12/2021 10.58, Paolo Bonzini wrote:
> > > On 12/21/21 10:21, Thomas Huth wrote:
> > > > Instead of failing the tests, we should rather skip them if ncat is
> > > > not available.
> > > > While we're at it, also mention ncat in the README.md file as a
> > > > requirement for the migration tests.
> > > > 
> > > > Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
> > > > Signed-off-by: Thomas Huth <thuth@redhat.com>
> > > 
> > > I would rather remove the migration tests.  There's really no reason
> > > for them, the KVM selftests in the Linux tree are much better: they
> > > can find migration bugs deterministically and they are really really
> > > easy to debug. The only disadvantage is that they are harder to
> > > write.
> > 
> > I disagree: We're testing migration with QEMU here - the KVM selftests
> > don't include QEMU, so we'd lose some test coverage here.
> > And at least the powerpc/sprs.c test helped to find some nasty bugs in
> > the past already.
> 
> I understand that this is testing QEMU, but I'm not sure that testing QEMU
> should be part of kvm-unit-tests.  Migrating an instance of QEMU that runs
> kvm-unit-tests would be done more easily in avocado-vt or avocado-qemu.
>

Migrating is easier with avocado*, but if we want to migrate kut unit
tests, and the unit tests want to ensure the guest is in a specific state
at the time of the migration, then we'll still need the getchar() stuff.
And, if we need the getchar() stuff, then I think we also need a
lightweight way to test migration, which is currently the ncat-based
run_migration bash function. IOW, I vote we keep the code we have, but I'm
also in favor of people building new test harnesses for the kut *.flat
files which can better exercise QEMU or whatever.

Thanks,
drew

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
  2021-12-21  9:21 ` Thomas Huth
@ 2021-12-23 15:50   ` Andrew Jones
  -1 siblings, 0 replies; 18+ messages in thread
From: Andrew Jones @ 2021-12-23 15:50 UTC (permalink / raw)
  To: Thomas Huth; +Cc: kvm, Laurent Vivier, Paolo Bonzini, kvm-ppc, Eric Auger

On Tue, Dec 21, 2021 at 10:21:30AM +0100, Thomas Huth wrote:
> Instead of failing the tests, we should rather skip them if ncat is
> not available.
> While we're at it, also mention ncat in the README.md file as a
> requirement for the migration tests.
> 
> Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  README.md             | 4 ++++
>  scripts/arch-run.bash | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/README.md b/README.md
> index 6e6a9d0..a82da56 100644
> --- a/README.md
> +++ b/README.md
> @@ -54,6 +54,10 @@ ACCEL=name environment variable:
>  
>      ACCEL=kvm ./x86-run ./x86/msr.flat
>  
> +For running tests that involve migration from one QEMU instance to another
> +you also need to have the "ncat" binary (from the nmap.org project) installed,
> +otherwise the related tests will be skipped.
> +
>  # Tests configuration file
>  
>  The test case may need specific runtime configurations, for
> diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
> index 43da998..cd92ed9 100644
> --- a/scripts/arch-run.bash
> +++ b/scripts/arch-run.bash
> @@ -108,7 +108,7 @@ run_migration ()
>  {
>  	if ! command -v ncat >/dev/null 2>&1; then
>  		echo "${FUNCNAME[0]} needs ncat (netcat)" >&2
> -		return 2
> +		return 77
>  	fi
>  
>  	migsock=$(mktemp -u -t mig-helper-socket.XXXXXXXXXX)
> -- 
> 2.27.0
>

Reviewed-by: Andrew Jones <drjones@redhat.com>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
@ 2021-12-23 15:50   ` Andrew Jones
  0 siblings, 0 replies; 18+ messages in thread
From: Andrew Jones @ 2021-12-23 15:50 UTC (permalink / raw)
  To: Thomas Huth; +Cc: kvm, Laurent Vivier, Paolo Bonzini, kvm-ppc, Eric Auger

On Tue, Dec 21, 2021 at 10:21:30AM +0100, Thomas Huth wrote:
> Instead of failing the tests, we should rather skip them if ncat is
> not available.
> While we're at it, also mention ncat in the README.md file as a
> requirement for the migration tests.
> 
> Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  README.md             | 4 ++++
>  scripts/arch-run.bash | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/README.md b/README.md
> index 6e6a9d0..a82da56 100644
> --- a/README.md
> +++ b/README.md
> @@ -54,6 +54,10 @@ ACCEL=name environment variable:
>  
>      ACCEL=kvm ./x86-run ./x86/msr.flat
>  
> +For running tests that involve migration from one QEMU instance to another
> +you also need to have the "ncat" binary (from the nmap.org project) installed,
> +otherwise the related tests will be skipped.
> +
>  # Tests configuration file
>  
>  The test case may need specific runtime configurations, for
> diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
> index 43da998..cd92ed9 100644
> --- a/scripts/arch-run.bash
> +++ b/scripts/arch-run.bash
> @@ -108,7 +108,7 @@ run_migration ()
>  {
>  	if ! command -v ncat >/dev/null 2>&1; then
>  		echo "${FUNCNAME[0]} needs ncat (netcat)" >&2
> -		return 2
> +		return 77
>  	fi
>  
>  	migsock=$(mktemp -u -t mig-helper-socket.XXXXXXXXXX)
> -- 
> 2.27.0
>

Reviewed-by: Andrew Jones <drjones@redhat.com>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
  2021-12-21 17:25       ` Paolo Bonzini
@ 2021-12-27 19:29         ` Thomas Huth
  -1 siblings, 0 replies; 18+ messages in thread
From: Thomas Huth @ 2021-12-27 19:29 UTC (permalink / raw)
  To: Paolo Bonzini, kvm, Laurent Vivier, Andrew Jones; +Cc: kvm-ppc, Eric Auger

On 21/12/2021 18.25, Paolo Bonzini wrote:
> On 12/21/21 11:12, Thomas Huth wrote:
>> On 21/12/2021 10.58, Paolo Bonzini wrote:
>>> On 12/21/21 10:21, Thomas Huth wrote:
>>>> Instead of failing the tests, we should rather skip them if ncat is
>>>> not available.
>>>> While we're at it, also mention ncat in the README.md file as a
>>>> requirement for the migration tests.
>>>>
>>>> Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
>>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>>
>>> I would rather remove the migration tests.  There's really no reason for 
>>> them, the KVM selftests in the Linux tree are much better: they can find 
>>> migration bugs deterministically and they are really really easy to 
>>> debug. The only disadvantage is that they are harder to write.
>>
>> I disagree: We're testing migration with QEMU here - the KVM selftests 
>> don't include QEMU, so we'd lose some test coverage here.
>> And at least the powerpc/sprs.c test helped to find some nasty bugs in the 
>> past already.
> 
> I understand that this is testing QEMU, but I'm not sure that testing QEMU 
> should be part of kvm-unit-tests.

It's the combination of QEMU (migration handling) + KVM in the kernel 
(register saving and restoring) that we are testing here. If you say that 
QEMU should not be involved at all, we could also say that all 
kvm-unit-tests should be converted to KVM selftests instead...

>  Migrating an instance of QEMU that runs 
> kvm-unit-tests would be done more easily in avocado-vt or avocado-qemu.

But we don't have the environment for compiling small, Linux-independent 
test kernels there, do we? So unless there is a way to write and compile 
small test kernels in that framework, I think kvm-unit-tests is the better 
fit for these kind of tests.

  Thomas


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
@ 2021-12-27 19:29         ` Thomas Huth
  0 siblings, 0 replies; 18+ messages in thread
From: Thomas Huth @ 2021-12-27 19:29 UTC (permalink / raw)
  To: Paolo Bonzini, kvm, Laurent Vivier, Andrew Jones; +Cc: kvm-ppc, Eric Auger

On 21/12/2021 18.25, Paolo Bonzini wrote:
> On 12/21/21 11:12, Thomas Huth wrote:
>> On 21/12/2021 10.58, Paolo Bonzini wrote:
>>> On 12/21/21 10:21, Thomas Huth wrote:
>>>> Instead of failing the tests, we should rather skip them if ncat is
>>>> not available.
>>>> While we're at it, also mention ncat in the README.md file as a
>>>> requirement for the migration tests.
>>>>
>>>> Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
>>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>>
>>> I would rather remove the migration tests.  There's really no reason for 
>>> them, the KVM selftests in the Linux tree are much better: they can find 
>>> migration bugs deterministically and they are really really easy to 
>>> debug. The only disadvantage is that they are harder to write.
>>
>> I disagree: We're testing migration with QEMU here - the KVM selftests 
>> don't include QEMU, so we'd lose some test coverage here.
>> And at least the powerpc/sprs.c test helped to find some nasty bugs in the 
>> past already.
> 
> I understand that this is testing QEMU, but I'm not sure that testing QEMU 
> should be part of kvm-unit-tests.

It's the combination of QEMU (migration handling) + KVM in the kernel 
(register saving and restoring) that we are testing here. If you say that 
QEMU should not be involved at all, we could also say that all 
kvm-unit-tests should be converted to KVM selftests instead...

>  Migrating an instance of QEMU that runs 
> kvm-unit-tests would be done more easily in avocado-vt or avocado-qemu.

But we don't have the environment for compiling small, Linux-independent 
test kernels there, do we? So unless there is a way to write and compile 
small test kernels in that framework, I think kvm-unit-tests is the better 
fit for these kind of tests.

  Thomas

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
  2021-12-21  9:21 ` Thomas Huth
@ 2022-01-18 14:24   ` Paolo Bonzini
  -1 siblings, 0 replies; 18+ messages in thread
From: Paolo Bonzini @ 2022-01-18 14:24 UTC (permalink / raw)
  To: Thomas Huth, kvm, Laurent Vivier, Andrew Jones; +Cc: kvm-ppc, Eric Auger

On 12/21/21 10:21, Thomas Huth wrote:
> Instead of failing the tests, we should rather skip them if ncat is
> not available.
> While we're at it, also mention ncat in the README.md file as a
> requirement for the migration tests.
> 
> Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   README.md             | 4 ++++
>   scripts/arch-run.bash | 2 +-
>   2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/README.md b/README.md
> index 6e6a9d0..a82da56 100644
> --- a/README.md
> +++ b/README.md
> @@ -54,6 +54,10 @@ ACCEL=name environment variable:
>   
>       ACCEL=kvm ./x86-run ./x86/msr.flat
>   
> +For running tests that involve migration from one QEMU instance to another
> +you also need to have the "ncat" binary (from the nmap.org project) installed,
> +otherwise the related tests will be skipped.
> +
>   # Tests configuration file
>   
>   The test case may need specific runtime configurations, for
> diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
> index 43da998..cd92ed9 100644
> --- a/scripts/arch-run.bash
> +++ b/scripts/arch-run.bash
> @@ -108,7 +108,7 @@ run_migration ()
>   {
>   	if ! command -v ncat >/dev/null 2>&1; then
>   		echo "${FUNCNAME[0]} needs ncat (netcat)" >&2
> -		return 2
> +		return 77
>   	fi
>   
>   	migsock=$(mktemp -u -t mig-helper-socket.XXXXXXXXXX)

Queued, thanks.

Paolo

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
@ 2022-01-18 14:24   ` Paolo Bonzini
  0 siblings, 0 replies; 18+ messages in thread
From: Paolo Bonzini @ 2022-01-18 14:24 UTC (permalink / raw)
  To: Thomas Huth, kvm, Laurent Vivier, Andrew Jones; +Cc: kvm-ppc, Eric Auger

On 12/21/21 10:21, Thomas Huth wrote:
> Instead of failing the tests, we should rather skip them if ncat is
> not available.
> While we're at it, also mention ncat in the README.md file as a
> requirement for the migration tests.
> 
> Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   README.md             | 4 ++++
>   scripts/arch-run.bash | 2 +-
>   2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/README.md b/README.md
> index 6e6a9d0..a82da56 100644
> --- a/README.md
> +++ b/README.md
> @@ -54,6 +54,10 @@ ACCEL=name environment variable:
>   
>       ACCEL=kvm ./x86-run ./x86/msr.flat
>   
> +For running tests that involve migration from one QEMU instance to another
> +you also need to have the "ncat" binary (from the nmap.org project) installed,
> +otherwise the related tests will be skipped.
> +
>   # Tests configuration file
>   
>   The test case may need specific runtime configurations, for
> diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
> index 43da998..cd92ed9 100644
> --- a/scripts/arch-run.bash
> +++ b/scripts/arch-run.bash
> @@ -108,7 +108,7 @@ run_migration ()
>   {
>   	if ! command -v ncat >/dev/null 2>&1; then
>   		echo "${FUNCNAME[0]} needs ncat (netcat)" >&2
> -		return 2
> +		return 77
>   	fi
>   
>   	migsock=$(mktemp -u -t mig-helper-socket.XXXXXXXXXX)

Queued, thanks.

Paolo

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-01-18 14:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-21  9:21 [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available Thomas Huth
2021-12-21  9:21 ` Thomas Huth
2021-12-21  9:58 ` Paolo Bonzini
2021-12-21  9:58   ` Paolo Bonzini
2021-12-21 10:12   ` Thomas Huth
2021-12-21 10:12     ` Thomas Huth
2021-12-21 14:48     ` Eric Auger
2021-12-21 14:48       ` Eric Auger
2021-12-21 17:25     ` Paolo Bonzini
2021-12-21 17:25       ` Paolo Bonzini
2021-12-23 15:46       ` Andrew Jones
2021-12-23 15:46         ` Andrew Jones
2021-12-27 19:29       ` Thomas Huth
2021-12-27 19:29         ` Thomas Huth
2021-12-23 15:50 ` Andrew Jones
2021-12-23 15:50   ` Andrew Jones
2022-01-18 14:24 ` Paolo Bonzini
2022-01-18 14:24   ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.