Re: [kvm-unit-tests PATCH 2/3] s390x: Beautify pfmf report strings

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

 



On 19/02/2019 09.49, Janosch Frank wrote:
> Use a 4k/1m prefix rather than mangling it into the report string.
> 
> Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
> ---
>  s390x/pfmf.c | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/s390x/pfmf.c b/s390x/pfmf.c
> index 4cc6bd1..340b0bd 100644
> --- a/s390x/pfmf.c
> +++ b/s390x/pfmf.c
> @@ -64,6 +64,7 @@ static void test_4k_key(void)
>  	union r1 r1;
>  	union skey skey;
>  
> +	report_prefix_push("4K");
>  	r1.val = 0;
>  	r1.reg.sk = 1;
>  	r1.reg.fsc = FSC_4K;
> @@ -71,7 +72,8 @@ static void test_4k_key(void)
>  	pfmf(r1.val, (unsigned long) pagebuf);
>  	skey.val = get_storage_key((unsigned long) pagebuf);
>  	skey.val &= SKEY_ACC | SKEY_FP;
> -	report("set 4k", skey.val == 0x30);
> +	report("set storage keys", skey.val == 0x30);
> +	report_prefix_pop();
>  }
>  
>  static void test_1m_key(void)
> @@ -80,6 +82,7 @@ static void test_1m_key(void)
>  	union r1 r1;
>  	union skey skey;
>  
> +	report_prefix_push("1M");
>  	r1.val = 0;
>  	r1.reg.sk = 1;
>  	r1.reg.fsc = FSC_1M;
> @@ -89,11 +92,12 @@ static void test_1m_key(void)
>  		skey.val = get_storage_key((unsigned long) pagebuf + i * PAGE_SIZE);
>  		skey.val &= SKEY_ACC | SKEY_FP;
>  		if (skey.val != 0x30) {
> -			report("set 1M", false);
> +			report("set storage keys", false);
>  			return;

I think you need a report_prefix_pop() before that return now.

>  		}
>  	}
> -	report("set 1M", true);
> +	report("set storage keys", true);
> +	report_prefix_pop();
>  }

 Thomas



[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