mbox series

[kvm-unit-tests,v3,0/2] s390x: Add migration test for guest TOD clock

Message ID 20221011170024.972135-1-nrb@linux.ibm.com (mailing list archive)
Headers show
Series s390x: Add migration test for guest TOD clock | expand

Message

Nico Boehr Oct. 11, 2022, 5 p.m. UTC
v2->v3:
---
- check the clock is really set after setting (thanks Claudio)
- remove unneeded memory clobber (thanks Claudio)
- add comment to explain what we're testing (thanks Christian)

v1->v2:
---
- remove unneeded include
- advance clock by 10 minutes instead of 1 minute (thanks Claudio)
- express get_clock_us() using stck() (thanks Claudio)

The guest TOD clock should not go backwards on migration. Add a test to
verify that.

To reduce code duplication, move some of the time-related defined
from the sck test to the library.

Nico Boehr (2):
  lib/s390x: move TOD clock related functions to library
  s390x: add migration TOD clock test

 lib/s390x/asm/time.h  | 50 ++++++++++++++++++++++++++++++++++++++-
 s390x/Makefile        |  1 +
 s390x/migration-sck.c | 54 +++++++++++++++++++++++++++++++++++++++++++
 s390x/sck.c           | 32 -------------------------
 s390x/unittests.cfg   |  4 ++++
 5 files changed, 108 insertions(+), 33 deletions(-)
 create mode 100644 s390x/migration-sck.c

Comments

Claudio Imbrenda Oct. 11, 2022, 5:09 p.m. UTC | #1
On Tue, 11 Oct 2022 19:00:22 +0200
Nico Boehr <nrb@linux.ibm.com> wrote:

> v2->v3:
> ---
> - check the clock is really set after setting (thanks Claudio)
> - remove unneeded memory clobber (thanks Claudio)
> - add comment to explain what we're testing (thanks Christian)
> 
> v1->v2:
> ---
> - remove unneeded include
> - advance clock by 10 minutes instead of 1 minute (thanks Claudio)
> - express get_clock_us() using stck() (thanks Claudio)
> 
> The guest TOD clock should not go backwards on migration. Add a test to
> verify that.
> 
> To reduce code duplication, move some of the time-related defined
> from the sck test to the library.
> 

thanks, picked

> Nico Boehr (2):
>   lib/s390x: move TOD clock related functions to library
>   s390x: add migration TOD clock test
> 
>  lib/s390x/asm/time.h  | 50 ++++++++++++++++++++++++++++++++++++++-
>  s390x/Makefile        |  1 +
>  s390x/migration-sck.c | 54 +++++++++++++++++++++++++++++++++++++++++++
>  s390x/sck.c           | 32 -------------------------
>  s390x/unittests.cfg   |  4 ++++
>  5 files changed, 108 insertions(+), 33 deletions(-)
>  create mode 100644 s390x/migration-sck.c
>