Re: [kvm-unit-tests PATCH v6 4/4] s390x: SCLP unit test

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

 



On 1/9/20 5:16 PM, Claudio Imbrenda wrote:
> SCLP unit test. Testing the following:
> 
> * Correctly ignoring instruction bits that should be ignored
> * Privileged instruction check
> * Check for addressing exceptions
> * Specification exceptions:
>   - SCCB size less than 8
>   - SCCB unaligned
>   - SCCB overlaps prefix or lowcore
>   - SCCB address higher than 2GB
> * Return codes for
>   - Invalid command
>   - SCCB too short (but at least 8)
>   - SCCB page boundary violation
> 
> Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
> Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>

I wonder how fast this will run under z/VM and if we need to increase
the timeout.
Nicely done, one comment below.

Acked-by: Janosch Frank <frankja@xxxxxxxxxxxxx>


Tested under LPAR, KVM and PV

> ---
>  s390x/Makefile      |   1 +
>  s390x/sclp.c        | 472 ++++++++++++++++++++++++++++++++++++++++++++
>  s390x/unittests.cfg |   8 +
>  3 files changed, 481 insertions(+)
>  create mode 100644 s390x/sclp.c
[..]
> +/**
> + * Test SCCBs that are not 64-bit aligned.
> + */
> +static void test_sccb_unaligned(void)
> +{
> +	int offset;
> +
> +	for (offset = 1; offset < 8; offset++)
> +		if (!test_one_simple(valid_code, offset + pagebuf, 8, 8, PGM_BIT_SPEC, 0))
> +			break;
> +	report(offset == 8, "SCCB unaligned");
> +}
> +
> +/**
> + * Test SCCBs whose address is in the lowcore or prefix area.
> + */
> +static void test_sccb_prefix(void)
> +{
> +	uint8_t scratch[2 * PAGE_SIZE];

LC_SIZE?
Can also be used in more places below.

Attachment: signature.asc
Description: OpenPGP digital signature


[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