| /linux/tools/testing/selftests/capabilities/ |
| H A D | test_execve.c | 35 ksft_exit_fail_msg("vsnprintf failed - %s\n", strerror(errno)); in vmaybe_write_file() 43 if ((errno == ENOENT) && enoent_ok) in vmaybe_write_file() 46 filename, strerror(errno)); in vmaybe_write_file() 54 filename, strerror(errno)); in vmaybe_write_file() 59 filename, strerror(errno)); in vmaybe_write_file() 95 strerror(errno)); in create_and_enter_ns() 97 ksft_exit_fail_msg("setresuid - %s\n", strerror(errno)); in create_and_enter_ns() 109 "capng_apply - %s\n", strerror(errno)); in create_and_enter_ns() 125 strerror(errno)); in create_and_enter_ns() 134 ksft_exit_fail_msg("getcwd - %s\n", strerror(errno)); in chdir_to_tmpfs() [all …]
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | pinning.c | 23 CHECK(err, "get map info", "err %d errno %d", err, errno); in get_map_id() 48 if (CHECK(err != -EINVAL, "invalid open", "err %d errno %d\n", err, errno)) { in test_pinning() 56 if (CHECK(err, "default open", "err %d errno %d\n", err, errno)) { in test_pinning() 62 if (CHECK(err, "default load", "err %d errno %d\n", err, errno)) in test_pinning() 67 if (CHECK(err, "stat pinpath", "err %d errno %d\n", err, errno)) in test_pinning() 72 if (CHECK(!err || errno != ENOENT, "stat nopinpath", in test_pinning() 73 "err %d errno %d\n", err, errno)) in test_pinning() 78 if (CHECK(!err || errno != ENOENT, "stat nopinpath2", in test_pinning() 79 "err %d errno %d\n", err, errno)) in test_pinning() 95 if (CHECK(err, "default load", "err %d errno %d\n", err, errno)) in test_pinning() [all …]
|
| /linux/tools/iio/ |
| H A D | iio_utils.c | 117 ret = -errno; in iioutils_get_type() 134 ret = -errno; in iioutils_get_type() 147 ret = -errno; in iioutils_get_type() 167 ret = -errno; in iioutils_get_type() 242 ret = -errno; in iioutils_get_param_float() 259 ret = -errno; in iioutils_get_param_float() 263 errno = 0; in iioutils_get_param_float() 265 ret = errno ? -errno : -ENODATA; in iioutils_get_param_float() 334 ret = -errno; in build_channel_array() 351 ret = -errno; in build_channel_array() [all …]
|
| /linux/tools/testing/selftests/landlock/ |
| H A D | base_test.c | 10 #include <errno.h> 36 ASSERT_EQ(EINVAL, errno); in TEST() 38 ASSERT_EQ(EINVAL, errno); in TEST() 40 ASSERT_EQ(EINVAL, errno); in TEST() 44 ASSERT_EQ(EFAULT, errno); in TEST() 48 ASSERT_EQ(EFAULT, errno); in TEST() 51 ASSERT_EQ(E2BIG, errno); in TEST() 55 ASSERT_EQ(ENOMSG, errno); in TEST() 59 ASSERT_EQ(ENOMSG, errno); in TEST() 61 ASSERT_EQ(ENOMSG, errno); in TEST() [all...] |
| /linux/tools/testing/selftests/mincore/ |
| H A D | mincore_selftest.c | 44 errno = 0; in TEST() 47 EXPECT_EQ(ENOMEM, errno); in TEST() 49 errno = 0; in TEST() 53 TH_LOG("mmap error: %s", strerror(errno)); in TEST() 57 errno = 0; in TEST() 60 EXPECT_EQ(EINVAL, errno); in TEST() 63 errno = 0; in TEST() 66 EXPECT_EQ(ENOMEM, errno); in TEST() 69 errno = 0; in TEST() 72 EXPECT_EQ(EFAULT, errno); in TEST() [all …]
|
| /linux/tools/testing/selftests/membarrier/ |
| H A D | membarrier_test_impl.h | 31 test_name, flags, errno); in test_membarrier_get_registrations() 54 if (errno != EINVAL) { in test_membarrier_cmd_fail() 58 errno, strerror(errno)); in test_membarrier_cmd_fail() 63 test_name, cmd, flags, errno); in test_membarrier_cmd_fail() 77 if (errno != EINVAL) { in test_membarrier_flags_fail() 81 errno, strerror(errno)); in test_membarrier_flags_fail() 86 test_name, flags, errno); in test_membarrier_flags_fail() 98 test_name, flags, errno); in test_membarrier_global_success() 116 if (errno != EPERM) { in test_membarrier_private_expedited_fail() 120 errno, strerror(errno)); in test_membarrier_private_expedited_fail() [all …]
|
| /linux/arch/um/os-Linux/ |
| H A D | file.c | 51 return -errno; in os_stat_fd() 65 return -errno; in os_stat_file() 83 return -errno; in os_access() 95 return -errno; in os_ioctl_generic() 104 return -errno; in os_get_ifname() 115 return -errno; in os_mode_fd() 151 if (err && (errno != EACCES)) in os_file_mode() 152 return -errno; in os_file_mode() 157 if (err && (errno != EACCES)) in os_file_mode() 158 return -errno; in os_file_mode() [all …]
|
| H A D | umid.c | 55 __func__, errno); in make_uml_dir() 60 if ((mkdir(uml_dir, 0777) < 0) && (errno != EEXIST)) { in make_uml_dir() 62 uml_dir, strerror(errno)); in make_uml_dir() 63 err = -errno; in make_uml_dir() 91 if (errno != ENOENT) in remove_files_and_dir() 92 return -errno; in remove_files_and_dir() 107 if (unlink(file) < 0 && errno != ENOENT) { in remove_files_and_dir() 108 ret = -errno; in remove_files_and_dir() 113 if (rmdir(dir) < 0 && errno != ENOENT) { in remove_files_and_dir() 114 ret = -errno; in remove_files_and_dir() [all …]
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | test_maps.c | 11 #include <errno.h> 40 printf("Failed to create hashmap '%s'!\n", strerror(errno)); in test_hashmap() 53 errno == EEXIST); in test_hashmap() 57 errno == EINVAL); in test_hashmap() 71 assert(bpf_map_lookup_elem(fd, &key, &value) < 0 && errno == ENOENT); in test_hashmap() 76 errno == ENOENT); in test_hashmap() 86 errno == E2BIG); in test_hashmap() 95 errno == E2BIG); in test_hashmap() 99 assert(bpf_map_delete_elem(fd, &key) < 0 && errno == ENOENT); in test_hashmap() 110 errno in test_hashmap() [all...] |
| /linux/tools/testing/selftests/mount/ |
| H A D | nosymfollow-test.c | 50 die("vsnprintf failed: %s\n", strerror(errno)); in vmaybe_write_file() 57 if ((errno == ENOENT) && enoent_ok) in vmaybe_write_file() 59 die("open of %s failed: %s\n", filename, strerror(errno)); in vmaybe_write_file() 68 filename, strerror(errno)); in vmaybe_write_file() 73 die("close of %s failed: %s\n", filename, strerror(errno)); in vmaybe_write_file() 100 die("unshare(CLONE_NEWUSER) failed: %s\n", strerror(errno)); in create_and_enter_ns() 107 die("setgid(0) failed %s\n", strerror(errno)); in create_and_enter_ns() 109 die("setuid(0) failed %s\n", strerror(errno)); in create_and_enter_ns() 112 die("unshare(CLONE_NEWNS) failed: %s\n", strerror(errno)); in create_and_enter_ns() 121 die("creat failed: %s\n", strerror(errno)); in setup_symlink() [all …]
|
| /linux/tools/testing/selftests/arm64/fp/ |
| H A D | kernel-test.c | 77 if (errno == EAFNOSUPPORT) { in create_socket() 83 strerror(errno), errno); in create_socket() 169 addr.salg_name, strerror(errno), errno); in create_socket() 176 addr.salg_name, strerror(errno), errno); in create_socket() 185 strerror(errno), errno); in create_socket() 214 strerror(errno), errno); in compute_digest() 222 strerror(errno), errno); in compute_digest() 238 if (errno == -EAGAIN) in compute_digest() 241 strerror(errno), errno); in compute_digest() 265 strerror(errno), errno); in main() [all …]
|
| H A D | fp-stress.c | 71 strerror(errno), errno); in child_start() 76 strerror(errno), errno); in child_start() 85 printf("dup2() %d\n", errno); in child_start() 95 printf("dup2() %d\n", errno); in child_start() 114 strerror(errno), errno); in child_start() 121 program, errno, strerror(errno)); in child_start() 141 child->name, strerror(errno), errno); in child_start() 154 if (errno == EINTR) in child_output_read() 158 child->name, strerror(errno), in child_output_read() 159 errno); in child_output_read() [all …]
|
| /linux/tools/testing/selftests/filesystems/binderfs/ |
| H A D | binderfs_test.c | 33 int _e_ = errno; \ 35 errno = _e_; \ 46 strerror(errno)); in change_mountns() 52 strerror(errno)); in change_mountns() 75 strerror(errno)); in __do_binderfs_test() 81 if (errno == ENODEV) in __do_binderfs_test() 83 TH_LOG("%s - Failed to mount binderfs", strerror(errno)); in __do_binderfs_test() 95 strerror(errno)); in __do_binderfs_test() 100 saved_errno = errno; in __do_binderfs_test() 102 errno = saved_errno; in __do_binderfs_test() [all …]
|
| /linux/tools/testing/selftests/arm64/gcs/ |
| H A D | gcs-stress.c | 67 strerror(errno), errno); in start_thread() 72 strerror(errno), errno); in start_thread() 81 fprintf(stderr, "dup2() %d\n", errno); in start_thread() 91 fprintf(stderr, "dup2() %d\n", errno); in start_thread() 110 strerror(errno), errno); in start_thread() 118 errno, strerror(errno)); in start_thread() 142 child->name, strerror(errno), errno); in start_thread() 158 if (errno == EINTR) in child_output_read() 162 child->name, strerror(errno), in child_output_read() 163 errno); in child_output_read() [all …]
|
| /linux/tools/testing/selftests/mm/ |
| H A D | pagemap_ioctl.c | 125 ksft_exit_fail_msg("ioctl(UFFDIO_REGISTER) %d %s\n", errno, strerror(errno)); in wp_init() 157 ksft_exit_fail_msg("error %d %d %s\n", 1, errno, strerror(errno)); in wp_addr_range() 217 ksft_exit_fail_msg("error %ld %d %s\n", written, errno, strerror(errno)); in userfaultfd_tests() 327 ksft_exit_fail_msg("error %ld %d %s\n", ret, errno, strerror(errno)); in sanity_tests_sd() 337 ksft_exit_fail_msg("error %ld %d %s\n", ret, errno, strerror(errno)); in sanity_tests_sd() 342 ksft_exit_fail_msg("error %ld %d %s\n", ret2, errno, strerror(errno)); in sanity_tests_sd() 348 ksft_exit_fail_msg("error %ld %d %s\n", ret3, errno, strerror(errno)); in sanity_tests_sd() 363 ksft_exit_fail_msg("error %ld %d %s\n", ret, errno, strerror(errno)); in sanity_tests_sd() 369 ksft_exit_fail_msg("error %ld %d %s\n", ret2, errno, strerror(errno)); in sanity_tests_sd() 384 ksft_exit_fail_msg("error %ld %d %s\n", ret, errno, strerror(errno)); in sanity_tests_sd() [all …]
|
| H A D | mrelease_test.c | 30 ksft_exit_fail_msg("mmap failed, halting the test: %s\n", strerror(errno)); in alloc_noexit() 37 ksft_exit_fail_msg("write: %s\n", strerror(errno)); in alloc_noexit() 55 errno != EINVAL) { in run_negative_tests() 56 ksft_exit_fail_msg("process_mrelease with wrong flags: %s\n", strerror(errno)); in run_negative_tests() 62 if (!syscall(__NR_process_mrelease, pidfd, 0) || errno != EINVAL) in run_negative_tests() 63 ksft_exit_fail_msg("process_mrelease on a live process: %s\n", strerror(errno)); in run_negative_tests() 90 if (!syscall(__NR_process_mrelease, -1, 0) || errno != EBADF) { in main() 91 if (errno == ENOSYS) { in main() 96 strerror(errno)); in main() 108 ksft_exit_fail_msg("pipe: %s\n", strerror(errno)); in main() [all …]
|
| /linux/tools/testing/selftests/bpf/map_tests/ |
| H A D | sk_storage_map.c | 148 btf_fd, errno); in create_sk_storage_map() 155 "bpf_map_create()", "errno:%d\n", errno); in create_sk_storage_map() 185 err = -errno; in insert_close_thread() 186 fprintf(stderr, "socket(): errno:%d\n", errno); in insert_close_thread() 192 err = -errno; in insert_close_thread() 195 errno); in insert_close_thread() 239 err = -errno; in do_sk_storage_map_stress_free() 289 if (err && errno != EAGAIN) { in update_thread() 290 err = -errno; in update_thread() 292 err, errno); in update_thread() [all …]
|
| /linux/drivers/media/usb/as102/ |
| H A D | as102_fw.c | 96 int total_read_bytes = 0, errno = 0; in as102_firmware_upload() local 125 errno = bus_adap->ops->upload_fw_pkt(bus_adap, in as102_firmware_upload() 128 if (errno < 0) in as102_firmware_upload() 140 errno = bus_adap->ops->upload_fw_pkt(bus_adap, in as102_firmware_upload() 145 if (errno < 0) in as102_firmware_upload() 152 return (errno == 0) ? total_read_bytes : errno; in as102_firmware_upload() 157 int errno = -EFAULT; in as102_fw_upload() local 175 errno = -ENOMEM; in as102_fw_upload() 180 errno = request_firmware(&firmware, fw1, &dev->dev); in as102_fw_upload() 181 if (errno < 0) { in as102_fw_upload() [all …]
|
| /linux/tools/testing/selftests/breakpoints/ |
| H A D | step_after_suspend_test.c | 32 strerror(errno)); in child() 38 strerror(errno)); in child() 43 ksft_print_msg("raise(SIGSTOP) failed: %s\n", strerror(errno)); in child() 57 ksft_print_msg("fork() failed: %s\n", strerror(errno)); in run_test() 65 ksft_print_msg("waitpid() failed: %s\n", strerror(errno)); in run_test() 69 ksft_print_msg("child did not stop: %s\n", strerror(errno)); in run_test() 74 strerror(errno)); in run_test() 79 if (errno == EIO) { in run_test() 82 strerror(errno)); in run_test() 86 strerror(errno)); in run_test() [all …]
|
| /linux/fs/nfs/ |
| H A D | mount_clnt.c | 83 int errno; member 85 { .status = MNT_OK, .errno = 0, }, 86 { .status = MNT_EPERM, .errno = -EPERM, }, 87 { .status = MNT_ENOENT, .errno = -ENOENT, }, 88 { .status = MNT_EACCES, .errno = -EACCES, }, 89 { .status = MNT_EINVAL, .errno = -EINVAL, }, 110 int errno; member 112 { .status = MNT3_OK, .errno = 0, }, 113 { .status = MNT3ERR_PERM, .errno = -EPERM, }, 114 { .status = MNT3ERR_NOENT, .errno = -ENOENT, }, [all …]
|
| /linux/tools/hv/ |
| H A D | hv_vss_daemon.c | 53 if ((cmd == FIFREEZE && errno == EBUSY) || in vss_do_freeze() 54 (cmd == FITHAW && errno == EINVAL)) { in vss_do_freeze() 81 } else if (errno != ENOENT) { in is_dev_loop() 83 buffer, errno, strerror(errno)); in is_dev_loop() 89 if (errno != ENOENT) in is_dev_loop() 91 buffer, errno, strerror(errno)); in is_dev_loop() 144 ent->mnt_fsname, errno, strerror(errno)); in vss_operate() 183 save_errno = errno; in vss_operate() 253 errno); in main() 262 errno, strerror(errno)); in main() [all …]
|
| /linux/tools/testing/selftests/powerpc/papr_vpd/ |
| H A D | papr_vpd.c | 20 SKIP_IF_MSG(devfd < 0 && errno == ENOENT, in dev_papr_vpd_open_close() 36 SKIP_IF_MSG(devfd < 0 && errno == ENOENT, in dev_papr_vpd_get_handle_all() 41 errno = 0; in dev_papr_vpd_get_handle_all() 43 FAIL_IF(errno != 0); in dev_papr_vpd_get_handle_all() 74 SKIP_IF_MSG(devfd < 0 && errno == ENOENT, in dev_papr_vpd_get_handle_byte_at_a_time() 79 errno = 0; in dev_papr_vpd_get_handle_byte_at_a_time() 81 FAIL_IF(errno != 0); in dev_papr_vpd_get_handle_byte_at_a_time() 91 errno = 0; in dev_papr_vpd_get_handle_byte_at_a_time() 95 FAIL_IF(errno != 0); in dev_papr_vpd_get_handle_byte_at_a_time() 115 SKIP_IF_MSG(devfd < 0 && errno == ENOENT, in dev_papr_vpd_unterm_loc_code() [all …]
|
| /linux/tools/testing/selftests/futex/functional/ |
| H A D | futex_waitv.c | 42 errno, strerror(errno)); in waiterfn() 72 res ? errno : res, in TEST() 73 res ? strerror(errno) : ""); in TEST() 89 if (errno == ENOSYS) in TEST() 112 res ? errno : res, in TEST() 113 res ? strerror(errno) : ""); in TEST() 138 res ? errno : res, in TEST() 139 res ? strerror(errno) : ""); in TEST() 162 res ? errno : res, in TEST() 163 res ? strerror(errno) : ""); in TEST() [all …]
|
| /linux/tools/testing/selftests/net/ |
| H A D | reuseport_addr_any.c | 10 #include <errno.h> 45 error(1, errno, "inet_pton failed: %s", addr_str); in build_rcv_fd() 55 error(1, errno, "inet_pton failed: %s", addr_str); in build_rcv_fd() 72 error(1, errno, "failed to create receive socket"); in build_rcv_fd() 77 error(1, errno, "failed to set SO_REUSEPORT"); in build_rcv_fd() 80 error(1, errno, "failed to bind receive socket"); in build_rcv_fd() 83 error(1, errno, "tcp: failed to listen on receive port"); in build_rcv_fd() 104 error(1, errno, "inet_pton failed: %s", IP4_ADDR); in connect_and_send() 117 error(1, errno, "inet_pton failed: %s", IP6_ADDR); in connect_and_send() 135 error(1, errno, "faile in connect_and_send() [all...] |
| /linux/tools/testing/selftests/ |
| H A D | kselftest.h | 178 int saved_errno = errno; in ksft_print_msg() 183 errno = saved_errno; in ksft_print_msg() 202 ksft_print_msg("%s: %s (%d)\n", msg, strerror(errno), errno); in ksft_perror() 207 int saved_errno = errno; in ksft_test_result_pass() 214 errno = saved_errno; in ksft_test_result_pass() 221 int saved_errno = errno; in ksft_test_result_fail() 228 errno = saved_errno; in ksft_test_result_fail() 247 int saved_errno = errno; in ksft_test_result_xfail() 254 errno = saved_errno; in ksft_test_result_xfail() 261 int saved_errno = errno; in ksft_test_result_xpass() [all …]
|