Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure.ac: add --disable-tests #162

Closed
wants to merge 1 commit into from
Closed

Conversation

ffontaine
Copy link

Allow the user to explicitly disable tests

Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

Allow the user to explicitly disable tests

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
@jgalar
Copy link
Member

jgalar commented Apr 7, 2021

What is the rationale for this change?

@ffontaine
Copy link
Author

A faster compilation time and avoiding build failures on downstream projects (such as buildroot). For example, we have the following build failure on riscv32 glibc toolchains because SYS_ppoll and SYS_pselect6 are undeclared:

make[4]: Entering directory '/home/giuliobenetti/autobuild/run/instance-1/output-1/build/lttng-tools-2.12.3/tests/regression/kernel'
  CC       select_poll_epoll-select_poll_epoll.o
select_poll_epoll.c: In function 'ppoll_fds_buffer_overflow':
select_poll_epoll.c:408:16: error: 'SYS_ppoll' undeclared (first use in this function); did you mean 'SYS_tkill'?
  408 |  ret = syscall(SYS_ppoll, ufds, 100, NULL, NULL);
      |                ^~~~~~~~~
      |                SYS_tkill
select_poll_epoll.c: In function 'pselect_invalid_fd':
select_poll_epoll.c:488:16: error: 'SYS_pselect6' undeclared (first use in this function); did you mean 'SYS_semctl'?
  488 |  ret = syscall(SYS_pselect6, fd + 1, &rfds, NULL, NULL, NULL, NULL);
      |                ^~~~~~~~~~~~
      |                SYS_semctl

Full build log is available here: http://autobuild.buildroot.org/results/dd3/dd39188a7191efa512a51f18f4c34d9ee711a6a7/build-end.log

@ffontaine
Copy link
Author

Do you have additional comments? An other option would be to disable lttng-tools on riscv32 if you don't want to support this architecture.

@PSRCode
Copy link
Contributor

PSRCode commented May 28, 2021

Hi,

While we do not officially support riscv32 (on our CI at least), considering only this tests compilation seems to be having problem we might want to look into "porting" them, instead of disabling them, and see if lttng break down anywhere else at runtime.

AFAIU risv32 uses __NR_ppoll_time64 and __NR_pselect6_time64. Would you be able to spin up a patch since you seems to have a bit more context and might have a risv32 system laying somewhere?

That would be really helpful.

Cheers

@ffontaine
Copy link
Author

Unfortunately, I have no riscv32 system. I'm just sending this patch to fix the failures raised by buildroot autobuilders.

@PSRCode
Copy link
Contributor

PSRCode commented May 28, 2021

To be frank, disabling compilation of tests is not really fixing anything here neither for buildroot or lttng in regards to architecture support. You are simply pushing the "problem" under the rug.

Does buildroot run the test suite normally for projects? If not, then feel free to use this patch at buildroot level for now.

Still the patch does make sense in the context that we already disable tests if we are doing a partial build. Exposing --disable-tests to give direct control if needed does seems legitimate.

@arnout
Copy link

arnout commented Jun 1, 2021

In buildroot we don't run tests and also don't build them if it can be avoided. Tests often use features that are not available on niche architectures (even something simple as fork()) so disabling them is a quick-win to make it possible to use a package on such an architecture.

I have no idea why lttng uses syscall instead of simply libc's ppoll and pselect. If you use a direct syscall that uses time_t (or struct timespec), you should always check if the 64-bit version of that syscall is available and use it if it is. This makes sure that you have Y2038 support on all 32-bit architectures. But doing something like that is way too complicated for a drive-by contributor.

@PSRCode
Copy link
Contributor

PSRCode commented Jun 1, 2021

Sure, I understand. Then, feel free to use this patch at buildroot level for now. Keep in mind that we do not offer any semblance of "support" for the riscv32 platform as of today.

We will get to it at some point.

rpurdie pushed a commit to yoctoproject/poky that referenced this pull request Sep 26, 2022
lttng-tools requires SYS_ppoll and SYS_pselect6 which are not supported on
riscv32. This has been confirmed by lttng-tools upstream.
lttng/lttng-tools#162

It's also turned off for riscv32 in meta-riscv.
https://github.com/riscv/meta-riscv/blob/master/conf/layer.conf

(From OE-Core rev: a6c4e605562a38c2ae915e4dcf8bfadcc93d2dcd)

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request Sep 26, 2022
lttng-tools requires SYS_ppoll and SYS_pselect6 which are not supported on
riscv32. This has been confirmed by lttng-tools upstream.
lttng/lttng-tools#162

It's also turned off for riscv32 in meta-riscv.
https://github.com/riscv/meta-riscv/blob/master/conf/layer.conf

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
rpurdie pushed a commit to yoctoproject/poky that referenced this pull request Sep 26, 2022
lttng-tools requires SYS_ppoll and SYS_pselect6 which are not supported on
riscv32. This has been confirmed by lttng-tools upstream.
lttng/lttng-tools#162

It's also turned off for riscv32 in meta-riscv.
https://github.com/riscv/meta-riscv/blob/master/conf/layer.conf

(From OE-Core rev: 68b07bb)

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request Sep 26, 2022
lttng-tools requires SYS_ppoll and SYS_pselect6 which are not supported on
riscv32. This has been confirmed by lttng-tools upstream.
lttng/lttng-tools#162

It's also turned off for riscv32 in meta-riscv.
https://github.com/riscv/meta-riscv/blob/master/conf/layer.conf

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request Oct 11, 2022
lttng-tools requires SYS_ppoll and SYS_pselect6 which are not supported on
riscv32. This has been confirmed by lttng-tools upstream.
lttng/lttng-tools#162

It's also turned off for riscv32 in meta-riscv.
https://github.com/riscv/meta-riscv/blob/master/conf/layer.conf

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 68b07bb)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
armcc pushed a commit to lgirdk/poky that referenced this pull request Oct 11, 2022
lttng-tools requires SYS_ppoll and SYS_pselect6 which are not supported on
riscv32. This has been confirmed by lttng-tools upstream.
lttng/lttng-tools#162

It's also turned off for riscv32 in meta-riscv.
https://github.com/riscv/meta-riscv/blob/master/conf/layer.conf

(From OE-Core rev: 035fddfa35ccf17d3f1636f6410e626240fe527d)

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 68b07bb7f0f01925f9da1cb966239ee49d5c84e3)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/poky that referenced this pull request Oct 14, 2022
Source: poky
MR: 121051
Type: Integration
Disposition: Merged from poky
ChangeID: 6366d8b
Description:

lttng-tools requires SYS_ppoll and SYS_pselect6 which are not supported on
riscv32. This has been confirmed by lttng-tools upstream.
lttng/lttng-tools#162

It's also turned off for riscv32 in meta-riscv.
https://github.com/riscv/meta-riscv/blob/master/conf/layer.conf

(From OE-Core rev: 035fddfa35ccf17d3f1636f6410e626240fe527d)

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 68b07bb7f0f01925f9da1cb966239ee49d5c84e3)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
@jgalar jgalar closed this in 2a2ac57 Apr 17, 2023
daregit pushed a commit to daregit/yocto-combined that referenced this pull request May 22, 2024
lttng-tools requires SYS_ppoll and SYS_pselect6 which are not supported on
riscv32. This has been confirmed by lttng-tools upstream.
lttng/lttng-tools#162

It's also turned off for riscv32 in meta-riscv.
https://github.com/riscv/meta-riscv/blob/master/conf/layer.conf

(From OE-Core rev: 68b07bb7f0f01925f9da1cb966239ee49d5c84e3)

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants