1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0-or-later
3
4###############################################################################
5#
6#   Copyright © International Business Machines  Corp., 2009
7#
8# DESCRIPTION
9#      Run tests in the current directory.
10#
11# AUTHOR
12#      Darren Hart <dvhart@linux.intel.com>
13#
14# HISTORY
15#      2009-Nov-9: Initial version by Darren Hart <dvhart@linux.intel.com>
16#      2010-Jan-6: Add futex_wait_uninitialized_heap and futex_wait_private_mapped_file
17#                  by KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
18#
19###############################################################################
20
21# Test for a color capable console
22if [ -z "$USE_COLOR" ]; then
23    tput setf 7 || tput setaf 7
24    if [ $? -eq 0 ]; then
25        USE_COLOR=1
26        tput sgr0
27    fi
28fi
29if [ "$USE_COLOR" -eq 1 ]; then
30    COLOR="-c"
31fi
32
33
34echo
35# requeue pi testing
36# without timeouts
37./futex_requeue_pi $COLOR
38./futex_requeue_pi $COLOR -b
39./futex_requeue_pi $COLOR -b -l
40./futex_requeue_pi $COLOR -b -o
41./futex_requeue_pi $COLOR -l
42./futex_requeue_pi $COLOR -o
43# with timeouts
44./futex_requeue_pi $COLOR -b -l -t 5000
45./futex_requeue_pi $COLOR -l -t 5000
46./futex_requeue_pi $COLOR -b -l -t 500000
47./futex_requeue_pi $COLOR -l -t 500000
48./futex_requeue_pi $COLOR -b -t 5000
49./futex_requeue_pi $COLOR -t 5000
50./futex_requeue_pi $COLOR -b -t 500000
51./futex_requeue_pi $COLOR -t 500000
52./futex_requeue_pi $COLOR -b -o -t 5000
53./futex_requeue_pi $COLOR -l -t 5000
54./futex_requeue_pi $COLOR -b -o -t 500000
55./futex_requeue_pi $COLOR -l -t 500000
56# with long timeout
57./futex_requeue_pi $COLOR -b -l -t 2000000000
58./futex_requeue_pi $COLOR -l -t 2000000000
59
60
61echo
62./futex_requeue_pi_mismatched_ops $COLOR
63
64echo
65./futex_requeue_pi_signal_restart $COLOR
66
67echo
68./futex_wait_timeout $COLOR
69
70echo
71./futex_wait_wouldblock $COLOR
72
73echo
74./futex_wait_uninitialized_heap $COLOR
75./futex_wait_private_mapped_file $COLOR
76
77echo
78./futex_wait $COLOR
79
80echo
81./futex_requeue $COLOR
82
83echo
84./futex_waitv $COLOR
85