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

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

 



Ooops, I just realized I accidentally sent an empty message this
morning. Sorry!

On Tue, 31 May 2022 10:55:27 +0200
Thomas Huth <thuth@xxxxxxxxxx> wrote:

[...]
> > diff --git a/s390x/migration-skey.c b/s390x/migration-skey.c
> > new file mode 100644
> > index 000000000000..f846ac435836
> > --- /dev/null
> > +++ b/s390x/migration-skey.c
[...]
> > +	for (i = 0; i < NUM_PAGES; i++) {
> > +		report_prefix_pushf("page %d", i);
> > +
> > +		actual_key.val = get_storage_key(pagebuf[i]);
> > +		expected_key.val = i * 2;
> > +
> > +		/* ignore reference bit */
> > +		actual_key.str.rf = 0;
> > +		expected_key.str.rf = 0;  
> 
> If the reference bit gets always ignored, testing 64 pages should be
> enough? OTOH this will complicate the for-loop / creation of the key
> value, so I don't mind too much if we keep it this way.

Since it would make this thing more complex, I think I would just leave it as-is, 64 additional pages don't cost much.

[...]
> > +	if (test_facility(169)) {
> > +		report_skip("storage key removal facility is
> > active"); +
> > +		/*
> > +		 * If we just exit and don't ask migrate_cmd to
> > migrate us, it
> > +		 * will just hang forever. Hence, also ask for
> > migration when we
> > +		 * skip this test altogether.
> > +		 */
> > +		puts("Please migrate me, then press return\n");
> > +		(void)getchar();
> > +
> > +		goto done;
> > +	}
> > +
> > +	test_migration();
> > +
> > +done:  
> 
> 	} else {
> 		test_migration();
> 	}
> 
> to get rid of the goto?

Yes, makes sense, thank you.

[...]
> Either way:
> Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>

Thanks.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux