diff mbox

uefirtvariable: add more specific passed messages for each sub-tests

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

Commit Message

Ivan Hu Dec. 14, 2012, 9:48 a.m. UTC
Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 src/uefi/uefirtvariable/uefirtvariable.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

Comments

Colin Ian King Dec. 14, 2012, 10:09 a.m. UTC | #1
On 14/12/12 09:48, Ivan Hu wrote:
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>   src/uefi/uefirtvariable/uefirtvariable.c |   12 ++++++++++--
>   1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c
> index 1599c5b..d87253e 100644
> --- a/src/uefi/uefirtvariable/uefirtvariable.c
> +++ b/src/uefi/uefirtvariable/uefirtvariable.c
> @@ -609,33 +609,41 @@ static int uefirtvariable_test3(fwts_framework *fw)
>   	uint64_t index;
>   	uint64_t datasize1 = 10, datasize2 = 20;
>
> +	fwts_log_info(fw, "Testing SetVariable on two different GUIDs and the same variable name.");
>   	for (index = 0; index < (sizeof(attributesarray)/(sizeof attributesarray[0])); index++) {
>   		if (setvariable_test1(fw, attributesarray[index], datasize1, datasize2,
>   								variablenametest) == FWTS_ERROR)
>   			return FWTS_ERROR;
>   	}
> +	fwts_passed(fw, "SetVariable on two different GUIDs and the same variable name passed.");
>
> +	fwts_log_info(fw, "Testing SetVariable on the same and different variable data.");
>   	for (index = 0; index < (sizeof(attributesarray)/(sizeof attributesarray[0])); index++) {
>   		if (setvariable_test2(fw, attributesarray[index], variablenametest) == FWTS_ERROR)
>   			return FWTS_ERROR;
>   	}
> +	fwts_passed(fw, "SetVariable on the same and different variable data passed.");
>
> +	fwts_log_info(fw, "Testing SetVariable on similar variable name.");
>   	for (index = 0; index < (sizeof(attributesarray)/(sizeof attributesarray[0])); index++) {
>   		if (setvariable_test3(fw, attributesarray[index]) == FWTS_ERROR)
>   			return FWTS_ERROR;
>   	}
> +	fwts_passed(fw, "SetVariable on similar variable name passed.");
>
> +	fwts_log_info(fw, "Testing SetVariable on DataSize is 0.");
>   	for (index = 0; index < (sizeof(attributesarray)/(sizeof attributesarray[0])); index++) {
>   		if (setvariable_test4(fw, attributesarray[index]) == FWTS_ERROR)
>   			return FWTS_ERROR;
>   	}
> +	fwts_passed(fw, "SetVariable on DataSize is 0 passed.");
>
> +	fwts_log_info(fw, "Testing SetVariable on Attributes is 0.");
>   	for (index = 0; index < (sizeof(attributesarray)/(sizeof attributesarray[0])); index++) {
>   		if (setvariable_test5(fw, attributesarray[index]) == FWTS_ERROR)
>   			return FWTS_ERROR;
>   	}
> -
> -	fwts_passed(fw, "UEFI runtime service SetVariable interface test passed.");
> +	fwts_passed(fw, "SetVariable on Attributes is 0 passed.");
>
>   	return FWTS_OK;
>   }
>

Thanks Ivan.

Acked-by: Colin Ian King <colin.king@canonical.com>
Keng-Yu Lin Dec. 18, 2012, 3:08 a.m. UTC | #2
On Fri, Dec 14, 2012 at 5:48 PM, Ivan Hu <ivan.hu@canonical.com> wrote:
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>  src/uefi/uefirtvariable/uefirtvariable.c |   12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c
> index 1599c5b..d87253e 100644
> --- a/src/uefi/uefirtvariable/uefirtvariable.c
> +++ b/src/uefi/uefirtvariable/uefirtvariable.c
> @@ -609,33 +609,41 @@ static int uefirtvariable_test3(fwts_framework *fw)
>         uint64_t index;
>         uint64_t datasize1 = 10, datasize2 = 20;
>
> +       fwts_log_info(fw, "Testing SetVariable on two different GUIDs and the same variable name.");
>         for (index = 0; index < (sizeof(attributesarray)/(sizeof attributesarray[0])); index++) {
>                 if (setvariable_test1(fw, attributesarray[index], datasize1, datasize2,
>                                                                 variablenametest) == FWTS_ERROR)
>                         return FWTS_ERROR;
>         }
> +       fwts_passed(fw, "SetVariable on two different GUIDs and the same variable name passed.");
>
> +       fwts_log_info(fw, "Testing SetVariable on the same and different variable data.");
>         for (index = 0; index < (sizeof(attributesarray)/(sizeof attributesarray[0])); index++) {
>                 if (setvariable_test2(fw, attributesarray[index], variablenametest) == FWTS_ERROR)
>                         return FWTS_ERROR;
>         }
> +       fwts_passed(fw, "SetVariable on the same and different variable data passed.");
>
> +       fwts_log_info(fw, "Testing SetVariable on similar variable name.");
>         for (index = 0; index < (sizeof(attributesarray)/(sizeof attributesarray[0])); index++) {
>                 if (setvariable_test3(fw, attributesarray[index]) == FWTS_ERROR)
>                         return FWTS_ERROR;
>         }
> +       fwts_passed(fw, "SetVariable on similar variable name passed.");
>
> +       fwts_log_info(fw, "Testing SetVariable on DataSize is 0.");
>         for (index = 0; index < (sizeof(attributesarray)/(sizeof attributesarray[0])); index++) {
>                 if (setvariable_test4(fw, attributesarray[index]) == FWTS_ERROR)
>                         return FWTS_ERROR;
>         }
> +       fwts_passed(fw, "SetVariable on DataSize is 0 passed.");
>
> +       fwts_log_info(fw, "Testing SetVariable on Attributes is 0.");
>         for (index = 0; index < (sizeof(attributesarray)/(sizeof attributesarray[0])); index++) {
>                 if (setvariable_test5(fw, attributesarray[index]) == FWTS_ERROR)
>                         return FWTS_ERROR;
>         }
> -
> -       fwts_passed(fw, "UEFI runtime service SetVariable interface test passed.");
> +       fwts_passed(fw, "SetVariable on Attributes is 0 passed.");
>
>         return FWTS_OK;
>  }
> --
> 1.7.9.5
>
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
diff mbox

Patch

diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c
index 1599c5b..d87253e 100644
--- a/src/uefi/uefirtvariable/uefirtvariable.c
+++ b/src/uefi/uefirtvariable/uefirtvariable.c
@@ -609,33 +609,41 @@  static int uefirtvariable_test3(fwts_framework *fw)
 	uint64_t index;
 	uint64_t datasize1 = 10, datasize2 = 20;
 
+	fwts_log_info(fw, "Testing SetVariable on two different GUIDs and the same variable name.");
 	for (index = 0; index < (sizeof(attributesarray)/(sizeof attributesarray[0])); index++) {
 		if (setvariable_test1(fw, attributesarray[index], datasize1, datasize2,
 								variablenametest) == FWTS_ERROR)
 			return FWTS_ERROR;
 	}
+	fwts_passed(fw, "SetVariable on two different GUIDs and the same variable name passed.");
 
+	fwts_log_info(fw, "Testing SetVariable on the same and different variable data.");
 	for (index = 0; index < (sizeof(attributesarray)/(sizeof attributesarray[0])); index++) {
 		if (setvariable_test2(fw, attributesarray[index], variablenametest) == FWTS_ERROR)
 			return FWTS_ERROR;
 	}
+	fwts_passed(fw, "SetVariable on the same and different variable data passed.");
 
+	fwts_log_info(fw, "Testing SetVariable on similar variable name.");
 	for (index = 0; index < (sizeof(attributesarray)/(sizeof attributesarray[0])); index++) {
 		if (setvariable_test3(fw, attributesarray[index]) == FWTS_ERROR)
 			return FWTS_ERROR;
 	}
+	fwts_passed(fw, "SetVariable on similar variable name passed.");
 
+	fwts_log_info(fw, "Testing SetVariable on DataSize is 0.");
 	for (index = 0; index < (sizeof(attributesarray)/(sizeof attributesarray[0])); index++) {
 		if (setvariable_test4(fw, attributesarray[index]) == FWTS_ERROR)
 			return FWTS_ERROR;
 	}
+	fwts_passed(fw, "SetVariable on DataSize is 0 passed.");
 
+	fwts_log_info(fw, "Testing SetVariable on Attributes is 0.");
 	for (index = 0; index < (sizeof(attributesarray)/(sizeof attributesarray[0])); index++) {
 		if (setvariable_test5(fw, attributesarray[index]) == FWTS_ERROR)
 			return FWTS_ERROR;
 	}
-
-	fwts_passed(fw, "UEFI runtime service SetVariable interface test passed.");
+	fwts_passed(fw, "SetVariable on Attributes is 0 passed.");
 
 	return FWTS_OK;
 }