From: Thomas Huth <thuth@redhat.com>
To: Janosch Frank <frankja@linux.ibm.com>,
Janis Schoetterl-Glausch <scgl@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: David Hildenbrand <david@redhat.com>,
kvm@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH v3] s390x: Add strict mode to specification exception interpretation test
Date: Thu, 25 Aug 2022 12:57:35 +0200 [thread overview]
Message-ID: <f7d86779-f67e-19eb-5ba1-da586ab6c6ef@redhat.com> (raw)
In-Reply-To: <d5b7dea2-3a43-a018-1474-1bb47ca9a6ff@linux.ibm.com>
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@linux.ibm.com>
>
> 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@redhat.com>
prev parent reply other threads:[~2022-08-25 10:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-05 11:17 [kvm-unit-tests PATCH v3] s390x: Add strict mode to specification exception interpretation test Janis Schoetterl-Glausch
2022-08-25 7:37 ` Janosch Frank
2022-08-25 10:57 ` Thomas Huth [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f7d86779-f67e-19eb-5ba1-da586ab6c6ef@redhat.com \
--to=thuth@redhat.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=scgl@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox