Re: [kvm-unit-tests PATCH v3] s390x: Add strict mode to specification exception interpretation test

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

 



On 25/08/2022 09.37, Janosch Frank wrote:
On 7/5/22 13:17, Janis Schoetterl-Glausch wrote:
While specification exception interpretation is not required to occur,
it can be useful for automatic regression testing to fail the test if it
does not occur.
Add a `--strict` argument to enable this.
`--strict` takes a list of machine types (as reported by STIDP)
for which to enable strict mode, for example
`--strict 3931,8562,8561,3907,3906,2965,2964`
will enable it for models z16 - z13.
Alternatively, strict mode can be enabled for all but the listed machine
types by prefixing the list with a `!`, for example
`--strict !1090,1091,2064,2066,2084,2086,2094,2096,2097,2098,2817,2818,2827,2828`
will enable it for z/Architecture models except those older than z13.
`--strict !` will enable it always.

Signed-off-by: Janis Schoetterl-Glausch <scgl@xxxxxxxxxxxxx>

GCC 11.2.0 isn't happy

s390x/spec_ex-sie.c: In function ‘test_spec_ex_sie’:
s390x/spec_ex-sie.c:70:17: error: format not a string literal and no format arguments [-Werror=format-security]
    70 |                 report(vm.sblk->gpsw.addr == 0xdeadbeee, msg);
       |                 ^~~~~~
s390x/spec_ex-sie.c:72:17: error: format not a string literal and no format arguments [-Werror=format-security]
    72 |                 report_info(msg);
       |                 ^~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [<builtin>: s390x/spec_ex-sie.o] Error 1

Too bad that GCC isn't smart enough to see that it is a constant string... I guess we have to add an artifical "%s" format string here now?

I have to page in the discussion again to know how this fits into the picture. Either that or Thomas tells me it's exactly what he wants and I'll add it to my queue once the compile problem has been fixed one way or another.

The point was that we wanted to use this k-u-t to automatically test a backport of the related kernel commit. Without the strict mode that is not possible since the test does not fail if the kernel backport is missing.

I just also noticed that I never replied to this v3 ... so FWIW, code looks fine to me (with the "%s" fixup on top of it), thus:

Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>




[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