[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [OSSTEST PATCH 3/3] ts-livepatch-run: Fix erroneous $$ in double-check



On Wed, Jan 16, 2019 at 11:36:37AM +0000, Ian Jackson wrote:
> The doubled $s here are simply a mistake.  The result is to make this
> test ineffective, since `$$file' means `the value of the variable
> whose name is in the variable $file', which here will never exist.
> This produces a `Use of uninitialized value' warning and substitutes
> the empty string, so overall we test the existence of the directory.
> 
> The missing check is not of much consequence since this check is not
> really expected ever to fail, and if it does, some actual test
> execution would fail due to the missing file.
> 
> So overall I think the only change is to log output.
> 
> Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> CC: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>

Thank you!
> ---
>  ts-livepatch-run | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ts-livepatch-run b/ts-livepatch-run
> index f011e64e..86a79791 100755
> --- a/ts-livepatch-run
> +++ b/ts-livepatch-run
> @@ -161,7 +161,7 @@ sub livepatch_test () {
>  
>  sub livepatch_check () {
>      foreach my $file (@livepatch_files) {
> -        if (!target_file_exists($ho, "/usr/lib/debug/xen-livepatch/$$file")) 
> {
> +        if (!target_file_exists($ho, "/usr/lib/debug/xen-livepatch/$file")) {
>              die "$file is missing!\n";
>          }
>      }
> -- 
> 2.11.0
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.