Re: [kvm-unit-tests PATCH v1 2/2] s390x: add migration test for storage keys

Nico Boehr
2022-05-13T12:15:28Z

On Thu, 2022-05-12 at 17:41 +0200, Claudio Imbrenda wrote:
> > diff --git a/s390x/migration-skey.c b/s390x/migration-skey.c
> > new file mode 100644
> > index 000000000000..6f3053d8ab40
[...]
> > +static void test_migration(void)
> > +{
[...]
> > +               /* ensure access key doesn't match storage key and
> > is never zero */
> > +               mismatching_key.str.acc = expected_key.str.acc < 15
> > ? expected_key.str.acc + 1 : 1;
>
> mismatching_key.str.acc = (expected_key.str.acc ^ 2) | 1;

As discussed in person: I had something like this before and thought it is
easier to understand with the tertiary operator. So I'd prefer to leave as-is.