From patchwork Mon Jan 14 03:40:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/2] uefirtmisc: add stress test for UEFI runtime GetNextHighMonotonicCount interface Date: Sun, 13 Jan 2013 17:40:18 -0000 From: IvanHu X-Patchwork-Id: 211700 Message-Id: <1358134818-17716-1-git-send-email-ivan.hu@canonical.com> To: fwts-devel@lists.ubuntu.com Signed-off-by: Ivan Hu Acked-by: Colin Ian King Acked-by: Keng-Yu Lin --- 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 } };