diff mbox series

[kvm-unit-tests,v1,1/3] runtime: Fix the missing last_line

Message ID 20231129032123.2658343-2-shahuang@redhat.com (mailing list archive)
State New, archived
Headers show
Series arm64: runtime scripts improvements on efi | expand

Commit Message

Shaoqin Huang Nov. 29, 2023, 3:21 a.m. UTC
The last_line is deleted by the 2607d2d6 ("arm64: Add an efi/run script").
This lead to when SKIP test, the reason is missing. Fix the problem by
adding last_line back.

Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
---
 scripts/runtime.bash | 2 ++
 1 file changed, 2 insertions(+)

Comments

Andrew Jones Nov. 29, 2023, 9:11 a.m. UTC | #1
On Tue, Nov 28, 2023 at 10:21:21PM -0500, Shaoqin Huang wrote:
> The last_line is deleted by the 2607d2d6 ("arm64: Add an efi/run script").
> This lead to when SKIP test, the reason is missing. Fix the problem by
> adding last_line back.
> 
> Signed-off-by: Shaoqin Huang <shahuang@redhat.com>

Fixes: 2607d2d6 ("arm64: Add an efi/run script")

> ---
>  scripts/runtime.bash | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/scripts/runtime.bash b/scripts/runtime.bash
> index fc156f2f..d7054b80 100644
> --- a/scripts/runtime.bash
> +++ b/scripts/runtime.bash
> @@ -148,6 +148,8 @@ function run()
>              fi
>          fi
>  
> +	last_line=$(tail -1 <<<"$log")
> +
>          if [ ${skip} == true ]; then
>              print_result "SKIP" $testname "" "$last_line"

We can just change this one use of $last_line to $(tail -1 <<<"$log")

>              return 77
> -- 
> 2.40.1
>

Thanks,
drew
Shaoqin Huang Nov. 29, 2023, 10:15 a.m. UTC | #2
Hi drew,

On 11/29/23 17:11, Andrew Jones wrote:
> On Tue, Nov 28, 2023 at 10:21:21PM -0500, Shaoqin Huang wrote:
>> The last_line is deleted by the 2607d2d6 ("arm64: Add an efi/run script").
>> This lead to when SKIP test, the reason is missing. Fix the problem by
>> adding last_line back.
>>
>> Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
> 
> Fixes: 2607d2d6 ("arm64: Add an efi/run script")
> 

Will add it.

>> ---
>>   scripts/runtime.bash | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/scripts/runtime.bash b/scripts/runtime.bash
>> index fc156f2f..d7054b80 100644
>> --- a/scripts/runtime.bash
>> +++ b/scripts/runtime.bash
>> @@ -148,6 +148,8 @@ function run()
>>               fi
>>           fi
>>   
>> +	last_line=$(tail -1 <<<"$log")
>> +
>>           if [ ${skip} == true ]; then
>>               print_result "SKIP" $testname "" "$last_line"
> 
> We can just change this one use of $last_line to $(tail -1 <<<"$log")
> 

Got it. Looks good.

Thanks,
Shaoqin

>>               return 77
>> -- 
>> 2.40.1
>>
> 
> Thanks,
> drew
>
diff mbox series

Patch

diff --git a/scripts/runtime.bash b/scripts/runtime.bash
index fc156f2f..d7054b80 100644
--- a/scripts/runtime.bash
+++ b/scripts/runtime.bash
@@ -148,6 +148,8 @@  function run()
             fi
         fi
 
+	last_line=$(tail -1 <<<"$log")
+
         if [ ${skip} == true ]; then
             print_result "SKIP" $testname "" "$last_line"
             return 77