Re: [kvm-unit-tests PATCH 1/9] s390x: uv: Tolerate 0x100 query return code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22/09/2021 13.36, Janosch Frank wrote:
On 9/22/21 11:12 AM, Claudio Imbrenda wrote:
On Wed, 22 Sep 2021 07:18:03 +0000
Janosch Frank <frankja@xxxxxxxxxxxxx> wrote:

RC 0x100 is not an error but a notice that we could have gotten more
data from the Ultravisor if we had asked for it. So let's tolerate
them in our tests.

Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
---
  s390x/uv-guest.c | 4 ++--
  s390x/uv-host.c  | 2 +-
  2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/s390x/uv-guest.c b/s390x/uv-guest.c
index f05ae4c3..e7446e03 100644
--- a/s390x/uv-guest.c
+++ b/s390x/uv-guest.c
@@ -70,8 +70,8 @@ static void test_query(void)
  	report(cc == 1 && uvcb.header.rc == UVC_RC_INV_LEN, "length");
uvcb.header.len = sizeof(uvcb);
-	cc = uv_call(0, (u64)&uvcb);
-	report(cc == 0 && uvcb.header.rc == UVC_RC_EXECUTED, "successful query");
+	uv_call(0, (u64)&uvcb);
+	report(uvcb.header.rc == UVC_RC_EXECUTED || uvcb.header.rc
== 0x100, "successful query");

if you want to be even more pedantic:
	report(cc == 0 && uvcb.header.rc == UVC_RC_EXECUTED ||
		cc == 1 && uvcb.header.rc == 0x100, ...

Yeah I pondered about that but at the end I chose to drop the cc check

Well, but we're in the kvm-unit-tests here where we check for the exact behavior of the system ... so I'd vote for keeping/extening the cc checking, even if it's more code to read in the end.

 Thomas




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux