Compare commits
13 commits
7e2d0ba732
...
38cde27f74
Author | SHA1 | Date | |
---|---|---|---|
|
38cde27f74 | ||
|
d138b51460 | ||
|
f09db2b4f1 | ||
|
0b631ed3ce | ||
|
37ee7d1995 | ||
|
45eb1bf4d7 | ||
|
8400291e28 | ||
|
a0c04bd55a | ||
|
017fa3e891 | ||
|
4477b39c32 | ||
|
3415b10a03 | ||
|
d01c14074b | ||
|
ba6c664081 |
27 changed files with 60 additions and 64 deletions
|
@ -24772,6 +24772,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core
|
||||||
F: Documentation/arch/x86/
|
F: Documentation/arch/x86/
|
||||||
F: Documentation/devicetree/bindings/x86/
|
F: Documentation/devicetree/bindings/x86/
|
||||||
F: arch/x86/
|
F: arch/x86/
|
||||||
|
F: tools/testing/selftests/x86
|
||||||
|
|
||||||
X86 ENTRY CODE
|
X86 ENTRY CODE
|
||||||
M: Andy Lutomirski <luto@kernel.org>
|
M: Andy Lutomirski <luto@kernel.org>
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -1,8 +1,8 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 6
|
VERSION = 6
|
||||||
PATCHLEVEL = 10
|
PATCHLEVEL = 11
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION =
|
EXTRAVERSION = -rc1
|
||||||
NAME = Baby Opossum Posse
|
NAME = Baby Opossum Posse
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
|
|
|
@ -110,7 +110,7 @@ static inline void pgd_list_del(pgd_t *pgd)
|
||||||
#define UNSHARED_PTRS_PER_PGD \
|
#define UNSHARED_PTRS_PER_PGD \
|
||||||
(SHARED_KERNEL_PMD ? KERNEL_PGD_BOUNDARY : PTRS_PER_PGD)
|
(SHARED_KERNEL_PMD ? KERNEL_PGD_BOUNDARY : PTRS_PER_PGD)
|
||||||
#define MAX_UNSHARED_PTRS_PER_PGD \
|
#define MAX_UNSHARED_PTRS_PER_PGD \
|
||||||
max_t(size_t, KERNEL_PGD_BOUNDARY, PTRS_PER_PGD)
|
MAX_T(size_t, KERNEL_PGD_BOUNDARY, PTRS_PER_PGD)
|
||||||
|
|
||||||
|
|
||||||
static void pgd_set_mm(pgd_t *pgd, struct mm_struct *mm)
|
static void pgd_set_mm(pgd_t *pgd, struct mm_struct *mm)
|
||||||
|
|
|
@ -109,8 +109,8 @@ static const u32 knl_interleave_list[] = {
|
||||||
0x104, 0x10c, 0x114, 0x11c, /* 20-23 */
|
0x104, 0x10c, 0x114, 0x11c, /* 20-23 */
|
||||||
};
|
};
|
||||||
#define MAX_INTERLEAVE \
|
#define MAX_INTERLEAVE \
|
||||||
(max_t(unsigned int, ARRAY_SIZE(sbridge_interleave_list), \
|
(MAX_T(unsigned int, ARRAY_SIZE(sbridge_interleave_list), \
|
||||||
max_t(unsigned int, ARRAY_SIZE(ibridge_interleave_list), \
|
MAX_T(unsigned int, ARRAY_SIZE(ibridge_interleave_list), \
|
||||||
ARRAY_SIZE(knl_interleave_list))))
|
ARRAY_SIZE(knl_interleave_list))))
|
||||||
|
|
||||||
struct interleave_pkg {
|
struct interleave_pkg {
|
||||||
|
|
|
@ -532,7 +532,7 @@ int drm_plane_create_color_properties(struct drm_plane *plane,
|
||||||
{
|
{
|
||||||
struct drm_device *dev = plane->dev;
|
struct drm_device *dev = plane->dev;
|
||||||
struct drm_property *prop;
|
struct drm_property *prop;
|
||||||
struct drm_prop_enum_list enum_list[max_t(int, DRM_COLOR_ENCODING_MAX,
|
struct drm_prop_enum_list enum_list[MAX_T(int, DRM_COLOR_ENCODING_MAX,
|
||||||
DRM_COLOR_RANGE_MAX)];
|
DRM_COLOR_RANGE_MAX)];
|
||||||
int i, len;
|
int i, len;
|
||||||
|
|
||||||
|
|
|
@ -1776,7 +1776,7 @@ static void integrity_metadata(struct work_struct *w)
|
||||||
struct bio *bio = dm_bio_from_per_bio_data(dio, sizeof(struct dm_integrity_io));
|
struct bio *bio = dm_bio_from_per_bio_data(dio, sizeof(struct dm_integrity_io));
|
||||||
char *checksums;
|
char *checksums;
|
||||||
unsigned int extra_space = unlikely(digest_size > ic->tag_size) ? digest_size - ic->tag_size : 0;
|
unsigned int extra_space = unlikely(digest_size > ic->tag_size) ? digest_size - ic->tag_size : 0;
|
||||||
char checksums_onstack[max_t(size_t, HASH_MAX_DIGESTSIZE, MAX_TAG_SIZE)];
|
char checksums_onstack[MAX_T(size_t, HASH_MAX_DIGESTSIZE, MAX_TAG_SIZE)];
|
||||||
sector_t sector;
|
sector_t sector;
|
||||||
unsigned int sectors_to_process;
|
unsigned int sectors_to_process;
|
||||||
|
|
||||||
|
@ -2064,7 +2064,7 @@ static bool __journal_read_write(struct dm_integrity_io *dio, struct bio *bio,
|
||||||
} while (++s < ic->sectors_per_block);
|
} while (++s < ic->sectors_per_block);
|
||||||
#ifdef INTERNAL_VERIFY
|
#ifdef INTERNAL_VERIFY
|
||||||
if (ic->internal_hash) {
|
if (ic->internal_hash) {
|
||||||
char checksums_onstack[max_t(size_t, HASH_MAX_DIGESTSIZE, MAX_TAG_SIZE)];
|
char checksums_onstack[MAX_T(size_t, HASH_MAX_DIGESTSIZE, MAX_TAG_SIZE)];
|
||||||
|
|
||||||
integrity_sector_checksum(ic, logical_sector, mem + bv.bv_offset, checksums_onstack);
|
integrity_sector_checksum(ic, logical_sector, mem + bv.bv_offset, checksums_onstack);
|
||||||
if (unlikely(memcmp(checksums_onstack, journal_entry_tag(ic, je), ic->tag_size))) {
|
if (unlikely(memcmp(checksums_onstack, journal_entry_tag(ic, je), ic->tag_size))) {
|
||||||
|
@ -2837,7 +2837,7 @@ static void do_journal_write(struct dm_integrity_c *ic, unsigned int write_start
|
||||||
unlikely(from_replay) &&
|
unlikely(from_replay) &&
|
||||||
#endif
|
#endif
|
||||||
ic->internal_hash) {
|
ic->internal_hash) {
|
||||||
char test_tag[max_t(size_t, HASH_MAX_DIGESTSIZE, MAX_TAG_SIZE)];
|
char test_tag[MAX_T(size_t, HASH_MAX_DIGESTSIZE, MAX_TAG_SIZE)];
|
||||||
|
|
||||||
integrity_sector_checksum(ic, sec + ((l - j) << ic->sb->log2_sectors_per_block),
|
integrity_sector_checksum(ic, sec + ((l - j) << ic->sb->log2_sectors_per_block),
|
||||||
(char *)access_journal_data(ic, i, l), test_tag);
|
(char *)access_journal_data(ic, i, l), test_tag);
|
||||||
|
|
|
@ -2912,7 +2912,7 @@ static void stmmac_dma_interrupt(struct stmmac_priv *priv)
|
||||||
u32 channels_to_check = tx_channel_count > rx_channel_count ?
|
u32 channels_to_check = tx_channel_count > rx_channel_count ?
|
||||||
tx_channel_count : rx_channel_count;
|
tx_channel_count : rx_channel_count;
|
||||||
u32 chan;
|
u32 chan;
|
||||||
int status[max_t(u32, MTL_MAX_TX_QUEUES, MTL_MAX_RX_QUEUES)];
|
int status[MAX_T(u32, MTL_MAX_TX_QUEUES, MTL_MAX_RX_QUEUES)];
|
||||||
|
|
||||||
/* Make sure we never check beyond our status buffer. */
|
/* Make sure we never check beyond our status buffer. */
|
||||||
if (WARN_ON_ONCE(channels_to_check > ARRAY_SIZE(status)))
|
if (WARN_ON_ONCE(channels_to_check > ARRAY_SIZE(status)))
|
||||||
|
|
|
@ -45,17 +45,20 @@
|
||||||
|
|
||||||
#define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
|
#define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
|
||||||
|
|
||||||
#define __cmp_once(op, x, y, unique_x, unique_y) ({ \
|
#define __cmp_once_unique(op, type, x, y, ux, uy) \
|
||||||
typeof(x) unique_x = (x); \
|
({ type ux = (x); type uy = (y); __cmp(op, ux, uy); })
|
||||||
typeof(y) unique_y = (y); \
|
|
||||||
|
#define __cmp_once(op, type, x, y) \
|
||||||
|
__cmp_once_unique(op, type, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_))
|
||||||
|
|
||||||
|
#define __careful_cmp_once(op, x, y) ({ \
|
||||||
static_assert(__types_ok(x, y), \
|
static_assert(__types_ok(x, y), \
|
||||||
#op "(" #x ", " #y ") signedness error, fix types or consider u" #op "() before " #op "_t()"); \
|
#op "(" #x ", " #y ") signedness error, fix types or consider u" #op "() before " #op "_t()"); \
|
||||||
__cmp(op, unique_x, unique_y); })
|
__cmp_once(op, __auto_type, x, y); })
|
||||||
|
|
||||||
#define __careful_cmp(op, x, y) \
|
#define __careful_cmp(op, x, y) \
|
||||||
__builtin_choose_expr(__is_constexpr((x) - (y)), \
|
__builtin_choose_expr(__is_constexpr((x) - (y)), \
|
||||||
__cmp(op, x, y), \
|
__cmp(op, x, y), __careful_cmp_once(op, x, y))
|
||||||
__cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
|
|
||||||
|
|
||||||
#define __clamp(val, lo, hi) \
|
#define __clamp(val, lo, hi) \
|
||||||
((val) >= (hi) ? (hi) : ((val) <= (lo) ? (lo) : (val)))
|
((val) >= (hi) ? (hi) : ((val) <= (lo) ? (lo) : (val)))
|
||||||
|
@ -158,7 +161,7 @@
|
||||||
* @x: first value
|
* @x: first value
|
||||||
* @y: second value
|
* @y: second value
|
||||||
*/
|
*/
|
||||||
#define min_t(type, x, y) __careful_cmp(min, (type)(x), (type)(y))
|
#define min_t(type, x, y) __cmp_once(min, type, x, y)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* max_t - return maximum of two values, using the specified type
|
* max_t - return maximum of two values, using the specified type
|
||||||
|
@ -166,7 +169,7 @@
|
||||||
* @x: first value
|
* @x: first value
|
||||||
* @y: second value
|
* @y: second value
|
||||||
*/
|
*/
|
||||||
#define max_t(type, x, y) __careful_cmp(max, (type)(x), (type)(y))
|
#define max_t(type, x, y) __cmp_once(max, type, x, y)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Do not check the array parameter using __must_be_array().
|
* Do not check the array parameter using __must_be_array().
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#include <net/sock.h>
|
#include <net/sock.h>
|
||||||
#include <net/raw.h>
|
#include <net/raw.h>
|
||||||
|
|
||||||
#define TCPUDP_MIB_MAX max_t(u32, UDP_MIB_MAX, TCP_MIB_MAX)
|
#define TCPUDP_MIB_MAX MAX_T(u32, UDP_MIB_MAX, TCP_MIB_MAX)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Report socket allocation statistics [mea@utu.fi]
|
* Report socket allocation statistics [mea@utu.fi]
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <net/ipv6.h>
|
#include <net/ipv6.h>
|
||||||
|
|
||||||
#define MAX4(a, b, c, d) \
|
#define MAX4(a, b, c, d) \
|
||||||
max_t(u32, max_t(u32, a, b), max_t(u32, c, d))
|
MAX_T(u32, MAX_T(u32, a, b), MAX_T(u32, c, d))
|
||||||
#define SNMP_MIB_MAX MAX4(UDP_MIB_MAX, TCP_MIB_MAX, \
|
#define SNMP_MIB_MAX MAX4(UDP_MIB_MAX, TCP_MIB_MAX, \
|
||||||
IPSTATS_MIB_MAX, ICMP_MIB_MAX)
|
IPSTATS_MIB_MAX, ICMP_MIB_MAX)
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,4 @@
|
||||||
# -mstack-protector-guard-reg, added by
|
# -mstack-protector-guard-reg, added by
|
||||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81708
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81708
|
||||||
|
|
||||||
echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -m32 -O0 -fstack-protector -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard - -o - 2> /dev/null | grep -q "%fs"
|
echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -m32 -O0 -fstack-protector -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard - -o - 2> /dev/null | grep -q "%fs"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -m64 -O0 -mcmodel=kernel -fno-PIE -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
|
echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -m64 -O0 -mcmodel=kernel -fno-PIE -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
|
||||||
|
|
|
@ -74,7 +74,7 @@ ln -fns /usr/src/kernels/%{KERNELRELEASE} %{buildroot}/lib/modules/%{KERNELRELEA
|
||||||
echo "/lib/modules/%{KERNELRELEASE}"
|
echo "/lib/modules/%{KERNELRELEASE}"
|
||||||
|
|
||||||
for x in alias alias.bin builtin.alias.bin builtin.bin dep dep.bin \
|
for x in alias alias.bin builtin.alias.bin builtin.bin dep dep.bin \
|
||||||
devname softdep symbols symbols.bin; do
|
devname softdep symbols symbols.bin weakdep; do
|
||||||
echo "%ghost /lib/modules/%{KERNELRELEASE}/modules.${x}"
|
echo "%ghost /lib/modules/%{KERNELRELEASE}/modules.${x}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,6 @@ fi
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* $(LC_ALL=C; date +'%a %b %d %Y') ${name} <${email}>
|
* $(LC_ALL=C date +'%a %b %d %Y') ${name} <${email}>
|
||||||
- Custom built Linux kernel.
|
- Custom built Linux kernel.
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -107,7 +107,6 @@ TARGETS += tmpfs
|
||||||
TARGETS += tpm2
|
TARGETS += tpm2
|
||||||
TARGETS += tty
|
TARGETS += tty
|
||||||
TARGETS += uevent
|
TARGETS += uevent
|
||||||
TARGETS += user
|
|
||||||
TARGETS += user_events
|
TARGETS += user_events
|
||||||
TARGETS += vDSO
|
TARGETS += vDSO
|
||||||
TARGETS += mm
|
TARGETS += mm
|
||||||
|
|
|
@ -231,6 +231,21 @@ do_suspend()
|
||||||
|
|
||||||
for i in `seq 1 $2`; do
|
for i in `seq 1 $2`; do
|
||||||
printf "Starting $1\n"
|
printf "Starting $1\n"
|
||||||
|
|
||||||
|
if [ "$3" = "rtc" ]; then
|
||||||
|
if ! command -v rtcwake &> /dev/null; then
|
||||||
|
printf "rtcwake could not be found, please install it.\n"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
rtcwake -m $filename -s 15
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
printf "Failed to suspend using RTC wake alarm\n"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo $filename > $SYSFS/power/state
|
echo $filename > $SYSFS/power/state
|
||||||
printf "Came out of $1\n"
|
printf "Came out of $1\n"
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,8 @@ helpme()
|
||||||
[-t <basic: Basic cpufreq testing
|
[-t <basic: Basic cpufreq testing
|
||||||
suspend: suspend/resume,
|
suspend: suspend/resume,
|
||||||
hibernate: hibernate/resume,
|
hibernate: hibernate/resume,
|
||||||
|
suspend_rtc: suspend/resume back using the RTC wakeup alarm,
|
||||||
|
hibernate_rtc: hibernate/resume back using the RTC wakeup alarm,
|
||||||
modtest: test driver or governor modules. Only to be used with -d or -g options,
|
modtest: test driver or governor modules. Only to be used with -d or -g options,
|
||||||
sptest1: Simple governor switch to produce lockdep.
|
sptest1: Simple governor switch to produce lockdep.
|
||||||
sptest2: Concurrent governor switch to produce lockdep.
|
sptest2: Concurrent governor switch to produce lockdep.
|
||||||
|
@ -76,7 +78,8 @@ parse_arguments()
|
||||||
helpme
|
helpme
|
||||||
;;
|
;;
|
||||||
|
|
||||||
t) # --func_type (Function to perform: basic, suspend, hibernate, modtest, sptest1/2/3/4 (default: basic))
|
t) # --func_type (Function to perform: basic, suspend, hibernate,
|
||||||
|
# suspend_rtc, hibernate_rtc, modtest, sptest1/2/3/4 (default: basic))
|
||||||
FUNC=$OPTARG
|
FUNC=$OPTARG
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -121,6 +124,14 @@ do_test()
|
||||||
do_suspend "hibernate" 1
|
do_suspend "hibernate" 1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"suspend_rtc")
|
||||||
|
do_suspend "suspend" 1 rtc
|
||||||
|
;;
|
||||||
|
|
||||||
|
"hibernate_rtc")
|
||||||
|
do_suspend "hibernate" 1 rtc
|
||||||
|
;;
|
||||||
|
|
||||||
"modtest")
|
"modtest")
|
||||||
# Do we have modules in place?
|
# Do we have modules in place?
|
||||||
if [ -z $DRIVER_MOD ] && [ -z $GOVERNOR_MOD ]; then
|
if [ -z $DRIVER_MOD ] && [ -z $GOVERNOR_MOD ]; then
|
||||||
|
|
|
@ -117,7 +117,7 @@ static int check_execveat_invoked_rc(int fd, const char *path, int flags,
|
||||||
}
|
}
|
||||||
if ((WEXITSTATUS(status) != expected_rc) &&
|
if ((WEXITSTATUS(status) != expected_rc) &&
|
||||||
(WEXITSTATUS(status) != expected_rc2)) {
|
(WEXITSTATUS(status) != expected_rc2)) {
|
||||||
ksft_print_msg("child %d exited with %d not %d nor %d\n",
|
ksft_print_msg("child %d exited with %d neither %d nor %d\n",
|
||||||
child, WEXITSTATUS(status), expected_rc,
|
child, WEXITSTATUS(status), expected_rc,
|
||||||
expected_rc2);
|
expected_rc2);
|
||||||
ksft_test_result_fail("%s\n", test_name);
|
ksft_test_result_fail("%s\n", test_name);
|
||||||
|
|
|
@ -4,6 +4,5 @@
|
||||||
# No binaries, but make sure arg-less "make" doesn't trigger "run_tests"
|
# No binaries, but make sure arg-less "make" doesn't trigger "run_tests"
|
||||||
all:
|
all:
|
||||||
|
|
||||||
TEST_PROGS := printf.sh bitmap.sh prime_numbers.sh scanf.sh strscpy.sh
|
TEST_PROGS := printf.sh bitmap.sh prime_numbers.sh scanf.sh
|
||||||
|
|
||||||
include ../lib.mk
|
include ../lib.mk
|
||||||
|
|
|
@ -2,5 +2,4 @@ CONFIG_TEST_PRINTF=m
|
||||||
CONFIG_TEST_SCANF=m
|
CONFIG_TEST_SCANF=m
|
||||||
CONFIG_TEST_BITMAP=m
|
CONFIG_TEST_BITMAP=m
|
||||||
CONFIG_PRIME_NUMBERS=m
|
CONFIG_PRIME_NUMBERS=m
|
||||||
CONFIG_TEST_STRSCPY=m
|
|
||||||
CONFIG_TEST_BITOPS=m
|
CONFIG_TEST_BITOPS=m
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# SPDX-License-Identifier: GPL-2.0+
|
|
||||||
$(dirname $0)/../kselftest/module.sh "strscpy*" test_strscpy
|
|
|
@ -7,4 +7,4 @@ ksft_skip=4
|
||||||
[ -e /dev/tpm0 ] || exit $ksft_skip
|
[ -e /dev/tpm0 ] || exit $ksft_skip
|
||||||
[ -e /dev/tpmrm0 ] || exit $ksft_skip
|
[ -e /dev/tpmrm0 ] || exit $ksft_skip
|
||||||
|
|
||||||
python3 -m unittest -v tpm2_tests.AsyncTest
|
python3 -m unittest -v tpm2_tests.AsyncTest 2>&1
|
||||||
|
|
|
@ -6,4 +6,4 @@ ksft_skip=4
|
||||||
|
|
||||||
[ -e /dev/tpm0 ] || exit $ksft_skip
|
[ -e /dev/tpm0 ] || exit $ksft_skip
|
||||||
|
|
||||||
python3 -m unittest -v tpm2_tests.SmokeTest
|
python3 -m unittest -v tpm2_tests.SmokeTest 2>&1
|
||||||
|
|
|
@ -6,4 +6,4 @@ ksft_skip=4
|
||||||
|
|
||||||
[ -e /dev/tpmrm0 ] || exit $ksft_skip
|
[ -e /dev/tpmrm0 ] || exit $ksft_skip
|
||||||
|
|
||||||
python3 -m unittest -v tpm2_tests.SpaceTest
|
python3 -m unittest -v tpm2_tests.SpaceTest 2>&1
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
|
||||||
# Makefile for user memory selftests
|
|
||||||
|
|
||||||
# No binaries, but make sure arg-less "make" doesn't trigger "run_tests"
|
|
||||||
all:
|
|
||||||
|
|
||||||
TEST_PROGS := test_user_copy.sh
|
|
||||||
|
|
||||||
include ../lib.mk
|
|
|
@ -1 +0,0 @@
|
||||||
CONFIG_TEST_USER_COPY=m
|
|
|
@ -1,18 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
|
||||||
# Runs copy_to/from_user infrastructure using test_user_copy kernel module
|
|
||||||
|
|
||||||
# Kselftest framework requirement - SKIP code is 4.
|
|
||||||
ksft_skip=4
|
|
||||||
|
|
||||||
if ! /sbin/modprobe -q -n test_user_copy; then
|
|
||||||
echo "user: module test_user_copy is not found [SKIP]"
|
|
||||||
exit $ksft_skip
|
|
||||||
fi
|
|
||||||
if /sbin/modprobe -q test_user_copy; then
|
|
||||||
/sbin/modprobe -q -r test_user_copy
|
|
||||||
echo "user_copy: ok"
|
|
||||||
else
|
|
||||||
echo "user_copy: [FAIL]"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
Loading…
Reference in a new issue