summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc
diff options
context:
space:
mode:
authorLukasz Majewski <lukma@denx.de>2021-11-09 16:28:51 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-23 14:04:02 +0000
commit0e0c481a25f10f8f7ff1d69bda7f015186da0202 (patch)
tree8aeedfe644f6aee88b67e707c74d293a8fef2c27 /meta/recipes-core/glibc/glibc
parent8dcf0325928942ba55710805204fd2e614647de7 (diff)
downloadpoky-0e0c481a25f10f8f7ff1d69bda7f015186da0202.tar.gz
glibc: ptest: Add running glibc time related test suite (Y2038) with ptest
This patch introduces new recipe - namely 'glibc-tests', which builds and installs time related (to check if Y2038 support works) glibc test suite to OE/Yocto built image. It reuses code from already available 'glibc-testsuite' recipe, which is run with 'bitbake glibc-testsuite -c check' and uses qemu to execute remotely (via SSH) tests on some emulated machine. This recipe installs time related glibc tests on some rootfs image. Afterwards, those tests can be executed on the real hardware, to facilitate validation of it with Y2038 problem compliance. To test time related subset - one needs to call: ptest-runner glibc-tests then change the date after Y2038 threshold for 32 bit systems: date -s "20 JAN 2038 18:00:00" and then run ptest-runner again. To facilitate debugging, source files are provided by default with the unstripped debugging symbols. Such approach would reduce the already complex recipe (as it inherits base glibc one), so there is no need to also install *-dbg and *-src packages. (From OE-Core rev: 0a64888e033694e7a68f12df81ef8edfdca0ba3c) Signed-off-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc/glibc')
-rwxr-xr-xmeta/recipes-core/glibc/glibc/run-ptest37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/run-ptest b/meta/recipes-core/glibc/glibc/run-ptest
new file mode 100755
index 0000000000..f637986105
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/run-ptest
@@ -0,0 +1,37 @@
1#!/bin/sh
2# ptest script for glibc - to run time related tests to
3# facilitate Y2038 validation
4# Run with 'ptest-runner glibc-tests'
5
6output() {
7 retcode=$?
8 if [ $retcode -eq 0 ]
9 then echo "PASS: $i"
10 elif [ $retcode -eq 77 ]
11 then echo "SKIP: $i"
12 else echo "FAIL: $i"
13 fi
14}
15
16# Allow altering time on the target
17export GLIBC_TEST_ALLOW_TIME_SETTING="1"
18
19tst_time64=$(ls -r ${PWD}/tests/glibc-ptest/*-time64)
20
21# Remove '-time64' suffix - those tests are also time
22# related
23tst_time_tmp=$(sed -e "s/-time64$//" <<< ${tst_time64})
24
25# Run tests supporting only 32 bit time
26for i in ${tst_time_tmp}
27do
28 $i >/dev/null 2>&1
29 output
30done
31
32# Run tests supporting only 64 bit time
33for i in ${tst_time64}
34do
35 $i >/dev/null 2>&1
36 output
37done