diff mbox

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

Message ID 1358134818-17716-1-git-send-email-ivan.hu@canonical.com
State Accepted
Headers show

Commit Message

Ivan Hu Jan. 14, 2013, 3:40 a.m. UTC
Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 src/uefi/uefirtmisc/uefirtmisc.c |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Colin Ian King Jan. 14, 2013, 9:53 a.m. UTC | #1
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. UTC | #2
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>
diff mbox

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 }
 };