instruction stringlengths 82 202 | input stringclasses 1
value | output stringlengths 73 23.9M |
|---|---|---|
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/filesystems/wrappers' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
// SPDX-License-Identifier: GPL-2.0
//
#ifndef __SELFTEST_OVERLAYFS_WRAPPERS_H__
#define __SELFTEST_OVERLAYFS_WRAPPERS_H__
#define _GNU_SOURCE
#include <linux/types.h>
#include <linux/mount.h>
#include <sys/syscall.h>
#ifndef STATX_MNT_ID_UNIQUE
#define STATX_MNT_ID_UNIQUE 0x00004000U /* Want/got extended stx_m... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/fclog' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Author: Aleksa Sarai <cyphar@cyphar.com>
* Copyright (C) 2025 SUSE LLC.
*/
#include <assert.h>
#include <errno.h>
#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/mount.h>
#include "kselftest_harne... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/file_stressor' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#define __SANE_USERSPACE_TYPES__
#include <fcntl.h>
#include <limits.h>
#include <pthread.h>
#include <sched.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/mount.h>
#include <unistd.h>
#include "kselftest_harness.h"
#include ... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/kernfs_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#define __SANE_USERSPACE_TYPES__
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/xattr.h>
#include "kselftest_harness.h"
#include "wrappers.h"
TEST(kernfs_listxattr)
{
int fd;
/* Read-only file that can never have any extended ... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/utils' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <fcntl.h>
#include <sys/types.h>
#include <dirent.h>
#include <grp.h>
#include <linux/limits.h>
#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/eventfd.h>
#include <sys/fsuid.h>
#include <sys/prctl.h... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/devpts_pts' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <sched.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <asm/ioctls.h>
#include <sys/mount.h>
#include <sys/wait.h>
#include "kselftest.h"
static bo... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/filesystems/utils' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __IDMAP_UTILS_H
#define __IDMAP_UTILS_H
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <errno.h>
#include <linux/types.h>
#include <sched.h>
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syscal... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/dnotify_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE /* needed to get the defines */
#include <fcntl.h> /* in glibc 2.2 this has the needed
values defined */
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
static volatile int event_fd;
static void handler(int sig, siginfo_t *si, void *data)
... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/fuse/fusectl_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2025 Chen Linxuan <chenlinxuan@uniontech.com>
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/fuse/fuse_mnt' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* fusectl test file-system
* Creates a simple FUSE filesystem with a single read-write file (/test)
*/
#define FUSE_USE_VERSION 26
#include <fuse.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#def... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/filesystems/empty_mntns/empty_mntns' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef EMPTY_MNTNS_H
#define EMPTY_MNTNS_H
#include <errno.h>
#include <stdlib.h>
#include "../statmount/statmount.h"
#ifndef UNSHARE_EMPTY_MNTNS
#define UNSHARE_EMPTY_MNTNS 0x00100000
#endif
#ifndef CLONE_EMPTY_MNTNS
#define CLONE_EMPTY_MNTNS (1ULL << 37)
#endi... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/empty_mntns/empty_mntns_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Tests for empty mount namespace creation via UNSHARE_EMPTY_MNTNS
*
* Copyright (c) 2024 Christian Brauner <brauner@kernel.org>
*/
#define _GNU_SOURCE
#include <fcntl.h>
#include <linux/mount.h>
#include <linux/stat.h>
#include <sched.h>
#include <stdio.h>
#inc... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/empty_mntns/overmount_chroot_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Test: rootfs overmounted multiple times with chroot into topmost
*
* This test creates a scenario where:
* 1. A new mount namespace is created with a tmpfs root (via pivot_root)
* 2. A mountpoint is created and overmounted multiple times
* 3. The caller chroo... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/empty_mntns/clone3_empty_mntns_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Tests for empty mount namespace creation via clone3() CLONE_EMPTY_MNTNS
*
* These tests exercise the clone3() code path for creating empty mount
* namespaces, which is distinct from the unshare() path tested in
* empty_mntns_test.c. With clone3(), CLONE_EMPTY... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/epoll/epoll_wakeup_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <asm/unistd.h>
#include <linux/time_types.h>
#include <poll.h>
#include <unistd.h>
#include <assert.h>
#include <signal.h>
#include <pthread.h>
#include <sys/epoll.h>
#include <sys/socket.h>
#include <sys/eventfd.h>
#include "kselftest_harness.h"
s... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/fat/rename_exchange' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Program that atomically exchanges two paths using
* the renameat2() system call RENAME_EXCHANGE flag.
*
* Copyright 2022 Red Hat Inc.
* Author: Javier Martinez Canillas <javierm@redhat.com>
*/
#define _GNU_SOURCE
#include <fcntl.h>
#include <stdio.h>
#includ... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/mount-notify/mount-notify_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2025 Miklos Szeredi <miklos@szeredi.hu>
#define _GNU_SOURCE
// Needed for linux/fanotify.h
typedef struct {
int val[2];
} __kernel_fsid_t;
#define __kernel_fsid_t __kernel_fsid_t
#include <fcntl.h>
#include <sched.h>
#include <stdio.h>
#include <str... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/mount-notify/mount-notify_test_ns' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2025 Miklos Szeredi <miklos@szeredi.hu>
#define _GNU_SOURCE
// Needed for linux/fanotify.h
typedef struct {
int val[2];
} __kernel_fsid_t;
#define __kernel_fsid_t __kernel_fsid_t
#include <fcntl.h>
#include <sched.h>
#include <stdio.h>
#include <str... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/fsmount_ns/fsmount_ns_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2026 Christian Brauner <brauner@kernel.org>
*
* Test for FSMOUNT_NAMESPACE flag.
*
* Test that fsmount() with FSMOUNT_NAMESPACE creates a new mount
* namespace containing the specified mount.
*/
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/move_mount/move_mount_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2026 Christian Brauner <brauner@kernel.org>
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <sched.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/mount.h>
#include <unistd.h>
#include <sys/syscall.h>
... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/binderfs/binderfs_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <sched.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/fsuid.h>
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <sys/socket.h>
#includ... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/xattr/xattr_socket_types_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2026 Christian Brauner <brauner@kernel.org>
/*
* Test user.* xattrs on various socket families.
*
* All socket types use sockfs for their inodes, so user.* xattrs should
* work on any socket regardless of address family. This tests AF_INET,
* AF_INET6, AF_N... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/xattr/xattr_sockfs_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2026 Christian Brauner <brauner@kernel.org>
/*
* Test extended attributes on sockfs sockets.
*
* Sockets created via socket() have their inodes in sockfs, which supports
* user.* xattrs with per-inode limits: up to 128 xattrs and 128KB total
* value size. T... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/xattr/xattr_socket_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2026 Christian Brauner <brauner@kernel.org>
/*
* Test extended attributes on path-based Unix domain sockets.
*
* Path-based Unix domain sockets are bound to a filesystem path and their
* inodes live on the underlying filesystem (e.g. tmpfs). These tests veri... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/overlayfs/dev_in_maps' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#define __SANE_USERSPACE_TYPES__ // Use ll64
#include <inttypes.h>
#include <unistd.h>
#include <stdio.h>
#include <linux/unistd.h>
#include <linux/types.h>
#include <linux/mount.h>
#include <sys/syscall.h>
#include <sys/stat.h>
#include <sys/mman.h>
#inclu... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/filesystems/overlayfs/log' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __SELFTEST_TIMENS_LOG_H__
#define __SELFTEST_TIMENS_LOG_H__
#define pr_msg(fmt, lvl, ...) \
ksft_print_msg("[%s] (%s:%d)\t" fmt "\n", \
lvl, __FILE__, __LINE__, ##__VA_ARGS__)
#define pr_p(func, fmt, ...) func(fmt ": %m", ##__VA_ARGS__)
#define pr_err(f... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#define __SANE_USERSPACE_TYPES__ // Use ll64
#include <fcntl.h>
#include <sched.h>
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>
#include <sys/mount.h>
#include <unistd.h>
#include "kselftest... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/statmount/listmount_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2024 Christian Brauner <brauner@kernel.org>
#define _GNU_SOURCE
#include <fcntl.h>
#include <sched.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/mount.h>
#include <unistd.h>
#include "statmount.h"
#include "kselftest_ha... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/statmount/statmount_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#define _GNU_SOURCE
#include <assert.h>
#include <stddef.h>
#include <sched.h>
#include <fcntl.h>
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/statfs.h>
#include <linux/stat.h>
#include "statmount.h"
#include "kselftest.h"
static... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/statmount/statmount_test_ns' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#define _GNU_SOURCE
#include <assert.h>
#include <fcntl.h>
#include <limits.h>
#include <sched.h>
#include <stdlib.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <linux/nsfs.h>
#include <linux/stat.h>
#include "statmount.h"
#include ".... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/filesystems/statmount/statmount' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __STATMOUNT_H
#define __STATMOUNT_H
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <linux/mount.h>
#include <asm/unistd.h>
#define STATMOUNT_BUFSIZE (1 << 15)
#ifndef __NR_statmount
#if defined __alpha__
#define __NR_statmount 567
#elif de... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/nsfs/pidns' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <sched.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/prctl.h>
#include <sys/wait.h>
#define p... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/nsfs/iterate_mntns' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2024 Christian Brauner <brauner@kernel.org>
#define _GNU_SOURCE
#include <fcntl.h>
#include <linux/auto_dev-ioctl.h>
#include <linux/errno.h>
#include <sched.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/mount.h>
#includ... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/nsfs/owner' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <sched.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/prctl.h>
#include <sys/wait.h>
#define N... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/eventfd/eventfd_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <asm/unistd.h>
#include <linux/time_types.h>
#include <unistd.h>
#include <assert.h>
#include <signal.h>
#include <pthread.h>
#include <sys/epoll.h>
#include <sys/eventfd.h>
#include "kselftest_harness.h"
#defi... | |
Linux kernel'inin 'tools/testing/selftests/filesystems/open_tree_ns/open_tree_ns_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2026 Christian Brauner <brauner@kernel.org>
*
* Test for OPEN_TREE_NAMESPACE flag.
*
* Test that open_tree() with OPEN_TREE_NAMESPACE creates a new mount
* namespace containing the specified mount tree.
*/
#define _GNU_SOURCE
#include <errno.h>
#includ... | |
Linux kernel'inin 'tools/testing/selftests/fchmodat2/fchmodat2_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#define _GNU_SOURCE
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <syscall.h>
#include <unistd.h>
#include "kselftest.h"
struct testdir {
char *dirname;
int dfd;
};
int sys_fchmodat2(int dfd, const char *filename, mode_t mode, int flags)... | |
Linux kernel'inin 'tools/testing/selftests/signal/mangle_uc_sigmask' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2024 ARM Ltd.
*
* Author: Dev Jain <dev.jain@arm.com>
*
* Test describing a clear distinction between signal states - delivered and
* blocked, and their relation with ucontext.
*
* A process can request blocking of a signal by masking it into its ... | |
Linux kernel'inin 'tools/testing/selftests/signal/sas' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Stas Sergeev <stsp@users.sourceforge.net>
*
* test sigaltstack(SS_ONSTACK | SS_AUTODISARM)
* If that succeeds, then swapcontext() can be used inside sighandler safely.
*
*/
#define _GNU_SOURCE
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/m... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/signal/current_stack_pointer' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#if __alpha__
register unsigned long sp asm("$30");
#elif __arm__ || __aarch64__ || __csky__ || __m68k__ || __mips__ || __riscv
register unsigned long sp asm("sp");
#elif __i386__
register unsigned long sp asm("esp");
#elif __loongarch64
register unsigned long sp asm("$sp");... | |
Linux kernel'inin 'tools/testing/selftests/user_events/dyn_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* User Events Dyn Events Test Program
*
* Copyright (c) 2021 Beau Belgrave <beaub@linux.microsoft.com>
*/
#include <errno.h>
#include <linux/user_events.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <un... | |
Linux kernel'inin 'tools/testing/selftests/user_events/ftrace_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* User Events FTrace Test Program
*
* Copyright (c) 2021 Beau Belgrave <beaub@linux.microsoft.com>
*/
#include <errno.h>
#include <linux/user_events.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/ui... | |
Linux kernel'inin 'tools/testing/selftests/user_events/abi_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* User Events ABI Test Program
*
* Copyright (c) 2022 Beau Belgrave <beaub@linux.microsoft.com>
*/
#define _GNU_SOURCE
#include <sched.h>
#include <errno.h>
#include <linux/user_events.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/user_events/user_events_selftests' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _USER_EVENTS_SELFTESTS_H
#define _USER_EVENTS_SELFTESTS_H
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mount.h>
#include <unistd.h>
#include <errno.h>
#include "kselftest.h"
static inline void tracefs_unmount(void)
{
umount("/sys/kernel/tracing");
}... | |
Linux kernel'inin 'tools/testing/selftests/user_events/perf_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* User Events Perf Events Test Program
*
* Copyright (c) 2021 Beau Belgrave <beaub@linux.microsoft.com>
*/
#include <errno.h>
#include <linux/user_events.h>
#include <linux/perf_event.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#in... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/liveupdate/luo_test_utils' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2025, Google LLC.
* Pasha Tatashin <pasha.tatashin@soleen.com>
*
* Utility functions for LUO kselftests.
*/
#ifndef LUO_TEST_UTILS_H
#define LUO_TEST_UTILS_H
#include <errno.h>
#include <string.h>
#include <linux/liveupdate.h>
#include "../kselftest... | |
Linux kernel'inin 'tools/testing/selftests/liveupdate/liveupdate' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2025, Google LLC.
* Pasha Tatashin <pasha.tatashin@soleen.com>
*/
/*
* Selftests for the Live Update Orchestrator.
* This test suite verifies the functionality and behavior of the
* /dev/liveupdate character device and its session management capabiliti... | |
Linux kernel'inin 'tools/testing/selftests/liveupdate/luo_kexec_simple' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2025, Google LLC.
* Pasha Tatashin <pasha.tatashin@soleen.com>
*
* A simple selftest to validate the end-to-end lifecycle of a LUO session
* across a single kexec reboot.
*/
#include "luo_test_utils.h"
#define TEST_SESSION_NAME "test-session"
#de... | |
Linux kernel'inin 'tools/testing/selftests/liveupdate/luo_test_utils' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2025, Google LLC.
* Pasha Tatashin <pasha.tatashin@soleen.com>
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/syscall.... | |
Linux kernel'inin 'tools/testing/selftests/liveupdate/luo_multi_session' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2025, Google LLC.
* Pasha Tatashin <pasha.tatashin@soleen.com>
*
* A selftest to validate the end-to-end lifecycle of multiple LUO sessions
* across a kexec reboot, including empty sessions and sessions with multiple
* files.
*/
#include "luo_tes... | |
Linux kernel'inin 'tools/testing/selftests/breakpoints/breakpoint_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2011 Red Hat, Inc., Frederic Weisbecker <fweisbec@redhat.com>
*
* Selftests for breakpoints (and more generally the do_debug() path) in x86.
*/
#include <sys/ptrace.h>
#include <unistd.h>
#include <stddef.h>
#include <sys/user.h>
#include <stdio.h>
... | |
Linux kernel'inin 'tools/testing/selftests/breakpoints/step_after_suspend_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2016 Google, Inc.
*/
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <sched.h>
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/ptrace.h>
#include <sys/stat.h>
#includ... | |
Linux kernel'inin 'tools/testing/selftests/breakpoints/breakpoint_test_arm64' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2016 Google, Inc.
*
* Original Code by Pavel Labath <labath@google.com>
*
* Code modified by Pratyush Anand <panand@redhat.com>
* for testing different byte select for each access size.
*/
#define _GNU_SOURCE
#include <asm/ptrace.h>
#include <sys... | |
Linux kernel'inin 'tools/testing/selftests/filelock/ofdlocks' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <fcntl.h>
#include <assert.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "kselftest.h"
static int lock_set(int fd, struct flock *fl)
{
int ret;
fl->l_pid = 0; // needed for OFD locks
fl->l_whence = SEEK_SET;
ret = fcn... | |
Linux kernel'inin 'tools/testing/selftests/alsa/global-timer' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* This tool is used by the utimer test, and it allows us to
* count the ticks of a global timer in a certain time frame
* (which is set by `timeout` parameter).
*
* Author: Ivan Orlov <ivan.orlov0322@gmail.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <alsa/as... | |
Linux kernel'inin 'tools/testing/selftests/alsa/utimer-test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* This test covers the functionality of userspace-driven ALSA timers. Such timers
* are purely virtual (so they don't directly depend on the hardware), and they could be
* created and triggered by userspace applications.
*
* Author: Ivan Orlov <ivan.orlov0322@gmail.com>
... | |
Linux kernel'inin 'tools/testing/selftests/alsa/mixer-test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
//
// kselftest for the ALSA mixer API
//
// Original author: Mark Brown <broonie@kernel.org>
// Copyright (c) 2021-2 Arm Limited
// This test will iterate over all cards detected in the system, exercising
// every mixer control it can find. This may conflict with other system... | |
Linux kernel'inin 'tools/testing/selftests/alsa/pcm-test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
//
// kselftest for the ALSA PCM API
//
// Original author: Jaroslav Kysela <perex@perex.cz>
// Copyright (c) 2022 Red Hat Inc.
// This test will iterate over all cards detected in the system, exercising
// every PCM device it can find. This may conflict with other system
// s... | |
Linux kernel'inin 'tools/testing/selftests/alsa/conf' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
//
// kselftest configuration helpers for the hw specific configuration
//
// Original author: Jaroslav Kysela <perex@perex.cz>
// Copyright (c) 2022 Red Hat Inc.
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <errno.h>
#include <assert.h>
#include <dirent... | |
Linux kernel'inin 'tools/testing/selftests/alsa/test-pcmtest-driver' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* This is the test which covers PCM middle layer data transferring using
* the virtual pcm test driver (snd-pcmtest).
*
* Copyright 2023 Ivan Orlov <ivan.orlov0322@gmail.com>
*/
#include <string.h>
#include <alsa/asoundlib.h>
#include "kselftest_harness.h"
#define CH_NU... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/alsa/alsa-local' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
// SPDX-License-Identifier: GPL-2.0
//
// kselftest configuration helpers for the hw specific configuration
//
// Original author: Jaroslav Kysela <perex@perex.cz>
// Copyright (c) 2022 Red Hat Inc.
#ifndef __ALSA_LOCAL_H
#define __ALSA_LOCAL_H
#include <alsa/asoundlib.h>
snd_config_t *get_alsalib_config(void);... | |
Linux kernel'inin 'tools/testing/selftests/cgroup/test_kmem' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <linux/limits.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/wait.h>
#include <errno.h>
#include <sys/sysinfo.h>
#include <pthread.h>
#... | |
Linux kernel'inin 'tools/testing/selftests/cgroup/wait_inotify' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Wait until an inotify event on the given cgroup file.
*/
#include <linux/limits.h>
#include <sys/inotify.h>
#include <sys/mman.h>
#include <sys/ptrace.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
#include <fcntl.h>
#include <poll.h>
#include <stdio.h... | |
Linux kernel'inin 'tools/testing/selftests/cgroup/test_hugetlb_memcg' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <linux/limits.h>
#include <sys/mman.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include "kselftest.h"
#include "cgroup_util.h"
#define ADDR ((void *)(0x0UL))
#define FLAGS (MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUG... | |
Linux kernel'inin 'tools/testing/selftests/cgroup/test_core' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#define _GNU_SOURCE
#include <linux/limits.h>
#include <linux/sched.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <unistd.h>
#include <fcntl.h>
#include <sched.h>
#include <stdio.h>
#include <errno... | |
Linux kernel'inin 'tools/testing/selftests/cgroup/test_cpuset' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/limits.h>
#include <signal.h>
#include "kselftest.h"
#include "cgroup_util.h"
static int idle_process_fn(const char *cgroup, void *arg)
{
(void)pause();
return 0;
}
static int do_migration_fn(const char *cgroup, void *arg)
{
int object_pid = (int)(size_t)a... | |
Linux kernel'inin 'tools/testing/selftests/cgroup/test_kill' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#include <errno.h>
#include <linux/limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include "kselftest.h"
#include "../pidfd/pidfd.h"
#include "cgroup_util.h"
/*
* Kill the given cgroup a... | |
Linux kernel'inin 'tools/testing/selftests/cgroup/test_memcontrol' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#define _GNU_SOURCE
#include <linux/limits.h>
#include <linux/oom.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/inotify.h>
#include <sys/socket.h>
#include <sys/... | |
Linux kernel'inin 'tools/testing/selftests/cgroup/test_cpu' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <linux/limits.h>
#include <sys/param.h>
#include <sys/sysinfo.h>
#include <sys/wait.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include "kselftest.h"
#include "cgroup_util.h"
enum hog_clock_... | |
Linux kernel'inin 'tools/testing/selftests/cgroup/test_pids' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <errno.h>
#include <linux/limits.h>
#include <signal.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "kselftest.h"
#include "cgroup_util.h"
static int run_success(const char *cgroup, void *arg)
{
r... | |
Linux kernel'inin 'tools/testing/selftests/cgroup/test_zswap' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <linux/limits.h>
#include <unistd.h>
#include <stdio.h>
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/sysinfo.h>
#include <string.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include "kselftest.h"
#include "cgroup_util.... | |
Linux kernel'inin 'tools/testing/selftests/cgroup/test_freezer' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#include <stdbool.h>
#include <linux/limits.h>
#include <sys/ptrace.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include "kselftest.h"
#include "cgroup... | |
Linux kernel'inin 'tools/testing/selftests/cgroup/lib/cgroup_util' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <linux/limits.h>
#include <poll.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/inotify.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/cgroup/lib/include/cgroup_util' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#include <stdbool.h>
#include <stdlib.h>
#ifndef PAGE_SIZE
#define PAGE_SIZE 4096
#endif
#define MB(x) (x << 20)
#define USEC_PER_SEC 1000000L
#define NSEC_PER_SEC 1000000000L
#define TEST_UID 65534 /* usually nobody, any !root is fine */
#define CG_THREADS_FILE (!cg_tes... | |
Linux kernel'inin 'tools/testing/selftests/vDSO/parse_vdso' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/*
* parse_vdso.c: Linux reference vDSO parser
* Written by Andrew Lutomirski, 2011-2014.
*
* This code is meant to be linked in to various programs that run on Linux.
* As such, it is available with as few restrictions as possible. This file
* is licensed under the Creative Commons Zero License, version 1.... | |
Linux kernel'inin 'tools/testing/selftests/vDSO/vdso_test_getrandom' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2022-2024 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
*/
#include <assert.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <sched.h>
#include... | |
Linux kernel'inin 'tools/testing/selftests/vDSO/vdso_test_abi' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* vdso_full_test.c: Sample code to test all the timers.
* Copyright (c) 2019 Arm Ltd.
*
* Compile with:
* gcc -std=gnu99 vdso_full_test.c parse_vdso.c
*
*/
#include <stdint.h>
#include <elf.h>
#include <stdio.h>
#include <time.h>
#include <sys/auxv.h>
#include <sys/ti... | |
Linux kernel'inin 'tools/testing/selftests/vDSO/vdso_test_chacha' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2022-2024 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
*/
#include <linux/compiler.h>
#include <tools/le_byteshift.h>
#include <sys/random.h>
#include <sys/auxv.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include "kselftes... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/vDSO/parse_vdso' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef PARSE_VDSO_H
#define PARSE_VDSO_H
#include <stdint.h>
/*
* To use this vDSO parser, first call one of the vdso_init_* functions.
* If you've already parsed auxv, then pass the value of AT_SYSINFO_EHDR
* to vdso_init_from_sysinfo_ehdr. Otherwise pass auxv t... | |
Linux kernel'inin 'tools/testing/selftests/vDSO/vdso_test_gettimeofday' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* vdso_test_gettimeofday.c: Sample code to test parse_vdso.c and
* vDSO gettimeofday()
* Copyright (c) 2014 Andy Lutomirski
*
* Compile with:
* gcc -std=gnu99 vdso_test_gettimeofday.c parse_vdso_gettimeofday.c
*
* Tested on x86, 32-bit a... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/vDSO/vdso_call' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Macro to call vDSO functions
*
* Copyright (C) 2024 Christophe Leroy <christophe.leroy@csgroup.eu>, CS GROUP France
*/
#ifndef __VDSO_CALL_H__
#define __VDSO_CALL_H__
#ifdef __powerpc__
#define LOADARGS_1(fn, __arg1) do { \
_r0 = fn; \
_r3 = (long)__arg... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/vDSO/vdso_config' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* vdso_config.h: Configuration options for vDSO tests.
* Copyright (c) 2019 Arm Ltd.
*/
#ifndef __VDSO_CONFIG_H__
#define __VDSO_CONFIG_H__
/*
* Each architecture exports its vDSO implementation with different names
* and a different version from the others, so we ne... | |
Linux kernel'inin 'tools/testing/selftests/vDSO/vdso_test_correctness' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* ldt_gdt.c - Test cases for LDT and GDT access
* Copyright (c) 2011-2015 Andrew Lutomirski
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <sys/time.h>
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/auxv.h>
#include <sys/syscall.h>
#include <... | |
Linux kernel'inde 'tools/testing/selftests/vDSO/vgetrandom-chacha' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2024 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
*/
#define __ASSEMBLY__
#if defined(__aarch64__)
#include "../../../../arch/arm64/kernel/vdso/vgetrandom-chacha.S"
#elif defined(__loongarch__)
#include "../../../../arch/loongarch/v... | |
Linux kernel'inin 'tools/testing/selftests/vDSO/vdso_test_getcpu' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* vdso_test_getcpu.c: Sample code to test parse_vdso.c and vDSO getcpu()
*
* Copyright (c) 2020 Arm Ltd
*/
#include <stdint.h>
#include <elf.h>
#include <stdio.h>
#include <sys/auxv.h>
#include <sys/time.h>
#include "kselftest.h"
#include "parse_vdso.h"
#include "v... | |
Linux kernel'inin 'tools/testing/selftests/vDSO/vdso_standalone_test_x86' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* vdso_test_gettimeofday.c: Sample code to test parse_vdso.c and
* vDSO gettimeofday()
* Copyright (c) 2014 Andy Lutomirski
*
* Compile with:
* gcc -std=gnu99 vdso_test_gettimeofday.c parse_vdso_gettimeofday.c
*
* Tested on x86, 32-bit a... | |
Linux kernel'inin 'tools/testing/selftests/mount/nosymfollow-test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <sched.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/... | |
Linux kernel'inin 'tools/testing/selftests/mount/unprivileged-remount-test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <sched.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/mount.h>
#include <sys/wait.h>
#include <sys/vfs.h>
#include <sys/statvfs.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include ... | |
Linux kernel'inin 'tools/testing/selftests/iommu/iommufd_fail_nth' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES
*
* These tests are "kernel integrity" tests. They are looking for kernel
* WARN/OOPS/kasn/etc splats triggered by kernel sanitizers & debugging
* features. It does not attempt to verify that the system calls a... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/iommu/iommufd_utils' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES */
#ifndef __SELFTEST_IOMMUFD_UTILS
#define __SELFTEST_IOMMUFD_UTILS
#include <unistd.h>
#include <stddef.h>
#include <sys/fcntl.h>
#include <sys/ioctl.h>
#include <stdint.h>
#include <assert.h>
#include <poll.... | |
Linux kernel'inin 'tools/testing/selftests/iommu/iommufd' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES */
#include <asm/unistd.h>
#include <stdlib.h>
#include <sys/capability.h>
#include <sys/mman.h>
#include <sys/eventfd.h>
#define __EXPORTED_HEADERS__
#include <linux/vfio.h>
#include "iommufd_utils.h"
static un... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/hid/hid_common' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) 2022-2024 Red Hat */
#include "kselftest_harness.h"
#include <fcntl.h>
#include <fnmatch.h>
#include <dirent.h>
#include <poll.h>
#include <pthread.h>
#include <stdbool.h>
#include <linux/hidraw.h>
#include <linux/uhid.h>
#define SHOW_UHID_DEBUG 0
#define... | |
Linux kernel'inin 'tools/testing/selftests/hid/hidraw' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2022-2024 Red Hat */
#include "hid_common.h"
#include <linux/input.h>
#include <string.h>
#include <sys/ioctl.h>
/* for older kernels */
#ifndef HIDIOCREVOKE
#define HIDIOCREVOKE _IOW('H', 0x0D, int) /* Revoke device access */
#endif /* HIDIOCREVOKE */
... | |
Linux kernel'inin 'tools/testing/selftests/hid/hid_bpf' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2022-2024 Red Hat */
#include "hid.skel.h"
#include "hid_common.h"
#include <bpf/bpf.h>
struct hid_hw_request_syscall_args {
__u8 data[10];
unsigned int hid;
int retval;
size_t size;
enum hid_report_type type;
__u8 request_type;
};
FIXTURE(hid_bpf) {
st... | |
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/hid/progs/hid_bpf_helpers' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2022 Benjamin Tissoires
*/
#ifndef __HID_BPF_HELPERS_H
#define __HID_BPF_HELPERS_H
/* "undefine" structs and enums in vmlinux.h, because we "override" them below */
#define bpf_wq bpf_wq___not_used
#define hid_bpf_ctx hid_bpf_ctx___not_used
#define hi... | |
Linux kernel'inin 'tools/testing/selftests/hid/progs/hid' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2022 Red hat */
#include "hid_bpf_helpers.h"
char _license[] SEC("license") = "GPL";
struct attach_prog_args {
int prog_fd;
unsigned int hid;
int retval;
int insert_head;
};
__u64 callback_check = 52;
__u64 callback2_check = 52;
SEC("?struct_ops/hid_devi... | |
Linux kernel'inin 'tools/testing/selftests/perf_events/remove_on_exec' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Test for remove_on_exec.
*
* Copyright (C) 2021, Google LLC.
*/
#define _GNU_SOURCE
/* We need the latest siginfo from the kernel repo. */
#include <sys/types.h>
#include <asm/siginfo.h>
#define __have_siginfo_t 1
#define __have_sigval_t 1
#define __have_sigevent_t 1
... | |
Linux kernel'inin 'tools/testing/selftests/perf_events/mmap' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define _GNU_SOURCE
#include <dirent.h>
#include <sched.h>
#include <stdbool.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <linux/perf_event.h>
#include "kselftest_harness.... | |
Linux kernel'inin 'tools/testing/selftests/perf_events/watermark_signal' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <linux/perf_event.h>
#include <stddef.h>
#include <sched.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/syscall.h>
#include <sys/wait.h>... | |
Linux kernel'inin 'tools/testing/selftests/perf_events/sigtrap_threads' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Test for perf events with SIGTRAP across all threads.
*
* Copyright (C) 2021, Google LLC.
*/
#define _GNU_SOURCE
/* We need the latest siginfo from the kernel repo. */
#include <sys/types.h>
#include <asm/siginfo.h>
#define __have_siginfo_t 1
#define __have_sigval_t 1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.