Lines Matching +full:total +full:- +full:timeout
2 # SPDX-License-Identifier: GPL-2.0
12 # "timeout" how many seconds to let each test run before running
13 # over our soft timeout limit.
16 # There isn't a shell-agnostic way to find the path of a sourced file,
18 if [ -z "$BASE_DIR" ]; then
23 TR_CMD=$(command -v tr)
25 # If Perl is unavailable, we must fall back to line-at-a-time prefixing
29 if [ ! -x /usr/bin/perl ]; then
30 sed -e 's/^/# /'
39 if [ -x /usr/bin/timeout ] ; then
40 /usr/bin/timeout --foreground "$kselftest_timeout" \
41 /usr/bin/timeout "$kselftest_timeout" $1
55 # Reset any "settings"-file variables.
70 # rtctest --> KSELFTEST_RTCTEST_ARGS="/dev/rtc1"
72 # cpu-on-off-test.sh --> KSELFTEST_CPU_ON_OFF_TEST_SH_ARGS="-a -p 10"
74 if [ -n "$TR_CMD" ]; then
76 $TR_CMD -d "[:blank:][:cntrl:]" | \
77 $TR_CMD -c "[:alnum:]_" "_" | \
82 # Load per-test-directory kselftest "settings" file.
84 if [ -r "$settings" ] ; then
87 if echo "$line" | grep -q '^#'; then
90 field=$(echo "$line" | cut -d= -f1)
91 value=$(echo "$line" | cut -d= -f2-)
96 # Command line timeout overrides the settings file
97 if [ -n "$kselftest_override_timeout" ]; then
99 echo "# overriding timeout to $kselftest_timeout" >> "$logfile"
101 echo "# timeout set to $kselftest_timeout" >> "$logfile"
106 if [ ! -e "$TEST" ]; then
110 if [ -x /usr/bin/stdbuf ]; then
111 stdbuf="/usr/bin/stdbuf --output=L "
113 eval kselftest_cmd_args="\$${kselftest_cmd_args_ref:-}"
114 if [ -x "$TEST" ]; then
116 elif [ -x "./ksft_runner.sh" ]; then
121 if [ $(head -n 1 "$TEST" | cut -c -2) = "#!" ]
123 interpreter=$(head -n 1 "$TEST" | cut -c 3-)
136 if [ $rc -eq $skip_rc ]; then \
138 elif [ $rc -eq $timeout_rc ]; then \
140 echo "not ok $test_num $TEST_HDR_MSG # TIMEOUT $kselftest_timeout seconds"
144 cd - >/dev/null
151 ip netns exec $name bash <<-EOF
161 local netns=$(mktemp -u ${BASENAME_TEST}-XXXXXX)
162 local tmplog="/tmp/$(mktemp -u ${BASENAME_TEST}-XXXXXX)"
164 if [ $? -ne 0 ]; then
168 ip -n $netns link set lo up
172 rm -f $tmplog
180 total=$(echo "$@" | wc -w)
181 echo "1..$total"
185 if [ -n "$per_test_logging" ]; then
189 if [ -n "$RUN_IN_NETNS" ]; then