Patchwork [2/2] uefirtmisc: add stress test for UEFI runtime GetNextHighMonotonicCount interface

login
register
mail settings
Submitter Ivan Hu
Date Jan. 14, 2013, 3:40 a.m.
Message ID <1358134818-17716-1-git-send-email-ivan.hu@canonical.com>
Download mbox | patch
Permalink /patch/211700/
State Accepted
Headers show

Comments

Ivan Hu - Jan. 14, 2013, 3:40 a.m.
Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 src/uefi/uefirtmisc/uefirtmisc.c |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)
Colin King - Jan. 14, 2013, 9:53 a.m.
On 14/01/13 03:40, Ivan Hu wrote:
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>   src/uefi/uefirtmisc/uefirtmisc.c |   16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
>
> diff --git a/src/uefi/uefirtmisc/uefirtmisc.c b/src/uefi/uefirtmisc/uefirtmisc.c
> index 7a65e74..c8aff3d 100644
> --- a/src/uefi/uefirtmisc/uefirtmisc.c
> +++ b/src/uefi/uefirtmisc/uefirtmisc.c
> @@ -100,8 +100,24 @@ static int uefirtmisc_test1(fwts_framework *fw)
>   	return FWTS_OK;
>   }
>
> +static int uefirtmisc_test2(fwts_framework *fw)
> +{
> +	int ret;
> +	uint32_t multitesttime = 1024;
> +
> +	fwts_log_info(fw, "Stress testing for UEFI runtime service GetNextHighMonotonicCount interface.");
> +	ret = getnexthighmonotoniccount_test(fw, multitesttime);
> +	if (ret != FWTS_OK)
> +		return ret;
> +
> +	fwts_passed(fw, "UEFI runtime service GetNextHighMonotonicCount interface stress test passed.");
> +
> +	return FWTS_OK;
> +}
> +
>   static fwts_framework_minor_test uefirtmisc_tests[] = {
>   	{ uefirtmisc_test1, "Test for UEFI miscellaneous runtime service interfaces." },
> +	{ uefirtmisc_test2, "Stress test for UEFI miscellaneous runtime service interfaces." },
>   	{ NULL, NULL }
>   };
>
>
Acked-by: Colin Ian King <colin.king@canonical.com>
Keng-Yu Lin - Jan. 15, 2013, 5:14 a.m.
On Mon, Jan 14, 2013 at 11:40 AM, Ivan Hu <ivan.hu@canonical.com> wrote:
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>  src/uefi/uefirtmisc/uefirtmisc.c |   16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/src/uefi/uefirtmisc/uefirtmisc.c b/src/uefi/uefirtmisc/uefirtmisc.c
> index 7a65e74..c8aff3d 100644
> --- a/src/uefi/uefirtmisc/uefirtmisc.c
> +++ b/src/uefi/uefirtmisc/uefirtmisc.c
> @@ -100,8 +100,24 @@ static int uefirtmisc_test1(fwts_framework *fw)
>         return FWTS_OK;
>  }
>
> +static int uefirtmisc_test2(fwts_framework *fw)
> +{
> +       int ret;
> +       uint32_t multitesttime = 1024;
> +
> +       fwts_log_info(fw, "Stress testing for UEFI runtime service GetNextHighMonotonicCount interface.");
> +       ret = getnexthighmonotoniccount_test(fw, multitesttime);
> +       if (ret != FWTS_OK)
> +               return ret;
> +
> +       fwts_passed(fw, "UEFI runtime service GetNextHighMonotonicCount interface stress test passed.");
> +
> +       return FWTS_OK;
> +}
> +
>  static fwts_framework_minor_test uefirtmisc_tests[] = {
>         { uefirtmisc_test1, "Test for UEFI miscellaneous runtime service interfaces." },
> +       { uefirtmisc_test2, "Stress test for UEFI miscellaneous runtime service interfaces." },
>         { NULL, NULL }
>  };
>
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>

Patch

diff --git a/src/uefi/uefirtmisc/uefirtmisc.c b/src/uefi/uefirtmisc/uefirtmisc.c
index 7a65e74..c8aff3d 100644
--- a/src/uefi/uefirtmisc/uefirtmisc.c
+++ b/src/uefi/uefirtmisc/uefirtmisc.c
@@ -100,8 +100,24 @@  static int uefirtmisc_test1(fwts_framework *fw)
 	return FWTS_OK;
 }
 
+static int uefirtmisc_test2(fwts_framework *fw)
+{
+	int ret;
+	uint32_t multitesttime = 1024;
+
+	fwts_log_info(fw, "Stress testing for UEFI runtime service GetNextHighMonotonicCount interface.");
+	ret = getnexthighmonotoniccount_test(fw, multitesttime);
+	if (ret != FWTS_OK)
+		return ret;
+
+	fwts_passed(fw, "UEFI runtime service GetNextHighMonotonicCount interface stress test passed.");
+
+	return FWTS_OK;
+}
+
 static fwts_framework_minor_test uefirtmisc_tests[] = {
 	{ uefirtmisc_test1, "Test for UEFI miscellaneous runtime service interfaces." },
+	{ uefirtmisc_test2, "Stress test for UEFI miscellaneous runtime service interfaces." },
 	{ NULL, NULL }
 };