Lines Matching +full:0 +full:x1b

35 	fprintf(stderr, "\x1b[37m\x1b[41m\x1b[1mFailed to power off!!!\x1b[0m\n");  in poweroff()
41 … "\n\n\x1b[37m\x1b[41m\x1b[1mSOMETHING WENT HORRIBLY WRONG\x1b[0m\n\n \x1b[31m\x1b[1m%s: %s\x1b in panic()
45 #define pretty_message(msg) puts("\x1b[32m\x1b[1m" msg "\x1b[0m")
52 if (uname(&utsname) < 0) in print_banner()
56 …ntf("\x1b[45m\x1b[33m\x1b[1m%*.s\x1b[0m\n\x1b[45m\x1b[33m\x1b[1m WireGuard Test Suite on %s %s … in print_banner()
63 if (!getrandom(NULL, 0, GRND_NONBLOCK)) in seed_rng()
67 if (fd < 0) in seed_rng()
69 if (ioctl(fd, RNDADDTOENTCNT, &bits) < 0) in seed_rng()
79 if (stime(&(time_t){1433512680}) < 0) in set_time()
92 if (mount("none", "/dev", "devtmpfs", 0, NULL)) in mount_filesystems()
94 if (mount("none", "/proc", "proc", 0, NULL)) in mount_filesystems()
96 if (mount("none", "/sys", "sysfs", 0, NULL)) in mount_filesystems()
98 if (mount("none", "/tmp", "tmpfs", 0, NULL)) in mount_filesystems()
100 if (mount("none", "/run", "tmpfs", 0, NULL)) in mount_filesystems()
102 if (mount("none", "/sys/kernel/debug", "debugfs", 0, NULL)) in mount_filesystems()
115 if (fd >= 0) { in enable_logging()
121 if (fd >= 0) { in enable_logging()
137 if (fcntl(fileno(file), F_SETFL, O_NONBLOCK) < 0) in kmod_selftests()
144 *strchrnul(start, '\n') = '\0'; in kmod_selftests()
148 if (!pass || pass[6] != '\0') { in kmod_selftests()
150 printf(" \x1b[31m* %s\x1b[0m\n", start); in kmod_selftests()
152 printf(" \x1b[32m* %s\x1b[0m\n", start); in kmod_selftests()
156 puts("\x1b[31m\x1b[1m[-] Tests failed! \u2639\x1b[0m"); in kmod_selftests()
171 else if (pid == 0) { in launch_tests()
175 if (waitpid(pid, &status, 0) < 0) in launch_tests()
177 if (WIFEXITED(status) && WEXITSTATUS(status) == 0) { in launch_tests()
180 if (fd < 0) in launch_tests()
182 if (read(fd, cmdline, sizeof(cmdline) - 1) <= 0) in launch_tests()
184 cmdline[sizeof(cmdline) - 1] = '\0'; in launch_tests()
196 if (fd < 0) in launch_tests()
212 printf("\x1b[31m\x1b[1m[-] Tests failed with %s %d! \u2639\x1b[0m\n", why, what); in launch_tests()
218 for (unsigned int i = 0; i < 1000; ++i) { in ensure_console()
220 if (fd < 0) { in ensure_console()
224 dup2(fd, 0); in ensure_console()
228 if (write(1, "\0\0\0\0\n", 5) == 5) in ensure_console()
239 if (fd < 0) in clear_leaks()
251 if (fd < 0) in check_leaks()
259 if (fd < 0) in check_leaks()
261 if (sendfile(1, fd, NULL, 0x7ffff000) > 0) in check_leaks()