diff mbox series

[1/1] package/libtracefs: disable utest

Message ID 20240225171149.1447606-1-fontaine.fabrice@gmail.com
State Superseded
Headers show
Series [1/1] package/libtracefs: disable utest | expand

Commit Message

Fabrice Fontaine Feb. 25, 2024, 5:11 p.m. UTC
Disable utest to avoid the following build failure raised since the
addition of the package in commit
b1dbd3f679e6660325472e3fdca72127d74e6929 if cunit is found:

../utest/tracefs-utest.c: In function 'test_uprobes_instance':
../utest/tracefs-utest.c:2492:19: error: 'PATH_MAX' undeclared (first use in this function)
 2492 |         char self[PATH_MAX] = { 0 };
      |                   ^~~~~~~~

Fixes: b1dbd3f679e6660325472e3fdca72127d74e6929
 - http://autobuild.buildroot.org/results/1a01883231dbc8a7688de26db9a08751165fe8fe

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../0002-meson-add-utest-option.patch         | 40 +++++++++++++++++++
 package/libtracefs/libtracefs.mk              |  3 +-
 2 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 package/libtracefs/0002-meson-add-utest-option.patch

Comments

Giulio Benetti Feb. 25, 2024, 7:23 p.m. UTC | #1
Hi Fabrice,

thanks a lot for the patch,

On 25/02/24 18:11, Fabrice Fontaine wrote:
> Disable utest to avoid the following build failure raised since the
> addition of the package in commit
> b1dbd3f679e6660325472e3fdca72127d74e6929 if cunit is found:
> 
> ../utest/tracefs-utest.c: In function 'test_uprobes_instance':
> ../utest/tracefs-utest.c:2492:19: error: 'PATH_MAX' undeclared (first use in this function)
>   2492 |         char self[PATH_MAX] = { 0 };
>        |                   ^~~~~~~~
> 
> Fixes: b1dbd3f679e6660325472e3fdca72127d74e6929
>   - http://autobuild.buildroot.org/results/1a01883231dbc8a7688de26db9a08751165fe8fe
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>   .../0002-meson-add-utest-option.patch         | 40 +++++++++++++++++++
>   package/libtracefs/libtracefs.mk              |  3 +-
>   2 files changed, 42 insertions(+), 1 deletion(-)
>   create mode 100644 package/libtracefs/0002-meson-add-utest-option.patch
> 
> diff --git a/package/libtracefs/0002-meson-add-utest-option.patch b/package/libtracefs/0002-meson-add-utest-option.patch
> new file mode 100644
> index 0000000000..90f73a7ea0
> --- /dev/null
> +++ b/package/libtracefs/0002-meson-add-utest-option.patch
> @@ -0,0 +1,40 @@
> +From 7a09e2d414959075e2177c50ef1d4bf606b9ccdc Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Thu, 15 Feb 2024 21:20:29 +0100
> +Subject: [PATCH] meson: add utest option
> +
> +Add utest option to allow the user to disable utest
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Upstream: https://github.com/rostedt/libtracefs/pull/2

For this project you have to git send-email the patch to:
linux-trace-devel@vger.kernel.org

as documented in:
https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/tree/README#n45

Can you do that? Otherwise I can send the patch.

Thank you!

Best regards
Fabrice Fontaine Feb. 26, 2024, 6:52 a.m. UTC | #2
Hello Giulio,

Le dim. 25 févr. 2024 à 20:23, Giulio Benetti
<giulio.benetti@benettiengineering.com> a écrit :
>
> Hi Fabrice,
>
> thanks a lot for the patch,
>
> On 25/02/24 18:11, Fabrice Fontaine wrote:
> > Disable utest to avoid the following build failure raised since the
> > addition of the package in commit
> > b1dbd3f679e6660325472e3fdca72127d74e6929 if cunit is found:
> >
> > ../utest/tracefs-utest.c: In function 'test_uprobes_instance':
> > ../utest/tracefs-utest.c:2492:19: error: 'PATH_MAX' undeclared (first use in this function)
> >   2492 |         char self[PATH_MAX] = { 0 };
> >        |                   ^~~~~~~~
> >
> > Fixes: b1dbd3f679e6660325472e3fdca72127d74e6929
> >   - http://autobuild.buildroot.org/results/1a01883231dbc8a7688de26db9a08751165fe8fe
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >   .../0002-meson-add-utest-option.patch         | 40 +++++++++++++++++++
> >   package/libtracefs/libtracefs.mk              |  3 +-
> >   2 files changed, 42 insertions(+), 1 deletion(-)
> >   create mode 100644 package/libtracefs/0002-meson-add-utest-option.patch
> >
> > diff --git a/package/libtracefs/0002-meson-add-utest-option.patch b/package/libtracefs/0002-meson-add-utest-option.patch
> > new file mode 100644
> > index 0000000000..90f73a7ea0
> > --- /dev/null
> > +++ b/package/libtracefs/0002-meson-add-utest-option.patch
> > @@ -0,0 +1,40 @@
> > +From 7a09e2d414959075e2177c50ef1d4bf606b9ccdc Mon Sep 17 00:00:00 2001
> > +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > +Date: Thu, 15 Feb 2024 21:20:29 +0100
> > +Subject: [PATCH] meson: add utest option
> > +
> > +Add utest option to allow the user to disable utest
> > +
> > +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > +Upstream: https://github.com/rostedt/libtracefs/pull/2
>
> For this project you have to git send-email the patch to:
> linux-trace-devel@vger.kernel.org
>
> as documented in:
> https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/tree/README#n45
>
> Can you do that? Otherwise I can send the patch.

Done: https://lore.kernel.org/linux-trace-devel/20240225204759.3263-1-fontaine.fabrice@gmail.com/T/#u

>
> Thank you!
>
> Best regards
> --
> Giulio Benetti
> CEO&CTO@Benetti Engineering sas
>
> > +---
> > + meson.build       | 2 +-
> > + meson_options.txt | 2 ++
> > + 2 files changed, 3 insertions(+), 1 deletion(-)
> > +
> > +diff --git a/meson.build b/meson.build
> > +index 3156f1c..d4cfd53 100644
> > +--- a/meson.build
> > ++++ b/meson.build
> > +@@ -35,7 +35,7 @@ incdir = include_directories(['include'])
> > +
> > + subdir('src')
> > + subdir('include')
> > +-if cunit_dep.found()
> > ++if get_option('utest') and cunit_dep.found()
> > +     subdir('utest')
> > + endif
> > + if get_option('samples')
> > +diff --git a/meson_options.txt b/meson_options.txt
> > +index 8450992..a48efea 100644
> > +--- a/meson_options.txt
> > ++++ b/meson_options.txt
> > +@@ -18,3 +18,5 @@ option('doc', type : 'boolean', value: true,
> > +        description : 'produce documentation')
> > + option('samples', type : 'boolean', value: true,
> > +        description : 'build samples')
> > ++option('utest', type : 'boolean', value: true,
> > ++       description : 'build utest')
> > +--
> > +2.43.0
> > +
> > diff --git a/package/libtracefs/libtracefs.mk b/package/libtracefs/libtracefs.mk
> > index ed45fcbc50..21cb8e84e3 100644
> > --- a/package/libtracefs/libtracefs.mk
> > +++ b/package/libtracefs/libtracefs.mk
> > @@ -14,6 +14,7 @@ LIBTRACEFS_DEPENDENCIES = host-bison host-flex host-pkgconf libtraceevent
> >
> >   LIBTRACEFS_CONF_OPTS = \
> >       -Ddoc=false \
> > -     -Dsamples=false
> > +     -Dsamples=false \
> > +     -Dutest=false
> >
> >   $(eval $(meson-package))
>

Best Regards,

Fabrice
Arnout Vandecappelle March 3, 2024, 4:55 p.m. UTC | #3
On 25/02/2024 18:11, Fabrice Fontaine wrote:
> Disable utest to avoid the following build failure raised since the
> addition of the package in commit
> b1dbd3f679e6660325472e3fdca72127d74e6929 if cunit is found:
> 
> ../utest/tracefs-utest.c: In function 'test_uprobes_instance':
> ../utest/tracefs-utest.c:2492:19: error: 'PATH_MAX' undeclared (first use in this function)
>   2492 |         char self[PATH_MAX] = { 0 };
>        |                   ^~~~~~~~

  This issue was discussed on the mailing list [1] and apparently is fixed 
upstream. Could you cherry-pick the upstream fix instead?

  Marked as Changes Requested.

  Regards,
  Arnout

[1] 
https://lore.kernel.org/linux-trace-devel/CZBS6H2ZDU7T.1JYZ4DRUCZSJB@sakura.myxoz.lan/T/#u



> 
> Fixes: b1dbd3f679e6660325472e3fdca72127d74e6929
>   - http://autobuild.buildroot.org/results/1a01883231dbc8a7688de26db9a08751165fe8fe
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>   .../0002-meson-add-utest-option.patch         | 40 +++++++++++++++++++
>   package/libtracefs/libtracefs.mk              |  3 +-
>   2 files changed, 42 insertions(+), 1 deletion(-)
>   create mode 100644 package/libtracefs/0002-meson-add-utest-option.patch
> 
> diff --git a/package/libtracefs/0002-meson-add-utest-option.patch b/package/libtracefs/0002-meson-add-utest-option.patch
> new file mode 100644
> index 0000000000..90f73a7ea0
> --- /dev/null
> +++ b/package/libtracefs/0002-meson-add-utest-option.patch
> @@ -0,0 +1,40 @@
> +From 7a09e2d414959075e2177c50ef1d4bf606b9ccdc Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Thu, 15 Feb 2024 21:20:29 +0100
> +Subject: [PATCH] meson: add utest option
> +
> +Add utest option to allow the user to disable utest
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Upstream: https://github.com/rostedt/libtracefs/pull/2
> +---
> + meson.build       | 2 +-
> + meson_options.txt | 2 ++
> + 2 files changed, 3 insertions(+), 1 deletion(-)
> +
> +diff --git a/meson.build b/meson.build
> +index 3156f1c..d4cfd53 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -35,7 +35,7 @@ incdir = include_directories(['include'])
> +
> + subdir('src')
> + subdir('include')
> +-if cunit_dep.found()
> ++if get_option('utest') and cunit_dep.found()
> +     subdir('utest')
> + endif
> + if get_option('samples')
> +diff --git a/meson_options.txt b/meson_options.txt
> +index 8450992..a48efea 100644
> +--- a/meson_options.txt
> ++++ b/meson_options.txt
> +@@ -18,3 +18,5 @@ option('doc', type : 'boolean', value: true,
> +        description : 'produce documentation')
> + option('samples', type : 'boolean', value: true,
> +        description : 'build samples')
> ++option('utest', type : 'boolean', value: true,
> ++       description : 'build utest')
> +--
> +2.43.0
> +
> diff --git a/package/libtracefs/libtracefs.mk b/package/libtracefs/libtracefs.mk
> index ed45fcbc50..21cb8e84e3 100644
> --- a/package/libtracefs/libtracefs.mk
> +++ b/package/libtracefs/libtracefs.mk
> @@ -14,6 +14,7 @@ LIBTRACEFS_DEPENDENCIES = host-bison host-flex host-pkgconf libtraceevent
>   
>   LIBTRACEFS_CONF_OPTS = \
>   	-Ddoc=false \
> -	-Dsamples=false
> +	-Dsamples=false \
> +	-Dutest=false
>   
>   $(eval $(meson-package))
diff mbox series

Patch

diff --git a/package/libtracefs/0002-meson-add-utest-option.patch b/package/libtracefs/0002-meson-add-utest-option.patch
new file mode 100644
index 0000000000..90f73a7ea0
--- /dev/null
+++ b/package/libtracefs/0002-meson-add-utest-option.patch
@@ -0,0 +1,40 @@ 
+From 7a09e2d414959075e2177c50ef1d4bf606b9ccdc Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Thu, 15 Feb 2024 21:20:29 +0100
+Subject: [PATCH] meson: add utest option
+
+Add utest option to allow the user to disable utest
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Upstream: https://github.com/rostedt/libtracefs/pull/2
+---
+ meson.build       | 2 +-
+ meson_options.txt | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 3156f1c..d4cfd53 100644
+--- a/meson.build
++++ b/meson.build
+@@ -35,7 +35,7 @@ incdir = include_directories(['include'])
+ 
+ subdir('src')
+ subdir('include')
+-if cunit_dep.found()
++if get_option('utest') and cunit_dep.found()
+     subdir('utest')
+ endif
+ if get_option('samples')
+diff --git a/meson_options.txt b/meson_options.txt
+index 8450992..a48efea 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -18,3 +18,5 @@ option('doc', type : 'boolean', value: true,
+        description : 'produce documentation')
+ option('samples', type : 'boolean', value: true,
+        description : 'build samples')
++option('utest', type : 'boolean', value: true,
++       description : 'build utest')
+-- 
+2.43.0
+
diff --git a/package/libtracefs/libtracefs.mk b/package/libtracefs/libtracefs.mk
index ed45fcbc50..21cb8e84e3 100644
--- a/package/libtracefs/libtracefs.mk
+++ b/package/libtracefs/libtracefs.mk
@@ -14,6 +14,7 @@  LIBTRACEFS_DEPENDENCIES = host-bison host-flex host-pkgconf libtraceevent
 
 LIBTRACEFS_CONF_OPTS = \
 	-Ddoc=false \
-	-Dsamples=false
+	-Dsamples=false \
+	-Dutest=false
 
 $(eval $(meson-package))