blob: f637986105e359042642c6e12f84abcb33eedccb [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001#!/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