Skip to contentSkip to conversation

s390x: Beautify pfmf report strings

PATCH Janosch Frank 1 participant 1 message Feb 25, 2019 1 message not in the archive s390

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --DEN2Uli1PW7s7ua1vBwpCX6a4szu7zyKa
Content-Type: multipart/mixed; boundary="US4R5HdbsvE7Qsw5XTYoDz2hMSmXDEvbR";
protected-headers="v1"
From: Janosch Frank <[email protected]>
To: Thomas Huth <[email protected]>, [email protected]
Cc: [email protected], [email protected]
Message-ID: <[email protected]>
Subject: Re: [kvm-unit-tests PATCH 2/3] s390x: Beautify pfmf report strings
References: <[email protected]>
<[email protected]> <[email protected]>
In-Reply-To: <[email protected]>

--US4R5HdbsvE7Qsw5XTYoDz2hMSmXDEvbR
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

Quoted 32 lines · Thomas Huth
Quoted 31 lines · Janosch Frank

Use a 4k/1m prefix rather than mangling it into the report string.

---
 s390x/pfmf.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
s390x/pfmf.c +0 -0
index 4cc6bd1..340b0bd 100644
@@ -64,6 +64,7 @@ static void test_4k_key(void)
 	union r1 r1;
 	union skey skey;

=20

s390x/pfmf.c +3 -1
+	report_prefix_push("4K");
 	r1.val =3D 0;
 	r1.reg.sk =3D 1;
 	r1.reg.fsc =3D FSC_4K;
@@ -71,7 +72,8 @@ static void test_4k_key(void)
 	pfmf(r1.val, (unsigned long) pagebuf);
 	skey.val =3D get_storage_key((unsigned long) pagebuf);
 	skey.val &=3D SKEY_ACC | SKEY_FP;
-	report("set 4k", skey.val =3D=3D 0x30);
+	report("set storage keys", skey.val =3D=3D 0x30);
+	report_prefix_pop();
 }

=20
static void test_1m_key(void)

s390x/pfmf.c +0 -0
@@ -80,6 +82,7 @@ static void test_1m_key(void)
 	union r1 r1;
Quoted 8 lines

s390x/pfmf.c static void test_1m_key(void) · line 92

Quoted 8 lines
s390x/pfmf.c +0 -0
 	union skey skey;

=20

s390x/pfmf.c +1 -0
+	report_prefix_push("1M");
 	r1.val =3D 0;
 	r1.reg.sk =3D 1;
 	r1.reg.fsc =3D FSC_1M;
@@ -89,11 +92,12 @@ static void test_1m_key(void)
 		skey.val =3D get_storage_key((unsigned long) pagebuf + i * PAGE_SIZ=

E);

Quoted 7 lines

s390x/pfmf.c static void test_1m_key(void) · line 96

Quoted 5 lines
s390x/pfmf.c +1 -1
 		skey.val &=3D SKEY_ACC | SKEY_FP;
 		if (skey.val !=3D 0x30) {
-			report("set 1M", false);
+			report("set storage keys", false);
 			return;

=20
I think you need a report_prefix_pop() before that return now.

I'll introduce a new bool rp =3D true, set it to false on error and break=

put of the loop.

The report will be based on rp.

Quoted 10 lines

=20

s390x/pfmf.c static void test_1m_key(void) · line 101

Quoted 6 lines
s390x/pfmf.c +2 -1
 		}
 	}
-	report("set 1M", true);
+	report("set storage keys", true);
+	report_prefix_pop();
 }

=20
Thomas
=20

--US4R5HdbsvE7Qsw5XTYoDz2hMSmXDEvbR--

--DEN2Uli1PW7s7ua1vBwpCX6a4szu7zyKa
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJcc/vTAAoJEONU5rjiOLn4WxIQAMgNe2McsuJuW1KF3zAZz4aK 2Xd2/TjP9JobjLUR9tarq4UdGvt/JgBpsudomX/tMytvDu37PvkN28+4RaPT2Do5 MjdEMteaaEPAJ/37zYUVZ5HjlH2ROnEIIzI/rQIzw1+K8lwyRYFIQvg5tpV/k5Uu Q3Ov6isJ7Jz7OxtGzkcB6Xh756qJqZKdfv8pLxBRHlvYC3S6RTTSeo+kWrIxs9DV L5RyIkYyhRFi7MJ7BZXZlHOwTi0dZXYIaA1YlBuNElKNwBNQW31/ullNZXoE88YZ c00j3xQTzN1EF9NLXhULPMDo0zxYAXLqaz3gClZE2MSdg3mUGpIYYnD/2vP8ILv8 mwCge8IO+zZe+0rzgVC1+WyxQ4q6egmrSwazDJvGYZB19sAFN+BGcvGOB1h/dSvN w3RugrW9XIJKpQZ+GKuvm47vVNc+qRrJv0/PKJlLu6QvOpPU+jJsH3Ls9nRBeQDd y70QE4aIUEV2DgcRiiGthCjEoQ/c5BsZqp85H0SoH9M4vqirXQFzKUASVFXzdPyC NhPjM/GYo9Eb3t+kR5qa/n7kAJ8+pxJOUGPatglWOIGcDah59uPnxwaNu33eT2mz hXzG8MAEZ8PiDJIPd5WgM9EKhoIOzuVRl51WPKRpxg0hh/0dlTwwvnqUrRUtWpqi 6vTen1Luors4lC9E4fns
=SjD/
-----END PGP SIGNATURE-----

--DEN2Uli1PW7s7ua1vBwpCX6a4szu7zyKa--