diff mbox series

[1/1] uefirttime: Fix incorrect error messages for invalid time test

Message ID 20210730062429.1133-1-Sunny.Wang@arm.com
State Accepted
Headers show
Series [1/1] uefirttime: Fix incorrect error messages for invalid time test | expand

Commit Message

Sunny Wang July 30, 2021, 6:24 a.m. UTC
uefirttime_test_settime_invalid_time() gets and sets time rather
than wakeup time, but the error message shows that it gets and sets
wakeup time, which is incorrect.
Note that the incorrect error message would cause fake failure in Test
Failure Summary.

Signed-off-by: Sunny Wang <sunny.wang@arm.com>
---
 src/uefi/uefirttime/uefirttime.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Colin Ian King July 30, 2021, 6:27 a.m. UTC | #1
On 30/07/2021 07:24, Sunny Wang wrote:
> uefirttime_test_settime_invalid_time() gets and sets time rather
> than wakeup time, but the error message shows that it gets and sets
> wakeup time, which is incorrect.
> Note that the incorrect error message would cause fake failure in Test
> Failure Summary.
> 
> Signed-off-by: Sunny Wang <sunny.wang@arm.com>
> ---
>  src/uefi/uefirttime/uefirttime.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/uefi/uefirttime/uefirttime.c b/src/uefi/uefirttime/uefirttime.c
> index 786f29a2..d2c2f91d 100644
> --- a/src/uefi/uefirttime/uefirttime.c
> +++ b/src/uefi/uefirttime/uefirttime.c
> @@ -1,5 +1,6 @@
>  /*
>   * Copyright (C) 2012-2021 Canonical
> + * Copyright (c) 2021, ARM Limited. All rights reserved.
>   *
>   * This program is free software; you can redistribute it and/or
>   * modify it under the terms of the GNU General Public License
> @@ -513,7 +514,7 @@ static int uefirttime_test_settime_invalid_time(
>  			return FWTS_SKIP;
>  		}
>  		fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeGetTime",
> -			"Failed to get wakeup time with UEFI runtime service.");
> +			"Failed to get time with UEFI runtime service.");
>  		fwts_uefi_print_status_info(fw, status);
>  		return FWTS_ERROR;
>  	}
> @@ -556,7 +557,7 @@ static int uefirttime_test_settime_invalid_time(
>  			return FWTS_SKIP;
>  		}
>  		fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeSetTime",
> -			"Failed to set wakeup time with UEFI runtime service.");
> +			"Failed to set time with UEFI runtime service.");
>  		fwts_uefi_print_status_info(fw, status);
>  		return FWTS_ERROR;
>  	}
> 

Looks good to me. Thanks Sunny.

Acked-by: Colin Ian King <colin.king@canonical.com>
Ivan Hu July 30, 2021, 7:27 a.m. UTC | #2
On 7/30/21 2:24 PM, Sunny Wang wrote:
> uefirttime_test_settime_invalid_time() gets and sets time rather
> than wakeup time, but the error message shows that it gets and sets
> wakeup time, which is incorrect.
> Note that the incorrect error message would cause fake failure in Test
> Failure Summary.
> 
> Signed-off-by: Sunny Wang <sunny.wang@arm.com>
> ---
>  src/uefi/uefirttime/uefirttime.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/uefi/uefirttime/uefirttime.c b/src/uefi/uefirttime/uefirttime.c
> index 786f29a2..d2c2f91d 100644
> --- a/src/uefi/uefirttime/uefirttime.c
> +++ b/src/uefi/uefirttime/uefirttime.c
> @@ -1,5 +1,6 @@
>  /*
>   * Copyright (C) 2012-2021 Canonical
> + * Copyright (c) 2021, ARM Limited. All rights reserved.
>   *
>   * This program is free software; you can redistribute it and/or
>   * modify it under the terms of the GNU General Public License
> @@ -513,7 +514,7 @@ static int uefirttime_test_settime_invalid_time(
>  			return FWTS_SKIP;
>  		}
>  		fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeGetTime",
> -			"Failed to get wakeup time with UEFI runtime service.");
> +			"Failed to get time with UEFI runtime service.");
>  		fwts_uefi_print_status_info(fw, status);
>  		return FWTS_ERROR;
>  	}
> @@ -556,7 +557,7 @@ static int uefirttime_test_settime_invalid_time(
>  			return FWTS_SKIP;
>  		}
>  		fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeSetTime",
> -			"Failed to set wakeup time with UEFI runtime service.");
> +			"Failed to set time with UEFI runtime service.");
>  		fwts_uefi_print_status_info(fw, status);
>  		return FWTS_ERROR;
>  	}
> 


Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox series

Patch

diff --git a/src/uefi/uefirttime/uefirttime.c b/src/uefi/uefirttime/uefirttime.c
index 786f29a2..d2c2f91d 100644
--- a/src/uefi/uefirttime/uefirttime.c
+++ b/src/uefi/uefirttime/uefirttime.c
@@ -1,5 +1,6 @@ 
 /*
  * Copyright (C) 2012-2021 Canonical
+ * Copyright (c) 2021, ARM Limited. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -513,7 +514,7 @@  static int uefirttime_test_settime_invalid_time(
 			return FWTS_SKIP;
 		}
 		fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeGetTime",
-			"Failed to get wakeup time with UEFI runtime service.");
+			"Failed to get time with UEFI runtime service.");
 		fwts_uefi_print_status_info(fw, status);
 		return FWTS_ERROR;
 	}
@@ -556,7 +557,7 @@  static int uefirttime_test_settime_invalid_time(
 			return FWTS_SKIP;
 		}
 		fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeSetTime",
-			"Failed to set wakeup time with UEFI runtime service.");
+			"Failed to set time with UEFI runtime service.");
 		fwts_uefi_print_status_info(fw, status);
 		return FWTS_ERROR;
 	}