* [Buildroot] [PATCH 1/2] support/testing: TestSWIPL: increase timeout value
@ 2025-08-31 21:38 Romain Naour via buildroot
2025-08-31 21:38 ` [Buildroot] [PATCH 2/2] support/testing: TestOpenJdk: remove stime() function call Romain Naour via buildroot
2025-09-04 16:44 ` [Buildroot] [PATCH 1/2] support/testing: TestSWIPL: increase timeout value Julien Olivain via buildroot
0 siblings, 2 replies; 4+ messages in thread
From: Romain Naour via buildroot @ 2025-08-31 21:38 UTC (permalink / raw)
To: buildroot; +Cc: Romain Naour, Julien Olivain
The swipl runtime test is unreliable, depending on the execution speed
of its runner or local host.
Running on a build server, the last test resolve the sudoku in
30sec while the timeout is 10sec.
# time swipl -g top -t halt /root/sudoku.pl
Sudoku solution:
[9, 8, 7, 6, 5, 4, 3, 2, 1].
[2, 4, 6, 1, 7, 3, 9, 8, 5].
[3, 5, 1, 9, 2, 8, 7, 4, 6].
[1, 2, 8, 5, 3, 7, 6, 9, 4].
[6, 3, 4, 8, 9, 2, 1, 5, 7].
[7, 9, 5, 4, 6, 1, 8, 3, 2].
[5, 1, 9, 2, 8, 6, 4, 7, 3].
[4, 7, 2, 3, 1, 9, 5, 6, 8].
[8, 6, 3, 7, 4, 5, 2, 1, 9].
real 0m 28.53s
user 0m 27.99s
sys 0m 0.51s
Increase the timout to 120sec.
Note: On Gitlab-CI, every emulator timeout are increased by a factor 10
to avoid sporadic failures in elastic runners.
https://gitlab.com/buildroot.org/buildroot/-/blame/2025.08-rc3/support/misc/gitlab-ci.yml.in?ref_type=tags#L101
Cc: Julien Olivain <ju.o@free.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
support/testing/tests/package/test_swipl.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/testing/tests/package/test_swipl.py b/support/testing/tests/package/test_swipl.py
index 0839101599..0f317bb617 100644
--- a/support/testing/tests/package/test_swipl.py
+++ b/support/testing/tests/package/test_swipl.py
@@ -43,4 +43,4 @@ class TestSWIPL(infra.basetest.BRTest):
# Run a more complex logic program (solve a sudoku).
cmd = "swipl -g top -t halt /root/sudoku.pl"
- self.assertRunOk(cmd, timeout=10)
+ self.assertRunOk(cmd, timeout=120)
--
2.51.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread* [Buildroot] [PATCH 2/2] support/testing: TestOpenJdk: remove stime() function call
2025-08-31 21:38 [Buildroot] [PATCH 1/2] support/testing: TestSWIPL: increase timeout value Romain Naour via buildroot
@ 2025-08-31 21:38 ` Romain Naour via buildroot
2025-09-11 19:22 ` Thomas Perale via buildroot
2025-09-04 16:44 ` [Buildroot] [PATCH 1/2] support/testing: TestSWIPL: increase timeout value Julien Olivain via buildroot
1 sibling, 1 reply; 4+ messages in thread
From: Romain Naour via buildroot @ 2025-08-31 21:38 UTC (permalink / raw)
To: buildroot; +Cc: Romain Naour
stime() has been deprecated in glibc 2.31 [1] and replaced with
clock_settime(). Let's replace the stime() function call used in
BR2_PACKAGE_OPENJDK_JNI_TEST sources with clock_settime().
Apply the same change as busybox [2]. Make sure that timeToSet
has been zeroed.
With that fixed, the test "Call Native Library to Set System Time"
succeed:
[BRTEST# java -cp /usr/bin JniTest
Test: Get JNI Version passed
Test: Read Native String Constant passed
Test: Write Java String to Native Library passed
Test: Write Java Char Array to Native Library passed
Test: Write String Member to Native Library passed
Test: Set String Member from Native Library passed
Test: Execeute Java Function from Native Library passed
Test: Instantiate Java Class passed
Test: Call Native Library to Set System Time passed
[BRTEST# echo $?
0
The last external toolchain using a glibc 2.30 was the Bootlin
aarch64--glibc--bleeding-edge-2020.02-2, so since then TestOpenJdk
is broken.
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/11176774851
[1] https://lists.gnu.org/archive/html/info-gnu/2020-02/msg00001.html
[2] https://git.busybox.net/busybox/commit/?id=d3539be8f27b8cbfdfee460fe08299158f08bcd9
[3] https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/readmes/aarch64--glibc--bleeding-edge-2020.02-2.txt
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
.../br2-external/openjdk/package/openjdk-jni-test/native.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/native.c b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/native.c
index ed87e345af..9e926a27d9 100644
--- a/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/native.c
+++ b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/native.c
@@ -29,8 +29,10 @@ void execute_function(void(*function)(void*), void* context)
}
void set_time_in_seconds(int seconds)
{
- time_t timeToSet = seconds;
- stime(&timeToSet);
+ struct timespec timeToSet = { 0, 0 };
+
+ timeToSet.tv_sec = seconds;
+ clock_settime(CLOCK_REALTIME, &timeToSet);
}
void write_internal_time_in_seconds()
{
--
2.51.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [Buildroot] [PATCH 2/2] support/testing: TestOpenJdk: remove stime() function call
2025-08-31 21:38 ` [Buildroot] [PATCH 2/2] support/testing: TestOpenJdk: remove stime() function call Romain Naour via buildroot
@ 2025-09-11 19:22 ` Thomas Perale via buildroot
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Perale via buildroot @ 2025-09-11 19:22 UTC (permalink / raw)
To: Romain Naour; +Cc: Thomas Perale, buildroot
In reply of:
> stime() has been deprecated in glibc 2.31 [1] and replaced with
> clock_settime(). Let's replace the stime() function call used in
> BR2_PACKAGE_OPENJDK_JNI_TEST sources with clock_settime().
>
> Apply the same change as busybox [2]. Make sure that timeToSet
> has been zeroed.
>
> With that fixed, the test "Call Native Library to Set System Time"
> succeed:
>
> [BRTEST# java -cp /usr/bin JniTest
> Test: Get JNI Version passed
> Test: Read Native String Constant passed
> Test: Write Java String to Native Library passed
> Test: Write Java Char Array to Native Library passed
> Test: Write String Member to Native Library passed
> Test: Set String Member from Native Library passed
> Test: Execeute Java Function from Native Library passed
> Test: Instantiate Java Class passed
> Test: Call Native Library to Set System Time passed
> [BRTEST# echo $?
> 0
>
> The last external toolchain using a glibc 2.30 was the Bootlin
> aarch64--glibc--bleeding-edge-2020.02-2, so since then TestOpenJdk
> is broken.
>
> Fixes:
> https://gitlab.com/buildroot.org/buildroot/-/jobs/11176774851
>
> [1] https://lists.gnu.org/archive/html/info-gnu/2020-02/msg00001.html
> [2] https://git.busybox.net/busybox/commit/?id=d3539be8f27b8cbfdfee460fe08299158f08bcd9
> [3] https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/readmes/aarch64--glibc--bleeding-edge-2020.02-2.txt
>
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
Applied to 2025.02.x & 2025.05.x. Thanks
> ---
> .../br2-external/openjdk/package/openjdk-jni-test/native.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/native.c b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/native.c
> index ed87e345af..9e926a27d9 100644
> --- a/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/native.c
> +++ b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/native.c
> @@ -29,8 +29,10 @@ void execute_function(void(*function)(void*), void* context)
> }
> void set_time_in_seconds(int seconds)
> {
> - time_t timeToSet = seconds;
> - stime(&timeToSet);
> + struct timespec timeToSet = { 0, 0 };
> +
> + timeToSet.tv_sec = seconds;
> + clock_settime(CLOCK_REALTIME, &timeToSet);
> }
> void write_internal_time_in_seconds()
> {
> --
> 2.51.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/2] support/testing: TestSWIPL: increase timeout value
2025-08-31 21:38 [Buildroot] [PATCH 1/2] support/testing: TestSWIPL: increase timeout value Romain Naour via buildroot
2025-08-31 21:38 ` [Buildroot] [PATCH 2/2] support/testing: TestOpenJdk: remove stime() function call Romain Naour via buildroot
@ 2025-09-04 16:44 ` Julien Olivain via buildroot
1 sibling, 0 replies; 4+ messages in thread
From: Julien Olivain via buildroot @ 2025-09-04 16:44 UTC (permalink / raw)
To: Romain Naour; +Cc: buildroot
On 31/08/2025 23:38, Romain Naour via buildroot wrote:
> The swipl runtime test is unreliable, depending on the execution speed
> of its runner or local host.
>
> Running on a build server, the last test resolve the sudoku in
> 30sec while the timeout is 10sec.
>
> # time swipl -g top -t halt /root/sudoku.pl
> Sudoku solution:
> [9, 8, 7, 6, 5, 4, 3, 2, 1].
> [2, 4, 6, 1, 7, 3, 9, 8, 5].
> [3, 5, 1, 9, 2, 8, 7, 4, 6].
> [1, 2, 8, 5, 3, 7, 6, 9, 4].
> [6, 3, 4, 8, 9, 2, 1, 5, 7].
> [7, 9, 5, 4, 6, 1, 8, 3, 2].
> [5, 1, 9, 2, 8, 6, 4, 7, 3].
> [4, 7, 2, 3, 1, 9, 5, 6, 8].
> [8, 6, 3, 7, 4, 5, 2, 1, 9].
> real 0m 28.53s
> user 0m 27.99s
> sys 0m 0.51s
>
> Increase the timout to 120sec.
>
> Note: On Gitlab-CI, every emulator timeout are increased by a factor 10
> to avoid sporadic failures in elastic runners.
>
> https://gitlab.com/buildroot.org/buildroot/-/blame/2025.08-rc3/support/misc/gitlab-ci.yml.in?ref_type=tags#L101
>
> Cc: Julien Olivain <ju.o@free.fr>
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
Series applied to master, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-09-11 19:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-31 21:38 [Buildroot] [PATCH 1/2] support/testing: TestSWIPL: increase timeout value Romain Naour via buildroot
2025-08-31 21:38 ` [Buildroot] [PATCH 2/2] support/testing: TestOpenJdk: remove stime() function call Romain Naour via buildroot
2025-09-11 19:22 ` Thomas Perale via buildroot
2025-09-04 16:44 ` [Buildroot] [PATCH 1/2] support/testing: TestSWIPL: increase timeout value Julien Olivain via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.