#!/bin/sh ############################################################################### # # Copyright © International Business Machines Corp., 2009 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # DESCRIPTION # Run tests in the current directory. # # AUTHOR # Darren Hart # # HISTORY # 2009-Nov-9: Initial version by Darren Hart # 2010-Jan-6: Add futex_wait_uninitialized_heap and futex_wait_private_mapped_file # by KOSAKI Motohiro # ############################################################################### # Test for a color capable console if test -z $USE_COLOR { tput setf 7 if test $Status -eq 0 { global USE_COLOR := '1' tput sgr0 } } if test $USE_COLOR -eq 1 { global COLOR := '"-c'" } echo # requeue pi testing # without timeouts ./futex_requeue_pi $COLOR ./futex_requeue_pi $COLOR -b ./futex_requeue_pi $COLOR -b -l ./futex_requeue_pi $COLOR -b -o ./futex_requeue_pi $COLOR -l ./futex_requeue_pi $COLOR -o # with timeouts ./futex_requeue_pi $COLOR -b -l -t 5000 ./futex_requeue_pi $COLOR -l -t 5000 ./futex_requeue_pi $COLOR -b -l -t 500000 ./futex_requeue_pi $COLOR -l -t 500000 ./futex_requeue_pi $COLOR -b -t 5000 ./futex_requeue_pi $COLOR -t 5000 ./futex_requeue_pi $COLOR -b -t 500000 ./futex_requeue_pi $COLOR -t 500000 ./futex_requeue_pi $COLOR -b -o -t 5000 ./futex_requeue_pi $COLOR -l -t 5000 ./futex_requeue_pi $COLOR -b -o -t 500000 ./futex_requeue_pi $COLOR -l -t 500000 # with long timeout ./futex_requeue_pi $COLOR -b -l -t 2000000000 ./futex_requeue_pi $COLOR -l -t 2000000000 echo ./futex_requeue_pi_mismatched_ops $COLOR echo ./futex_requeue_pi_signal_restart $COLOR echo ./futex_wait_timeout $COLOR echo ./futex_wait_wouldblock $COLOR echo ./futex_wait_uninitialized_heap $COLOR ./futex_wait_private_mapped_file $COLOR (CommandList children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$USE_COLOR"))} {(Lit_Other "]")}) terminator: ) ] action: [ (C {(tput)} {(setf)} {(7)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(-eq)} {(0)} {(Lit_Other "]")}) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:USE_COLOR) op: Equal rhs: {(1)} spids: [110] ) ] spids: [110] ) (C {(tput)} {(sgr0)}) ] spids: [-1 107] ) ] spids: [-1 119] ) ] spids: [-1 84] ) ] spids: [-1 121] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$USE_COLOR"))} {(-eq)} {(1)} {(Lit_Other "]")}) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:COLOR) op:Equal rhs:{(DQ (-c))} spids:[141])] spids: [141] ) ] spids: [-1 138] ) ] spids: [-1 146] ) (C {(echo)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-b)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-b)} {(-l)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-b)} {(-o)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-l)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-o)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-b)} {(-l)} {(-t)} {(5000)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-l)} {(-t)} {(5000)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-b)} {(-l)} {(-t)} {(500000)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-l)} {(-t)} {(500000)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-b)} {(-t)} {(5000)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-t)} {(5000)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-b)} {(-t)} {(500000)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-t)} {(500000)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-b)} {(-o)} {(-t)} {(5000)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-l)} {(-t)} {(5000)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-b)} {(-o)} {(-t)} {(500000)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-l)} {(-t)} {(500000)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-b)} {(-l)} {(-t)} {(2000000000)}) (C {(./futex_requeue_pi)} {($ VSub_Name "$COLOR")} {(-l)} {(-t)} {(2000000000)}) (C {(echo)}) (C {(./futex_requeue_pi_mismatched_ops)} {($ VSub_Name "$COLOR")}) (C {(echo)}) (C {(./futex_requeue_pi_signal_restart)} {($ VSub_Name "$COLOR")}) (C {(echo)}) (C {(./futex_wait_timeout)} {($ VSub_Name "$COLOR")}) (C {(echo)}) (C {(./futex_wait_wouldblock)} {($ VSub_Name "$COLOR")}) (C {(echo)}) (C {(./futex_wait_uninitialized_heap)} {($ VSub_Name "$COLOR")}) (C {(./futex_wait_private_mapped_file)} {($ VSub_Name "$COLOR")}) ] )