162306a36Sopenharmony_ci#!/bin/sh
262306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-or-later
362306a36Sopenharmony_ci
462306a36Sopenharmony_ci###############################################################################
562306a36Sopenharmony_ci#
662306a36Sopenharmony_ci#   Copyright © International Business Machines  Corp., 2009
762306a36Sopenharmony_ci#
862306a36Sopenharmony_ci# DESCRIPTION
962306a36Sopenharmony_ci#      Run tests in the current directory.
1062306a36Sopenharmony_ci#
1162306a36Sopenharmony_ci# AUTHOR
1262306a36Sopenharmony_ci#      Darren Hart <dvhart@linux.intel.com>
1362306a36Sopenharmony_ci#
1462306a36Sopenharmony_ci# HISTORY
1562306a36Sopenharmony_ci#      2009-Nov-9: Initial version by Darren Hart <dvhart@linux.intel.com>
1662306a36Sopenharmony_ci#      2010-Jan-6: Add futex_wait_uninitialized_heap and futex_wait_private_mapped_file
1762306a36Sopenharmony_ci#                  by KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
1862306a36Sopenharmony_ci#
1962306a36Sopenharmony_ci###############################################################################
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci# Test for a color capable console
2262306a36Sopenharmony_ciif [ -z "$USE_COLOR" ]; then
2362306a36Sopenharmony_ci    tput setf 7 || tput setaf 7
2462306a36Sopenharmony_ci    if [ $? -eq 0 ]; then
2562306a36Sopenharmony_ci        USE_COLOR=1
2662306a36Sopenharmony_ci        tput sgr0
2762306a36Sopenharmony_ci    fi
2862306a36Sopenharmony_cifi
2962306a36Sopenharmony_ciif [ "$USE_COLOR" -eq 1 ]; then
3062306a36Sopenharmony_ci    COLOR="-c"
3162306a36Sopenharmony_cifi
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ciecho
3562306a36Sopenharmony_ci# requeue pi testing
3662306a36Sopenharmony_ci# without timeouts
3762306a36Sopenharmony_ci./futex_requeue_pi $COLOR
3862306a36Sopenharmony_ci./futex_requeue_pi $COLOR -b
3962306a36Sopenharmony_ci./futex_requeue_pi $COLOR -b -l
4062306a36Sopenharmony_ci./futex_requeue_pi $COLOR -b -o
4162306a36Sopenharmony_ci./futex_requeue_pi $COLOR -l
4262306a36Sopenharmony_ci./futex_requeue_pi $COLOR -o
4362306a36Sopenharmony_ci# with timeouts
4462306a36Sopenharmony_ci./futex_requeue_pi $COLOR -b -l -t 5000
4562306a36Sopenharmony_ci./futex_requeue_pi $COLOR -l -t 5000
4662306a36Sopenharmony_ci./futex_requeue_pi $COLOR -b -l -t 500000
4762306a36Sopenharmony_ci./futex_requeue_pi $COLOR -l -t 500000
4862306a36Sopenharmony_ci./futex_requeue_pi $COLOR -b -t 5000
4962306a36Sopenharmony_ci./futex_requeue_pi $COLOR -t 5000
5062306a36Sopenharmony_ci./futex_requeue_pi $COLOR -b -t 500000
5162306a36Sopenharmony_ci./futex_requeue_pi $COLOR -t 500000
5262306a36Sopenharmony_ci./futex_requeue_pi $COLOR -b -o -t 5000
5362306a36Sopenharmony_ci./futex_requeue_pi $COLOR -l -t 5000
5462306a36Sopenharmony_ci./futex_requeue_pi $COLOR -b -o -t 500000
5562306a36Sopenharmony_ci./futex_requeue_pi $COLOR -l -t 500000
5662306a36Sopenharmony_ci# with long timeout
5762306a36Sopenharmony_ci./futex_requeue_pi $COLOR -b -l -t 2000000000
5862306a36Sopenharmony_ci./futex_requeue_pi $COLOR -l -t 2000000000
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ciecho
6262306a36Sopenharmony_ci./futex_requeue_pi_mismatched_ops $COLOR
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ciecho
6562306a36Sopenharmony_ci./futex_requeue_pi_signal_restart $COLOR
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ciecho
6862306a36Sopenharmony_ci./futex_wait_timeout $COLOR
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ciecho
7162306a36Sopenharmony_ci./futex_wait_wouldblock $COLOR
7262306a36Sopenharmony_ci
7362306a36Sopenharmony_ciecho
7462306a36Sopenharmony_ci./futex_wait_uninitialized_heap $COLOR
7562306a36Sopenharmony_ci./futex_wait_private_mapped_file $COLOR
7662306a36Sopenharmony_ci
7762306a36Sopenharmony_ciecho
7862306a36Sopenharmony_ci./futex_wait $COLOR
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_ciecho
8162306a36Sopenharmony_ci./futex_requeue $COLOR
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ciecho
8462306a36Sopenharmony_ci./futex_waitv $COLOR
85