403Webshell
Server IP : 13.213.54.232  /  Your IP : 216.73.217.11
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ip-172-31-17-110 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 7.1.33-67+ubuntu22.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/root/lib/modules/6.8.0-1031-aws/build/tools/testing/selftests/dt/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/lib/modules/6.8.0-1031-aws/build/tools/testing/selftests/dt/ktap_helpers.sh
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) 2023 Collabora Ltd
#
# Helpers for outputting in KTAP format
#
KTAP_TESTNO=1
KTAP_CNT_PASS=0
KTAP_CNT_FAIL=0
KTAP_CNT_SKIP=0

ktap_print_header() {
	echo "TAP version 13"
}

ktap_set_plan() {
	num_tests="$1"

	echo "1..$num_tests"
}

ktap_skip_all() {
	echo -n "1..0 # SKIP "
	echo $@
}

__ktap_test() {
	result="$1"
	description="$2"
	directive="$3" # optional

	local directive_str=
	[[ ! -z "$directive" ]] && directive_str="# $directive"

	echo $result $KTAP_TESTNO $description $directive_str

	KTAP_TESTNO=$((KTAP_TESTNO+1))
}

ktap_test_pass() {
	description="$1"

	result="ok"
	__ktap_test "$result" "$description"

	KTAP_CNT_PASS=$((KTAP_CNT_PASS+1))
}

ktap_test_skip() {
	description="$1"

	result="ok"
	directive="SKIP"
	__ktap_test "$result" "$description" "$directive"

	KTAP_CNT_SKIP=$((KTAP_CNT_SKIP+1))
}

ktap_test_fail() {
	description="$1"

	result="not ok"
	__ktap_test "$result" "$description"

	KTAP_CNT_FAIL=$((KTAP_CNT_FAIL+1))
}

ktap_print_totals() {
	echo "# Totals: pass:$KTAP_CNT_PASS fail:$KTAP_CNT_FAIL xfail:0 xpass:0 skip:$KTAP_CNT_SKIP error:0"
}

Youez - 2016 - github.com/yon3zu
LinuXploit