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