From patchwork Fri Jan 4 09:05:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ivanhu X-Patchwork-Id: 209401 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 0FD542C007A for ; Fri, 4 Jan 2013 20:05:47 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Tr3Dl-0004lU-Sy; Fri, 04 Jan 2013 09:05:45 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Tr3Dj-0004kk-En for fwts-devel@lists.ubuntu.com; Fri, 04 Jan 2013 09:05:43 +0000 Received: from [175.180.135.244] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Tr3Di-0005RC-RS; Fri, 04 Jan 2013 09:05:43 +0000 From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH 2/4] uefirtvariable: add stress test for UEFI runtime interface SetVariable with different data Date: Fri, 4 Jan 2013 17:05:38 +0800 Message-Id: <1357290338-4207-1-git-send-email-ivan.hu@canonical.com> X-Mailer: git-send-email 1.7.9.5 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@lists.ubuntu.com This stress test tests the UEFI runtime interface SetVariable by calling with different data multiple times. Signed-off-by: Ivan Hu Acked-by: Colin Ian King Acked-by: Keng-Yu Lin --- src/uefi/uefirtvariable/uefirtvariable.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c index e88d26e..bbe6f3f 100644 --- a/src/uefi/uefirtvariable/uefirtvariable.c +++ b/src/uefi/uefirtvariable/uefirtvariable.c @@ -923,6 +923,17 @@ static int uefirtvariable_test6(fwts_framework *fw) return FWTS_ERROR; fwts_passed(fw, "SetVariable on setting the variable with the same data multiple times passed."); + fwts_log_info(fw, "Testing SetVariable on setting the variable with different data multiple times."); + for (i = 0; i < multitesttime; i++) { + if (setvariable_insertvariable(fw, attributes, datasize+i, variablenametest, + >estguid1, datadiff) == FWTS_ERROR) + return FWTS_ERROR; + if (setvariable_insertvariable(fw, attributes, 0, variablenametest, + >estguid1, datadiff) == FWTS_ERROR) + return FWTS_ERROR; + } + fwts_passed(fw, "Testing SetVariable on setting the variable with different data multiple times passed."); + return FWTS_OK; }