[PATCH v1 2/5] tests/migration: Make initrd-stress.img built by default

yong.huang@smartx.com posted 5 patches 3 months, 2 weeks ago
There is a newer version of this series
[PATCH v1 2/5] tests/migration: Make initrd-stress.img built by default
Posted by yong.huang@smartx.com 3 months, 2 weeks ago
From: Hyman Huang <yong.huang@smartx.com>

The initrd-stress.img was compiled by specifying the
target, to make it easier for developers to play the
guestperf tool, make it built by default.

Signed-off-by: Hyman Huang <yong.huang@smartx.com>
---
 tests/migration/meson.build | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/migration/meson.build b/tests/migration/meson.build
index a91aa61c65..393e401800 100644
--- a/tests/migration/meson.build
+++ b/tests/migration/meson.build
@@ -7,12 +7,13 @@ stress = executable(
   files('stress.c'),
   dependencies: [glib_static, sysprof],
   link_args: ['-static'],
-  build_by_default: false,
+  build_by_default: true,
 )
 
 custom_target(
   'initrd-stress.img',
   output: 'initrd-stress.img',
   input: stress,
-  command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@']
+  command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@'],
+  build_by_default: true,
 )
-- 
2.11.0
Re: [PATCH v1 2/5] tests/migration: Make initrd-stress.img built by default
Posted by Fabiano Rosas 3 months, 2 weeks ago
yong.huang@smartx.com writes:

> From: Hyman Huang <yong.huang@smartx.com>
>
> The initrd-stress.img was compiled by specifying the
> target, to make it easier for developers to play the
> guestperf tool, make it built by default.
>
> Signed-off-by: Hyman Huang <yong.huang@smartx.com>
> ---
>  tests/migration/meson.build | 5 +++--

This could have moved along with the rest of guestperf. There's already
a scripts/meson.build where these could go.
Re: [PATCH v1 2/5] tests/migration: Make initrd-stress.img built by default
Posted by Daniel P. Berrangé 3 months, 2 weeks ago
On Fri, Aug 09, 2024 at 03:43:33PM +0800, yong.huang@smartx.com wrote:
> From: Hyman Huang <yong.huang@smartx.com>
> 
> The initrd-stress.img was compiled by specifying the
> target, to make it easier for developers to play the
> guestperf tool, make it built by default.

If you're going to do this, then you will need to make sure it is only
built on a Linux host, and when glib static & sysprof are found. eg

  if host_os == 'linux' && glib_static.found() && sysprof.found()

> 
> Signed-off-by: Hyman Huang <yong.huang@smartx.com>
> ---
>  tests/migration/meson.build | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/migration/meson.build b/tests/migration/meson.build
> index a91aa61c65..393e401800 100644
> --- a/tests/migration/meson.build
> +++ b/tests/migration/meson.build
> @@ -7,12 +7,13 @@ stress = executable(
>    files('stress.c'),
>    dependencies: [glib_static, sysprof],
>    link_args: ['-static'],
> -  build_by_default: false,
> +  build_by_default: true,
>  )
>  
>  custom_target(
>    'initrd-stress.img',
>    output: 'initrd-stress.img',
>    input: stress,
> -  command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@']
> +  command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@'],
> +  build_by_default: true,
>  )
> -- 
> 2.11.0
> 
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Re: [PATCH v1 2/5] tests/migration: Make initrd-stress.img built by default
Posted by Yong Huang 3 months, 2 weeks ago
On Fri, Aug 9, 2024 at 4:34 PM Daniel P. Berrangé <berrange@redhat.com>
wrote:

> On Fri, Aug 09, 2024 at 03:43:33PM +0800, yong.huang@smartx.com wrote:
> > From: Hyman Huang <yong.huang@smartx.com>
> >
> > The initrd-stress.img was compiled by specifying the
> > target, to make it easier for developers to play the
> > guestperf tool, make it built by default.
>
> If you're going to do this, then you will need to make sure it is only
> built on a Linux host, and when glib static & sysprof are found. eg
>
>   if host_os == 'linux' && glib_static.found() && sysprof.found()


Ok, thanks for the comments, I'll add the check in the next version.


>
>
>
> > Signed-off-by: Hyman Huang <yong.huang@smartx.com>
> > ---
> >  tests/migration/meson.build | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/migration/meson.build b/tests/migration/meson.build
> > index a91aa61c65..393e401800 100644
> > --- a/tests/migration/meson.build
> > +++ b/tests/migration/meson.build
> > @@ -7,12 +7,13 @@ stress = executable(
> >    files('stress.c'),
> >    dependencies: [glib_static, sysprof],
> >    link_args: ['-static'],
> > -  build_by_default: false,
> > +  build_by_default: true,
> >  )
> >
> >  custom_target(
> >    'initrd-stress.img',
> >    output: 'initrd-stress.img',
> >    input: stress,
> > -  command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@']
> > +  command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@'],
> > +  build_by_default: true,
> >  )
> > --
> > 2.11.0
> >
> >
>
> With regards,
> Daniel
> --
> |: https://berrange.com      -o-
> https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-
> https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-
> https://www.instagram.com/dberrange :|
>
>

-- 
Best regards