[libvirt] [PATCH] cputest: Fix name of the file removed by cpu-parse.sh

Jiri Denemark posted 1 patch 7 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/c363281fd9f69cc40d89f5a352fa71fd52d312d1.1487252764.git.jdenemar@redhat.com
tests/cputestdata/cpu-parse.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] cputest: Fix name of the file removed by cpu-parse.sh
Posted by Jiri Denemark 7 years, 1 month ago
We want to remove the file created by

    json <<<"$data" >$fname.json

in case it was empty.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 tests/cputestdata/cpu-parse.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/cputestdata/cpu-parse.sh b/tests/cputestdata/cpu-parse.sh
index 1b5ab4a5a..c3b5ef106 100755
--- a/tests/cputestdata/cpu-parse.sh
+++ b/tests/cputestdata/cpu-parse.sh
@@ -53,5 +53,5 @@ json <<<"$data" >$fname.json
 if [[ -s $fname.json ]]; then
     echo $fname.json
 else
-    rm $fname.new.json
+    rm $fname.json
 fi
-- 
2.11.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] cputest: Fix name of the file removed by cpu-parse.sh
Posted by Erik Skultety 7 years, 1 month ago
On Thu, Feb 16, 2017 at 02:46:04PM +0100, Jiri Denemark wrote:
> We want to remove the file created by
> 
>     json <<<"$data" >$fname.json
> 
> in case it was empty.
> 
> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
> ---
>  tests/cputestdata/cpu-parse.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/cputestdata/cpu-parse.sh b/tests/cputestdata/cpu-parse.sh
> index 1b5ab4a5a..c3b5ef106 100755
> --- a/tests/cputestdata/cpu-parse.sh
> +++ b/tests/cputestdata/cpu-parse.sh
> @@ -53,5 +53,5 @@ json <<<"$data" >$fname.json
>  if [[ -s $fname.json ]]; then
>      echo $fname.json
>  else
> -    rm $fname.new.json
> +    rm $fname.json

Hmm, interesting mistake.

ACK

Erik


>  fi
> -- 
> 2.11.1
> 
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] cputest: Fix name of the file removed by cpu-parse.sh
Posted by Jiri Denemark 7 years, 1 month ago
On Fri, Feb 17, 2017 at 11:06:46 +0100, Erik Skultety wrote:
> On Thu, Feb 16, 2017 at 02:46:04PM +0100, Jiri Denemark wrote:
> > We want to remove the file created by
> > 
> >     json <<<"$data" >$fname.json
> > 
> > in case it was empty.
> > 
> > Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
> > ---
> >  tests/cputestdata/cpu-parse.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tests/cputestdata/cpu-parse.sh b/tests/cputestdata/cpu-parse.sh
> > index 1b5ab4a5a..c3b5ef106 100755
> > --- a/tests/cputestdata/cpu-parse.sh
> > +++ b/tests/cputestdata/cpu-parse.sh
> > @@ -53,5 +53,5 @@ json <<<"$data" >$fname.json
> >  if [[ -s $fname.json ]]; then
> >      echo $fname.json
> >  else
> > -    rm $fname.new.json
> > +    rm $fname.json
> 
> Hmm, interesting mistake.

It's just a leftover from a previous private version of the script. This
filename was actually used at some point.

> ACK

Thanks, pushed.

Jirka

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list