Lines Matching +full:libudev +full:- +full:dev
56 #include <libudev.h>
147 its.it_value.tv_nsec -= NSEC_PER_SEC; in sig_ioctl()
160 return ret ? -1 : 0; in sig_ioctl()
202 __igt_sigiter.offset.tv_sec = end.tv_sec - start.tv_sec; in igt_sigiter_start()
203 __igt_sigiter.offset.tv_nsec = end.tv_nsec - start.tv_nsec; in igt_sigiter_start()
206 __igt_sigiter.offset.tv_sec -= 1; in igt_sigiter_start()
246 if (iter->pass++ == 0) in __igt_sigiter_continue()
258 __func__, iter->pass - 1, in __igt_sigiter_continue()
268 __igt_sigiter.offset.tv_nsec -= NSEC_PER_SEC; in __igt_sigiter_continue()
318 /* We pick SIGCONT as it is a "safe" signal - if we send SIGCONT to in igt_fork_signal_helper()
334 signal_helper_process(-getppid()); in igt_fork_signal_helper()
373 while (waitpid(signal_helper.pid, &status, WUNTRACED) == -1 && in igt_suspend_signal_helper()
470 struct udev_device *dev; in hang_detector_process() local
479 dev = NULL; in hang_detector_process()
481 dev = udev_monitor_receive_device(mon); in hang_detector_process()
482 if (dev == NULL) in hang_detector_process()
485 devnum = udev_device_get_devnum(dev); in hang_detector_process()
489 str = udev_device_get_property_value(dev, "ERROR"); in hang_detector_process()
497 udev_device_unref(dev); in hang_detector_process()
516 * Disable per-engine reset to force an error uevent. We don't in igt_fork_hang_detector()
518 * they are a test failure!) and so the loss of per-engine reset in igt_fork_hang_detector()
566 static int dump_aub = -1; in igt_aub_dump_enabled()
568 if (dump_aub == -1) in igt_aub_dump_enabled()
627 for (i = size - 1; i > 0; i--) { in igt_permute_array()
661 * long-winded tests manually on the console. To avoid spamming log files in
725 test_name[strlen(test_name) - 1] = '\0'; in get_suspend_test()
757 #define SQUELCH ">/dev/null 2>&1"
772 snprintf(cmd, sizeof(cmd), "rtcwake -n -s %d -m %s " SQUELCH, in suspend_via_rtcwake()
780 snprintf(cmd, sizeof(cmd), "rtcwake -s %d -m %s ", in suspend_via_rtcwake()
843 * again. Waking up is either achieved using the RTC wake-up alarm for a full
852 * component by comparing fail/no-fail results at different test points.
982 * var is set in the --interactive-debug=$var variable. Multiple keys
983 * can be specified as a comma-separated list or alternatively "all" if a wait
1025 * var is set in the --interactive-debug=$var variable. Multiple vars
1026 * can be specified as a comma-separated list or alternatively "all" if a wait
1151 * igt_assert() is not AS-Safe. */ in igt_module_param_exit_handler()
1154 for (data = module_params; data != NULL; data = data->next) { in igt_module_param_exit_handler()
1155 strcpy(file_path + dir_len, data->name); in igt_module_param_exit_handler()
1159 int size = strlen (data->original_value); in igt_module_param_exit_handler()
1161 if (size != write(fd, data->original_value, size)) { in igt_module_param_exit_handler()
1172 /* free() is not AS-Safe, so we can't call it here. */ in igt_module_param_exit_handler()
1185 * Notice that this function is called by igt_set_module_param(), so that one -
1186 * or one of its wrappers - is the only function the test programs need to call.
1195 for (data = module_params; data != NULL; data = data->next) in igt_save_module_param()
1196 if (strncmp(data->name, name, PARAM_NAME_MAX_SZ) == 0) in igt_save_module_param()
1205 strncpy(data->name, name, PARAM_NAME_MAX_SZ - 1); in igt_save_module_param()
1210 n = read(fd, data->original_value, PARAM_VALUE_MAX_SZ); in igt_save_module_param()
1216 data->next = module_params; in igt_save_module_param()
1291 if (!strncasecmp(proc_info->cmd, comm, sizeof(proc_info->cmd))) { in igt_is_process_running()
1310 * sent successfully or -errno otherwise.
1325 if (!strncasecmp(proc_info->cmd, comm, sizeof(proc_info->cmd))) { in igt_terminate_process()
1327 if (kill(proc_info->tid, sig) < 0) in igt_terminate_process()
1328 err = -errno; in igt_terminate_process()
1353 pid_t pid = info->pid; in __igt_show_stat()
1354 igt_assert((comm = info->comm)); in __igt_show_stat()
1355 igt_assert((fn = info->fn)); in __igt_show_stat()
1357 if (lstat(fn, &st) == -1) in __igt_show_stat()
1408 struct pinfo p = { .pid = info->tid, .comm = info->cmd, .fn = fn }; in igt_show_stat()
1426 const char *default_fds[] = { "/dev/pts", "/dev/null" }; in __igt_lsof_fds()
1438 if (*d->d_name == '.') in __igt_lsof_fds()
1442 snprintf(path, sizeof(path), "%s/%s", proc_path, d->d_name); in __igt_lsof_fds()
1444 if (lstat(path, &st) == -1) in __igt_lsof_fds()
1497 snprintf(path, sizeof(path), "/proc/%d/cwd", proc_info->tid); in __igt_lsof()
1499 if (stat(path, &st) == -1) in __igt_lsof()
1512 snprintf(path, sizeof(path), "/proc/%d/fd", proc_info->tid); in __igt_lsof()
1537 if (stat(dpath, &st) == -1) in igt_lsof()
1547 if (len > 1 && dpath[len - 1] == '/') in igt_lsof()
1548 sanitized[len - 1] = '\0'; in igt_lsof()
1574 nsecs = now->tv_nsec - last ->tv_nsec; in elapsed()
1575 nsecs += 1e9*(now->tv_sec - last->tv_sec); in elapsed()
1593 its.it_value.tv_nsec -= NSEC_PER_SEC; in siglatency()
1663 * Get the global system-wide maximum of open files the kernel allows,
1664 * by reading /proc/sys/fs/file-max. Fails the current subtest if
1668 * Returns: System-wide maximum of open files, or a best effort guess.
1674 FILE *file = fopen("/proc/sys/fs/file-max", "r"); in vfs_file_max()