forked from luck/tmp_suning_uos_patched
linux-kselftest-5.7-rc5
This Kselftest update for Linux 5.7-rc5 consists of ftrace test fixes and fix to kvm Makefile for relocatable native/cross builds and installs. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEPZKym/RZuOCGeA/kCwJExA0NQxwFAl60SCYACgkQCwJExA0N QxzlTQ/+LWXBGbHJPPOT2UPjoa+f5JQgYePxTVbnnG+nG4SQcbHMBGMORwbz7S8e o/dc2H+jhfYNnTc2L/JoruJVT7E2CwehBKTZzqCu6AbBWdPNgQCmxFIh5Gos8JMb cj9J/7CEtnOAQF7IArGYlyd9gblRc8ACwvgVLRJbKcNFHV0EBRV2Kg5JOE9RaKPK xIA2GNb30cA3P4IFykc199zrOsfwf2Dr0Bf1wf3HkO1UnhrFIDsT7PRNBLGWWB+n c9Mi9fFmLEJr3yDL6B87Mt7+sUGRb7Jvvz6h8gIhJaE8IpbkD9nq0PhuuQNawFy4 KS/FYFtRShKU/m+g+Nudg9PJR+vzpL/wR6kp/5Z1W5Us9ba200GZBtFT0x+NUP3n fNczO61iwAi4qesfCpKgDfGco754mw1+hUZAdRJkYY6tyZmjrPVpVKgOR8kN4qjP anUl1trQsDM5kaScG/6RmBhoAtaU91Mdhcw1/8YLBpoQUQEMxWtwlXdvKkJ3zjfE Gs0jBoThuCHAj3IMZmL3dPaa88IA904aelTW6OLnq8BmHEW2938Y/T1L47bHO5C+ WZnFVzNgEqFTLHqX/MYzmoJ1y+A09fA3Owi6OmsvJ5ZY+LjEiKGXuBHj+VhbwJ4G COphD9CcIVx0gQ3Zct8feajloQcGu5v4/El3/3kPQkuZjzhxRq0= =jUcW -----END PGP SIGNATURE----- Merge tag 'linux-kselftest-5.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fixes from Shuah Khan: "ftrace test fixes and a fix to kvm Makefile for relocatable native/cross builds and installs" * tag 'linux-kselftest-5.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: fix kvm relocatable native/cross builds and installs selftests/ftrace: Make XFAIL green color ftrace/selftest: make unresolved cases cause failure if --fail-unresolved set ftrace/selftests: workaround cgroup RT scheduling issues
This commit is contained in:
commit
9ecc4d775f
|
@ -17,6 +17,7 @@ echo " -v|--verbose Increase verbosity of test messages"
|
|||
echo " -vv Alias of -v -v (Show all results in stdout)"
|
||||
echo " -vvv Alias of -v -v -v (Show all commands immediately)"
|
||||
echo " --fail-unsupported Treat UNSUPPORTED as a failure"
|
||||
echo " --fail-unresolved Treat UNRESOLVED as a failure"
|
||||
echo " -d|--debug Debug mode (trace all shell commands)"
|
||||
echo " -l|--logdir <dir> Save logs on the <dir>"
|
||||
echo " If <dir> is -, all logs output in console only"
|
||||
|
@ -29,8 +30,25 @@ err_ret=1
|
|||
# kselftest skip code is 4
|
||||
err_skip=4
|
||||
|
||||
# cgroup RT scheduling prevents chrt commands from succeeding, which
|
||||
# induces failures in test wakeup tests. Disable for the duration of
|
||||
# the tests.
|
||||
|
||||
readonly sched_rt_runtime=/proc/sys/kernel/sched_rt_runtime_us
|
||||
|
||||
sched_rt_runtime_orig=$(cat $sched_rt_runtime)
|
||||
|
||||
setup() {
|
||||
echo -1 > $sched_rt_runtime
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
echo $sched_rt_runtime_orig > $sched_rt_runtime
|
||||
}
|
||||
|
||||
errexit() { # message
|
||||
echo "Error: $1" 1>&2
|
||||
cleanup
|
||||
exit $err_ret
|
||||
}
|
||||
|
||||
|
@ -39,6 +57,8 @@ if [ `id -u` -ne 0 ]; then
|
|||
errexit "this must be run by root user"
|
||||
fi
|
||||
|
||||
setup
|
||||
|
||||
# Utilities
|
||||
absdir() { # file_path
|
||||
(cd `dirname $1`; pwd)
|
||||
|
@ -93,6 +113,10 @@ parse_opts() { # opts
|
|||
UNSUPPORTED_RESULT=1
|
||||
shift 1
|
||||
;;
|
||||
--fail-unresolved)
|
||||
UNRESOLVED_RESULT=1
|
||||
shift 1
|
||||
;;
|
||||
--logdir|-l)
|
||||
LOG_DIR=$2
|
||||
shift 2
|
||||
|
@ -157,6 +181,7 @@ KEEP_LOG=0
|
|||
DEBUG=0
|
||||
VERBOSE=0
|
||||
UNSUPPORTED_RESULT=0
|
||||
UNRESOLVED_RESULT=0
|
||||
STOP_FAILURE=0
|
||||
# Parse command-line options
|
||||
parse_opts $*
|
||||
|
@ -235,6 +260,7 @@ TOTAL_RESULT=0
|
|||
|
||||
INSTANCE=
|
||||
CASENO=0
|
||||
|
||||
testcase() { # testfile
|
||||
CASENO=$((CASENO+1))
|
||||
desc=`grep "^#[ \t]*description:" $1 | cut -f2 -d:`
|
||||
|
@ -260,7 +286,7 @@ eval_result() { # sigval
|
|||
$UNRESOLVED)
|
||||
prlog " [${color_blue}UNRESOLVED${color_reset}]"
|
||||
UNRESOLVED_CASES="$UNRESOLVED_CASES $CASENO"
|
||||
return 1 # this is a kind of bug.. something happened.
|
||||
return $UNRESOLVED_RESULT # depends on use case
|
||||
;;
|
||||
$UNTESTED)
|
||||
prlog " [${color_blue}UNTESTED${color_reset}]"
|
||||
|
@ -273,7 +299,7 @@ eval_result() { # sigval
|
|||
return $UNSUPPORTED_RESULT # depends on use case
|
||||
;;
|
||||
$XFAIL)
|
||||
prlog " [${color_red}XFAIL${color_reset}]"
|
||||
prlog " [${color_green}XFAIL${color_reset}]"
|
||||
XFAILED_CASES="$XFAILED_CASES $CASENO"
|
||||
return 0
|
||||
;;
|
||||
|
@ -406,5 +432,7 @@ prlog "# of unsupported: " `echo $UNSUPPORTED_CASES | wc -w`
|
|||
prlog "# of xfailed: " `echo $XFAILED_CASES | wc -w`
|
||||
prlog "# of undefined(test bug): " `echo $UNDEFINED_CASES | wc -w`
|
||||
|
||||
cleanup
|
||||
|
||||
# if no error, return 0
|
||||
exit $TOTAL_RESULT
|
||||
|
|
|
@ -5,8 +5,34 @@ all:
|
|||
|
||||
top_srcdir = ../../../..
|
||||
KSFT_KHDR_INSTALL := 1
|
||||
|
||||
# For cross-builds to work, UNAME_M has to map to ARCH and arch specific
|
||||
# directories and targets in this Makefile. "uname -m" doesn't map to
|
||||
# arch specific sub-directory names.
|
||||
#
|
||||
# UNAME_M variable to used to run the compiles pointing to the right arch
|
||||
# directories and build the right targets for these supported architectures.
|
||||
#
|
||||
# TEST_GEN_PROGS and LIBKVM are set using UNAME_M variable.
|
||||
# LINUX_TOOL_ARCH_INCLUDE is set using ARCH variable.
|
||||
#
|
||||
# x86_64 targets are named to include x86_64 as a suffix and directories
|
||||
# for includes are in x86_64 sub-directory. s390x and aarch64 follow the
|
||||
# same convention. "uname -m" doesn't result in the correct mapping for
|
||||
# s390x and aarch64.
|
||||
#
|
||||
# No change necessary for x86_64
|
||||
UNAME_M := $(shell uname -m)
|
||||
|
||||
# Set UNAME_M for arm64 compile/install to work
|
||||
ifeq ($(ARCH),arm64)
|
||||
UNAME_M := aarch64
|
||||
endif
|
||||
# Set UNAME_M s390x compile/install to work
|
||||
ifeq ($(ARCH),s390)
|
||||
UNAME_M := s390x
|
||||
endif
|
||||
|
||||
LIBKVM = lib/assert.c lib/elf.c lib/io.c lib/kvm_util.c lib/sparsebit.c lib/test_util.c
|
||||
LIBKVM_x86_64 = lib/x86_64/processor.c lib/x86_64/vmx.c lib/x86_64/svm.c lib/x86_64/ucall.c
|
||||
LIBKVM_aarch64 = lib/aarch64/processor.c lib/aarch64/ucall.c
|
||||
|
@ -53,7 +79,7 @@ LIBKVM += $(LIBKVM_$(UNAME_M))
|
|||
INSTALL_HDR_PATH = $(top_srcdir)/usr
|
||||
LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/
|
||||
LINUX_TOOL_INCLUDE = $(top_srcdir)/tools/include
|
||||
LINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/x86/include
|
||||
LINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/$(ARCH)/include
|
||||
CFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \
|
||||
-fno-stack-protector -fno-PIE -I$(LINUX_TOOL_INCLUDE) \
|
||||
-I$(LINUX_TOOL_ARCH_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude \
|
||||
|
@ -84,6 +110,7 @@ $(LIBKVM_OBJ): $(OUTPUT)/%.o: %.c
|
|||
$(OUTPUT)/libkvm.a: $(LIBKVM_OBJ)
|
||||
$(AR) crs $@ $^
|
||||
|
||||
x := $(shell mkdir -p $(sort $(dir $(TEST_GEN_PROGS))))
|
||||
all: $(STATIC_LIBS)
|
||||
$(TEST_GEN_PROGS): $(STATIC_LIBS)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user