diff mbox series

lttng-tools: Disable ptest for qemuriscv32

Message ID 20220923031844.1630492-1-zhe.he@windriver.com
State New
Headers show
Series lttng-tools: Disable ptest for qemuriscv32 | expand

Commit Message

He Zhe Sept. 23, 2022, 3:18 a.m. UTC
lttng-tools ptest requires SYS_ppoll and SYS_pselect which are not
supported by qemuriscv32.

Back port a not merged patch from upstream to be able to disable the test
build and disable the ptest build for qemuriscv32. This way the main
package can still be used or at least built.

See the following link for more details.
https://github.com/lttng/lttng-tools/pull/162

Signed-off-by: He Zhe <zhe.he@windriver.com>
---
 meta/recipes-kernel/lttng/lttng-platforms.inc |  4 ++
 .../0001-configure.ac-add-disable-tests.patch | 38 +++++++++++++++++++
 .../lttng/lttng-tools_2.13.8.bb               |  6 ++-
 3 files changed, 46 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-kernel/lttng/lttng-tools/0001-configure.ac-add-disable-tests.patch

Comments

Richard Purdie Sept. 23, 2022, 3:12 p.m. UTC | #1
On Fri, 2022-09-23 at 11:18 +0800, He Zhe wrote:
> lttng-tools ptest requires SYS_ppoll and SYS_pselect which are not
> supported by qemuriscv32.
> 
> Back port a not merged patch from upstream to be able to disable the test
> build and disable the ptest build for qemuriscv32. This way the main
> package can still be used or at least built.
> 
> See the following link for more details.
> https://github.com/lttng/lttng-tools/pull/162

This commit message and patch are confused. It isn't a backport if it
wasn't merged upstream first.

The patch below has:

"Upstream-Status: Inappropriate [oe-core specific]"

which isn't really true either. The correct status may be Submitted or
possibly Rejected but not Inappropriate. At the very least the link to
the github issue should be in the patch header to explain the status
and let people get more information.

> 
> Signed-off-by: He Zhe <zhe.he@windriver.com>
> ---
>  meta/recipes-kernel/lttng/lttng-platforms.inc |  4 ++
>  .../0001-configure.ac-add-disable-tests.patch | 38 +++++++++++++++++++
>  .../lttng/lttng-tools_2.13.8.bb               |  6 ++-
>  3 files changed, 46 insertions(+), 2 deletions(-)
>  create mode 100644 meta/recipes-kernel/lttng/lttng-tools/0001-configure.ac-add-disable-tests.patch
> 
> diff --git a/meta/recipes-kernel/lttng/lttng-platforms.inc b/meta/recipes-kernel/lttng/lttng-platforms.inc
> index 933c65d85d..2351df08b8 100644
> --- a/meta/recipes-kernel/lttng/lttng-platforms.inc
> +++ b/meta/recipes-kernel/lttng/lttng-platforms.inc
> @@ -15,3 +15,7 @@ LTTNGUST:arc = ""
>  
>  COMPATIBLE_HOST:arc:pn-lttng-ust = "null"
>  
> +# Whether the platform supports lttng-tools-ptest
> +# lttng-tools-ptest uses syscall SYS_ppoll and SYS_pselect6 which are not supported for some platforms.
> +LTTNGTOOLSPTEST = "ptest"
> +LTTNGTOOLSPTEST:qemuriscv32 = ""

If the lttng-tools ptests don't work, will lttng itself work on the
platform? Would we be better off simply disabling lttng on the platform
until it is supported?

Cheers,

Richard
He Zhe Sept. 26, 2022, 6:56 a.m. UTC | #2
On 9/23/22 23:12, Richard Purdie wrote:
> On Fri, 2022-09-23 at 11:18 +0800, He Zhe wrote:
>> lttng-tools ptest requires SYS_ppoll and SYS_pselect which are not
>> supported by qemuriscv32.
>>
>> Back port a not merged patch from upstream to be able to disable the test
>> build and disable the ptest build for qemuriscv32. This way the main
>> package can still be used or at least built.
>>
>> See the following link for more details.
>> https://github.com/lttng/lttng-tools/pull/162
> This commit message and patch are confused. It isn't a backport if it
> wasn't merged upstream first.
>
> The patch below has:
>
> "Upstream-Status: Inappropriate [oe-core specific]"
>
> which isn't really true either. The correct status may be Submitted or
> possibly Rejected but not Inappropriate. At the very least the link to
> the github issue should be in the patch header to explain the status
> and let people get more information.

Thanks for pointing out. I should have added the link here.

>
>> Signed-off-by: He Zhe <zhe.he@windriver.com>
>> ---
>>  meta/recipes-kernel/lttng/lttng-platforms.inc |  4 ++
>>  .../0001-configure.ac-add-disable-tests.patch | 38 +++++++++++++++++++
>>  .../lttng/lttng-tools_2.13.8.bb               |  6 ++-
>>  3 files changed, 46 insertions(+), 2 deletions(-)
>>  create mode 100644 meta/recipes-kernel/lttng/lttng-tools/0001-configure.ac-add-disable-tests.patch
>>
>> diff --git a/meta/recipes-kernel/lttng/lttng-platforms.inc b/meta/recipes-kernel/lttng/lttng-platforms.inc
>> index 933c65d85d..2351df08b8 100644
>> --- a/meta/recipes-kernel/lttng/lttng-platforms.inc
>> +++ b/meta/recipes-kernel/lttng/lttng-platforms.inc
>> @@ -15,3 +15,7 @@ LTTNGUST:arc = ""
>>  
>>  COMPATIBLE_HOST:arc:pn-lttng-ust = "null"
>>  
>> +# Whether the platform supports lttng-tools-ptest
>> +# lttng-tools-ptest uses syscall SYS_ppoll and SYS_pselect6 which are not supported for some platforms.
>> +LTTNGTOOLSPTEST = "ptest"
>> +LTTNGTOOLSPTEST:qemuriscv32 = ""
> If the lttng-tools ptests don't work, will lttng itself work on the
> platform? Would we be better off simply disabling lttng on the platform
> until it is supported?

There is a comment in the issue saying that "disabling them is a quick-win to
make it possible to use a package on such an architecture." I thought it might
make some sense if we could at least build the main package, so I tended to just
disable the ptest. But, yes, now that riscv32 is not officially supported we
should disable lttng completely. I'll send a patch for that.

https://github.com/lttng/lttng-tools/pull/162


Thanks,
Zhe

>
> Cheers,
>
> Richard
diff mbox series

Patch

diff --git a/meta/recipes-kernel/lttng/lttng-platforms.inc b/meta/recipes-kernel/lttng/lttng-platforms.inc
index 933c65d85d..2351df08b8 100644
--- a/meta/recipes-kernel/lttng/lttng-platforms.inc
+++ b/meta/recipes-kernel/lttng/lttng-platforms.inc
@@ -15,3 +15,7 @@  LTTNGUST:arc = ""
 
 COMPATIBLE_HOST:arc:pn-lttng-ust = "null"
 
+# Whether the platform supports lttng-tools-ptest
+# lttng-tools-ptest uses syscall SYS_ppoll and SYS_pselect6 which are not supported for some platforms.
+LTTNGTOOLSPTEST = "ptest"
+LTTNGTOOLSPTEST:qemuriscv32 = ""
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-configure.ac-add-disable-tests.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-configure.ac-add-disable-tests.patch
new file mode 100644
index 0000000000..05e976ec49
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/0001-configure.ac-add-disable-tests.patch
@@ -0,0 +1,38 @@ 
+From 787978985d6ddd86561f16ad88a12e1570d3e46b Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Wed, 21 Sep 2022 23:07:03 -0700
+Subject: [PATCH] configure.ac: add --disable-tests
+
+Allow the user to explicitly disable tests
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ configure.ac | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 5bfe791..a90e590 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -884,6 +884,8 @@ AC_ARG_ENABLE([bin-lttng-sessiond], AS_HELP_STRING([--disable-bin-lttng-sessiond
+ 	      [Disable the build of lttng-sessiond binaries]))
+ AC_ARG_ENABLE([extras], AS_HELP_STRING([--disable-extras],
+ 	      [Disable the build of the extra components]))
++AC_ARG_ENABLE([tests], AS_HELP_STRING([--disable-tests],
++	      [Disable the build of the test components]))
+ 
+ 
+ build_lib_consumer=no
+@@ -1035,6 +1037,7 @@ AM_CONDITIONAL([BUILD_BIN_LTTNG_SESSIOND], [test x$enable_bin_lttng_sessiond !=
+ 
+ # Export the tests and extras build conditions.
+ AS_IF([\
++test "x$enable_tests" != "xno" && \
+ test "x$enable_bin_lttng" != "xno" && \
+ test "x$enable_bin_lttng_consumerd" != "xno" && \
+ test "x$enable_bin_lttng_crash" != "xno" && \
+-- 
+2.37.1
+
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.13.8.bb b/meta/recipes-kernel/lttng/lttng-tools_2.13.8.bb
index a814eb79f9..883c930cdb 100644
--- a/meta/recipes-kernel/lttng/lttng-tools_2.13.8.bb
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.13.8.bb
@@ -25,11 +25,12 @@  PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \
                  am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \
                  PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
 "
-PACKAGECONFIG ??= "${LTTNGUST} kmod"
+PACKAGECONFIG ??= "${LTTNGUST} ${LTTNGTOOLSPTEST} kmod"
 PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native"
 PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust"
 PACKAGECONFIG[kmod] = "--with-kmod, --without-kmod, kmod"
 PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native"
+PACKAGECONFIG[ptest] = ",--disable-tests"
 
 SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
            file://0001-tests-do-not-strip-a-helper-library.patch \
@@ -37,11 +38,12 @@  SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
            file://lttng-sessiond.service \
            file://determinism.patch \
            file://disable-tests.patch \
+           file://0001-configure.ac-add-disable-tests.patch \
            "
 
 SRC_URI[sha256sum] = "b1e959579b260790930b20f3c7aa7cefb8a40e0de80d4a777c2bf78c6b353dc1"
 
-inherit autotools ptest pkgconfig useradd python3-dir manpages systemd
+inherit autotools ${@bb.utils.filter('LTTNGTOOLSPTEST', 'ptest', d)} pkgconfig useradd python3-dir manpages systemd
 
 CACHED_CONFIGUREVARS = "PGREP=/usr/bin/pgrep"