ACK: [PATCH 2/2] efirtmisc: add UEFI runtime service QueryCapsuleCapabilities interface stress test

Colin Ian King colin.king at canonical.com
Tue Jan 29 16:34:05 UTC 2013


On 28/01/13 08:44, Ivan Hu wrote:
> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
> ---
>   src/uefi/uefirtmisc/uefirtmisc.c |   20 +++++++++++++++++++-
>   1 file changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/src/uefi/uefirtmisc/uefirtmisc.c b/src/uefi/uefirtmisc/uefirtmisc.c
> index 8d7236c..8fd4b4c 100644
> --- a/src/uefi/uefirtmisc/uefirtmisc.c
> +++ b/src/uefi/uefirtmisc/uefirtmisc.c
> @@ -181,7 +181,14 @@ static int uefirtmisc_test1(fwts_framework *fw)
>   static int uefirtmisc_test2(fwts_framework *fw)
>   {
>   	int ret;
> -	uint32_t multitesttime = 1024;
> +	uint32_t multitesttime = 512;
> +	uint32_t i;
> +
> +	uint32_t flag[] = { 0,
> +			    CAPSULE_FLAGS_PERSIST_ACROSS_RESET,
> +			    CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE,
> +			    CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_INITIATE_RESET,
> +			    CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE | CAPSULE_FLAGS_INITIATE_RESET};
>
>   	fwts_log_info(fw, "Stress testing for UEFI runtime service GetNextHighMonotonicCount interface.");
>   	ret = getnexthighmonotoniccount_test(fw, multitesttime);
> @@ -190,6 +197,17 @@ static int uefirtmisc_test2(fwts_framework *fw)
>
>   	fwts_passed(fw, "UEFI runtime service GetNextHighMonotonicCount interface stress test passed.");
>
> +	fwts_log_info(fw, "Stress testing UEFI runtime service QueryCapsuleCapabilities interface.");
> +	for (i = 0; i < (sizeof(flag)/(sizeof flag[0])); i++) {
> +		ret = querycapsulecapabilities_test(fw, multitesttime, flag[i]);
> +		if (ret == FWTS_SKIP)
> +			continue;
> +		if (ret != FWTS_OK)
> +			return ret;
> +		fwts_passed(fw, "UEFI runtime service QueryCapsuleCapabilities interface stress test with flag value 0x%" PRIx32 " passed.", flag[i]);
> +
> +	}
> +
>   	return FWTS_OK;
>   }
>
>
Acked-by: Colin Ian King <colin.king at canonical.com>




More information about the fwts-devel mailing list