selftests: complete kselftest include centralization
This follow-up patch completes centralization of kselftest.h and ksefltest_harness.h includes in remaining seltests files, replacing all relative paths with a non-relative paths using shared -I include path in lib.mk Tested with gcc-13.3 and clang-18.1, and cross-compiled successfully on riscv, arm64, x86_64 and powerpc arch. [reddybalavignesh9979@gmail.com: add selftests include path for kselftest.h] Link: https://lkml.kernel.org/r/20251017090201.317521-1-reddybalavignesh9979@gmail.com Link: https://lkml.kernel.org/r/20251016104409.68985-1-reddybalavignesh9979@gmail.com Signed-off-by: Bala-Vignesh-Reddy <reddybalavignesh9979@gmail.com> Suggested-by: Andrew Morton <akpm@linux-foundation.org> Link: https://lore.kernel.org/lkml/20250820143954.33d95635e504e94df01930d0@linux-foundation.org/ Reviewed-by: Wei Yang <richard.weiyang@gmail.com> Cc: David Hildenbrand <david@redhat.com> Cc: David S. Miller <davem@davemloft.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Günther Noack <gnoack@google.com> Cc: Jakub Kacinski <kuba@kernel.org> Cc: Liam Howlett <liam.howlett@oracle.com> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Mickael Salaun <mic@digikod.net> Cc: Ming Lei <ming.lei@redhat.com> Cc: Paolo Abeni <pabeni@redhat.com> Cc: Shuah Khan <shuah@kernel.org> Cc: Simon Horman <horms@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>pull/1354/merge
parent
262ef8e55b
commit
e6fbd1759c
|
|
@ -1,4 +1,5 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
userprogs-always-y += test-fsmount test-statx mountinfo test-list-all-mounts
|
||||
|
||||
userccflags += -I $(srctree)/tools/testing/selftests/
|
||||
userccflags += -I usr/include
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include <string.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <regex.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "alsa-local.h"
|
||||
|
||||
#define SYSFS_ROOT "/sys"
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include <poll.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "alsa-local.h"
|
||||
|
||||
#define TESTS_PER_CONTROL 7
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include <assert.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "alsa-local.h"
|
||||
|
||||
typedef struct timespec timestamp_t;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
#include <string.h>
|
||||
#include <alsa/asoundlib.h>
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define CH_NUM 4
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
*
|
||||
* Author: Ivan Orlov <ivan.orlov0322@gmail.com>
|
||||
*/
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
#include <sound/asound.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include <linux/auxvec.h>
|
||||
|
||||
#include "../../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#define TESTS_PER_HWCAP 3
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include <asm/sigcontext.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
#include "../../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#define EXPECTED_TESTS 11
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#include <asm/sigcontext.h>
|
||||
#include <asm/unistd.h>
|
||||
|
||||
#include "../../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#include "syscall-abi.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include <asm/sve_context.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
#include "../../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#include "fp-ptrace.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#include <sys/wait.h>
|
||||
#include <asm/hwcap.h>
|
||||
|
||||
#include "../../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#define MAX_VLS 16
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include <sys/prctl.h>
|
||||
#include <asm/sigcontext.h>
|
||||
|
||||
#include "../../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "rdvl.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include <asm/sigcontext.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
#include "../../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
/* <linux/elf.h> and <sys/auxv.h> don't like each other, so: */
|
||||
#ifndef NT_ARM_SVE
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include <asm/sigcontext.h>
|
||||
#include <asm/hwcap.h>
|
||||
|
||||
#include "../../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "rdvl.h"
|
||||
|
||||
#define ARCH_MIN_VL SVE_VL_MIN
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include <asm/sigcontext.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
#include "../../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
/* <linux/elf.h> and <sys/auxv.h> don't like each other, so: */
|
||||
#ifndef NT_ARM_ZA
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include <asm/sigcontext.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
#include "../../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
/* <linux/elf.h> and <sys/auxv.h> don't like each other, so: */
|
||||
#ifndef NT_ARM_ZA
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#include <sys/wait.h>
|
||||
#include <asm/hwcap.h>
|
||||
|
||||
#include "../../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
struct child_data {
|
||||
char *name, *output;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include <setjmp.h>
|
||||
#include <sched.h>
|
||||
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
#include "helper.h"
|
||||
|
||||
#define PAC_COLLISION_ATTEMPTS 1000
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include <stdint.h>
|
||||
#include <sys/prctl.h>
|
||||
#include <sys/utsname.h>
|
||||
#include "../../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#define SHIFT_TAG(tag) ((uint64_t)(tag) << 56)
|
||||
#define SET_TAG(ptr, tag) (((uint64_t)(ptr) & ~SHIFT_TAG(0xff)) | \
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@
|
|||
#include "xskxceiver.h"
|
||||
#include <bpf/bpf.h>
|
||||
#include <linux/filter.h>
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "xsk_xdp_common.h"
|
||||
|
||||
#include <network_helpers.h>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#define COUNT_ISN_BPS 4
|
||||
#define COUNT_WPS 4
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
static volatile uint8_t var[96] __attribute__((__aligned__(32)));
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
void child(int cpu)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#define NR_TESTS 9
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include <sys/prctl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
static int nerrs;
|
||||
static pid_t mpid; /* main() pid is used to avoid duplicate test counts */
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include <sys/prctl.h>
|
||||
#include <sys/auxv.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19)
|
||||
# define HAVE_GETAUXVAL
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "cgroup_util.h"
|
||||
|
||||
static bool nsdelegate;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "cgroup_util.h"
|
||||
|
||||
enum hog_clock_type {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include <linux/limits.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "cgroup_util.h"
|
||||
|
||||
static int idle_process_fn(const char *cgroup, void *arg)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <string.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "cgroup_util.h"
|
||||
|
||||
#define DEBUG
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "cgroup_util.h"
|
||||
|
||||
#define ADDR ((void *)(0x0UL))
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "../pidfd/pidfd.h"
|
||||
#include "cgroup_util.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <sys/sysinfo.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "cgroup_util.h"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include <errno.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "cgroup_util.h"
|
||||
|
||||
static bool has_localevents;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "cgroup_util.h"
|
||||
|
||||
static int run_success(const char *cgroup, void *arg)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include <sys/wait.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "cgroup_util.h"
|
||||
|
||||
static int read_int(const char *path, size_t *value)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include <unistd.h>
|
||||
#include <sched.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "clone3_selftests.h"
|
||||
|
||||
enum test_mode {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#include <unistd.h>
|
||||
#include <sched.h>
|
||||
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
#include "clone3_selftests.h"
|
||||
|
||||
static void child_exit(int ret)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <sys/syscall.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "clone3_selftests.h"
|
||||
|
||||
static void nop_handler(int signo)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <syscall.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#define ptr_to_u64(ptr) ((__u64)((uintptr_t)(ptr)))
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include <unistd.h>
|
||||
#include <sched.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "clone3_selftests.h"
|
||||
|
||||
#define MAX_PID_NS_LEVEL 32
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#include <signal.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#define NL_MESSAGE_SIZE (sizeof(struct nlmsghdr) + sizeof(struct cn_msg) + \
|
||||
sizeof(struct proc_input))
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <sys/resource.h>
|
||||
#include <linux/close_range.h>
|
||||
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
#include "../clone3/clone3_selftests.h"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <sys/resource.h>
|
||||
#include <linux/close_range.h>
|
||||
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
#include "../clone3/clone3_selftests.h"
|
||||
|
||||
TEST(unshare_EMFILE)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include <sys/un.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
#include "../filesystems/wrappers.h"
|
||||
#include "../pidfd/pidfd.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#include <linux/dma-buf.h>
|
||||
#include <linux/dma-heap.h>
|
||||
#include <drm/drm.h>
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#define DEVPATH "/dev/dma_heap"
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#include <sys/mman.h>
|
||||
#include <linux/memfd.h>
|
||||
#include <linux/udmabuf.h>
|
||||
#include "../../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#define TEST_PREFIX "drivers/dma-buf/udmabuf"
|
||||
#define NUM_PAGES 4
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include <time.h>
|
||||
#include <pthread.h>
|
||||
#include <linux/ntsync.h>
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
static int read_sem_state(int sem, __u32 *count, __u32 *max)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include <asm/uvdevice.h>
|
||||
|
||||
#include "../../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define UV_PATH "/dev/uv"
|
||||
#define BUFFER_SIZE 0x200
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#define _ASM_GENERIC_FCNTL_H
|
||||
#include <linux/fcntl.h>
|
||||
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
static int sys_execveat(int dirfd, const char *pathname, char *const argv[],
|
||||
char *const envp[], int flags)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#define TESTS_EXPECTED 54
|
||||
#define TEST_NAME_LEN (PATH_MAX * 4)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
struct Statistics {
|
||||
unsigned long long load_address;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include <sys/sysmacros.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
/* Remove a file, ignoring the result if it didn't exist. */
|
||||
void rm(struct __test_metadata *_metadata, const char *pathname,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#define FORK(exec) \
|
||||
do { \
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include <fcntl.h>
|
||||
#include <sys/mount.h>
|
||||
#include <unistd.h>
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
int sys_fchmodat2(int dfd, const char *filename, mode_t mode, int flags)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
static int lock_set(int fd, struct flock *fl)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
#include "wrappers.h"
|
||||
|
||||
TEST(anon_inode_no_chown)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include <linux/android/binder.h>
|
||||
#include <linux/android/binderfs.h>
|
||||
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define DEFAULT_THREADS 4
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <asm/ioctls.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/wait.h>
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
static bool terminal_dup2(int duplicate, int original)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <sys/epoll.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/eventfd.h>
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
struct epoll_mtcontext
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <pthread.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/eventfd.h>
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define EVENTFD_TEST_ITERATIONS 100000UL
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <unistd.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define ASSERT_ERRNO(expected, _t, seen) \
|
||||
__EXPECT(expected, #expected, \
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include <sys/mount.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/mount.h>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include <sched.h>
|
||||
#include <linux/limits.h>
|
||||
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define FUSECTL_MOUNTPOINT "/sys/fs/fuse/connections"
|
||||
#define FUSE_MOUNTPOINT "/tmp/fuse_mnt_XXXXXX"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/xattr.h>
|
||||
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
#include "wrappers.h"
|
||||
|
||||
TEST(kernfs_listxattr)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ typedef struct {
|
|||
#include <sys/syscall.h>
|
||||
#include <sys/fanotify.h>
|
||||
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
#include "../statmount/statmount.h"
|
||||
#include "../utils.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ typedef struct {
|
|||
#include <sys/syscall.h>
|
||||
#include <sys/fanotify.h>
|
||||
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
#include "../statmount/statmount.h"
|
||||
#include "../utils.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include <sys/mount.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define MNT_NS_COUNT 11
|
||||
#define MNT_NS_LAST_INDEX 10
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#include <sched.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "../../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "log.h"
|
||||
#include "../wrappers.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include <sys/mount.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
#include "../../pidfd/pidfd.h"
|
||||
#include "log.h"
|
||||
#include "../utils.h"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include "statmount.h"
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#ifndef LISTMOUNT_REVERSE
|
||||
#define LISTMOUNT_REVERSE (1 << 0) /* List later mounts first */
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <linux/stat.h>
|
||||
|
||||
#include "statmount.h"
|
||||
#include "../../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
static const char *const known_fs[] = {
|
||||
"9p", "adfs", "affs", "afs", "aio", "anon_inodefs", "apparmorfs",
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include "statmount.h"
|
||||
#include "../utils.h"
|
||||
#include "../../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#define NSID_PASS 0
|
||||
#define NSID_FAIL 1
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include <sys/xattr.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
#include "wrappers.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "futextest.h"
|
||||
#include "futex2test.h"
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define MAX_THREADS 64
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <linux/prctl.h>
|
||||
#include <sys/prctl.h>
|
||||
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define MAX_THREADS 64
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include <limits.h>
|
||||
|
||||
#include "futextest.h"
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define timeout_ns 30000000
|
||||
#define WAKE_WAIT_US 10000
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include "atomic.h"
|
||||
#include "futextest.h"
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define MAX_WAKE_ITERS 1000
|
||||
#define THREAD_MAX 10
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include <time.h>
|
||||
|
||||
#include "futextest.h"
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
futex_t f1 = FUTEX_INITIALIZER;
|
||||
futex_t f2 = FUTEX_INITIALIZER;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "atomic.h"
|
||||
#include "futextest.h"
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define DELAY_US 100
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <fcntl.h>
|
||||
|
||||
#include "futextest.h"
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define timeout_ns 30000000
|
||||
#define WAKE_WAIT_US 10000
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include <signal.h>
|
||||
|
||||
#include "futextest.h"
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define PAGE_SZ 4096
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "futextest.h"
|
||||
#include "futex2test.h"
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
static long timeout_ns = 100000; /* 100us default timeout */
|
||||
static futex_t futex_pi;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#include <libgen.h>
|
||||
|
||||
#include "futextest.h"
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define WAIT_US 5000000
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "futextest.h"
|
||||
#include "futex2test.h"
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define timeout_ns 100000
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "futextest.h"
|
||||
#include "futex2test.h"
|
||||
#include "../../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#define WAKE_WAIT_US 10000
|
||||
#define NR_FUTEXES 30
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/* Copyright (c) 2022-2024 Red Hat */
|
||||
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <fnmatch.h>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#define MSEC_PER_SEC 1000L
|
||||
#define NSEC_PER_MSEC 1000000L
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <assert.h>
|
||||
#include <poll.h>
|
||||
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
#include "../../../../drivers/iommu/iommufd/iommufd_test.h"
|
||||
|
||||
/* Hack to make assertions more readable */
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include <sys/msg.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#define MAX_MSG_SIZE 32
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#define TEST_SCANCODES 10
|
||||
#define SYSFS_PATH_MAX 256
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include <sys/wait.h>
|
||||
#include <sys/epoll.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
static long sys_kcmp(int pid1, int pid2, int type, unsigned long fd1, unsigned long fd2)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
*
|
||||
* .. code-block:: c
|
||||
*
|
||||
* #include "../kselftest_harness.h"
|
||||
* #include "kselftest_harness.h"
|
||||
*
|
||||
* TEST(standalone_test) {
|
||||
* do_some_stuff;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
/* Avoid any inconsistencies */
|
||||
#define TH_LOG_STREAM stdout
|
||||
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
|
||||
static void test_helper(struct __test_metadata *_metadata)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "kselftest.h"
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
#include "wrappers.h"
|
||||
|
||||
#define TMP_DIR "tmp"
|
||||
|
|
|
|||
|
|
@ -199,6 +199,9 @@ clean: $(if $(TEST_GEN_MODS_DIR),clean_mods_dir)
|
|||
# Build with _GNU_SOURCE by default
|
||||
CFLAGS += -D_GNU_SOURCE=
|
||||
|
||||
# Additional include paths needed by kselftest.h and local headers
|
||||
CFLAGS += -I${top_srcdir}/tools/testing/selftests
|
||||
|
||||
# Enables to extend CFLAGS and LDFLAGS from command line, e.g.
|
||||
# make USERCFLAGS=-Werror USERLDFLAGS=-static
|
||||
CFLAGS += $(USERCFLAGS)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include "../kselftest_harness.h"
|
||||
#include "kselftest_harness.h"
|
||||
#include "common.h"
|
||||
|
||||
static struct lsm_ctx *next_ctx(struct lsm_ctx *ctxp)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue