/haiku/src/tests/system/kernel/file_corruption/driver/ |
H A D | checksum_device.cpp | 101 status_t Init(int fd, uint64 blockCount, uint32 cachedBlockCount) argument 104 fFD = fd;
|
/haiku/src/tests/system/kernel/file_corruption/fs/ |
H A D | Volume.cpp | 118 Volume::Init(int fd, uint64 totalBlocks) argument 120 fFD = dup(fd);
|
H A D | Volume.h | 30 status_t Init(int fd, uint64 totalBlocks);
|
/haiku/src/tests/system/kernel/ |
H A D | mmap_resize_test.cpp | 23 int fd = open(fileName, O_CREAT | O_RDWR | O_TRUNC, 0644); local 24 if (fd < 0) { 34 if (write(fd, buffer, sizeof(buffer)) != (ssize_t)sizeof(buffer)) { 41 void* address = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 49 if (ftruncate(fd, 0) < 0) {
|
H A D | null_poll_test.cpp | 14 int fd = fileno(f); local 15 printf("fd=%d\n", fd); 18 pfd.fd = fd;
|
H A D | select_check.cpp | 26 for (int fd = 0; fd < 3; fd++) { 27 if (strchr(config[fd], 'r')) 28 FD_SET(fd, &readSet); 29 if (strchr(config[fd], 'w')) 30 FD_SET(fd, &writeSet); 31 if (strchr(config[fd], 'e')) 32 FD_SET(fd, &errorSet); 38 for (int fd [all...] |
H A D | select_close_test.cpp | 14 int fd = *((int*)data); local 16 close(fd); 17 fprintf(stderr, "fd %d closed\n", fd); 25 int fd = dup(0); local 27 thread_id thread = spawn_thread(close_fd, "close fd", B_NORMAL_PRIORITY, 28 &fd); 34 FD_SET(fd, &readSet); 36 fprintf(stderr, "select({0, %d}, NULL, NULL, NULL) ...\n", fd); 37 int result = select(fd [all...] |
/haiku/src/tests/system/libroot/os/ |
H A D | fs_attr_test.cpp | 19 test_read(int fd, const char* attribute, type_code type, const char* data, argument 23 if (fs_stat_attr(fd, attribute, &info) != 0) { 41 ssize_t bytesRead = fs_read_attr(fd, attribute, B_RAW_TYPE, 0, buffer, 60 int fd = open(kTestFileName, O_CREAT | O_TRUNC | O_WRONLY); local 61 if (fd < 0) { 69 fs_write_attr(fd, "TEST", B_STRING_TYPE, 0, "Hello BeOS", 11); 70 test_read(fd, "TEST", B_STRING_TYPE, "Hello BeOS", 11); 73 fs_write_attr(fd, "TEST", B_STRING_TYPE, 6, "Haiku", 6); 74 test_read(fd, "TEST", B_STRING_TYPE, "Hello Haiku", 12); 76 fs_write_attr(fd, "TESTra [all...] |
/haiku/src/tests/system/libroot/posix/ |
H A D | chmod.cpp | 35 int fd = open(argv[1], O_RDONLY); local 36 if (fd < 0) { 41 if (fchmod(fd, 0666) == -1) { 44 close(fd); 47 close(fd);
|
H A D | flock_test.cpp | 23 intptr_t fd = (intptr_t)_fd; local 33 if (fcntl(fd, F_SETLK, &flock) == 0) { 43 if (fcntl(fd, F_SETLKW, &flock) == -1) { 51 if (fcntl(fd, F_SETLK, &flock) == -1) { 64 intptr_t fd = open("/etc/passwd", O_RDONLY); local 65 if (fd < 0) { 78 if (fcntl(fd, F_SETLK, &flock) == 0) { 87 if (fcntl(fd, F_SETLK, &flock) == -1) { 93 close(fd); 95 fd [all...] |
H A D | fseek_test.cpp | 35 int fd; local 53 fd = mkstemp(fname); 54 if (fd == -1) 57 fp = fdopen(fd, "w+"); 108 } else if (lseek(fd, 0, SEEK_CUR) != 0) { 126 } else if (lseek(fd, 0, SEEK_CUR) != 0) { 144 } else if (lseek(fd, 0, SEEK_CUR) != 0) { 162 } else if (lseek(fd, 0, SEEK_CUR) != 0) { 180 } else if (lseek(fd, 0, SEEK_CUR) != 0) { 198 } else if (lseek(fd, [all...] |
H A D | seek_and_write_test.cpp | 16 test_for_content(int fd, off_t start, const char* contents, size_t length) argument 22 if (pread(fd, buffer, toRead, start) != (ssize_t)toRead) { 40 test_for_zero(int fd, off_t start, off_t end) argument 46 if (pread(fd, buffer, length, start) != (ssize_t)length) { 85 int fd = open(name, O_RDWR | O_TRUNC | O_CREAT, 0644); local 86 if (fd < 0) { 99 if (write(fd, buffer, sizeof(buffer)) != (ssize_t)sizeof(buffer)) { 108 ftruncate(fd, 0); 112 pwrite(fd, "---", 3, 100 * 1024); 113 pwrite(fd, " [all...] |
H A D | termios.cpp | 28 int fd = open(argv[1], O_RDONLY); local 29 if (fd < 0) { 34 int err = tcdrain(fd); 38 close(fd); 41 err = tcflow(fd, TCION); 45 close(fd); 49 err = tcflush(fd, TCIOFLUSH); 53 close(fd); 57 close(fd);
|
H A D | truncate.cpp | 52 int fd = open(argv[1], O_RDONLY); local 53 if (fd < 0) { 58 if (ftruncate(fd, newSize) == 0 || errno != EINVAL) { 61 close(fd); 64 close(fd);
|
H A D | tst-fgetws.c | 25 int fd; local 34 fd = mkstemp(name1); 35 if (fd == -1) { 39 if ((fp = fdopen(fd, "w")) == NULL) { 47 fd = mkstemp(name2); 48 if (fd == -1) { 52 if ((fp = fdopen(fd, "w")) == NULL) {
|
H A D | tst-ungetwc1.c | 18 int fd; local 27 fd = mkstemp(fname); 28 if (fd == -1) { 34 if ((fp = fdopen(fd, "w")) == NULL) {
|
H A D | tst-ungetwc2.c | 18 int fd; local 29 fd = mkstemp(fname); 30 if (fd == -1) { 34 if ((fp = fdopen(fd, "w")) == NULL) {
|
H A D | tst-wprintf2.c | 19 int fd; local 26 fd = mkstemp(name); 27 if (fd == -1) 34 fp = fdopen(dup(fd), "w"); 46 fp = fdopen(dup (fd), "a"); 58 lseek(fd, SEEK_SET, 0); 59 fp = fdopen(fd, "r");
|
/haiku/src/tests/system/network/ |
H A D | firefox_crash.cpp | 21 int fd = socket(AF_INET, SOCK_STREAM, 0); local 22 if (fd < 0) 26 fcntl(fd, F_SETFL, O_NONBLOCK); 28 return fd;
|
H A D | ipv46_client.cpp | 55 int fd = socket(socketFamily1, socketType, 0); local 56 if (fd < 0) { 65 if (connect(fd, (sockaddr *) &saddr, socketFamily2 == AF_INET ? 68 close(fd); 74 int ret = send(fd, buffer, len, 0); 86 close(fd);
|
H A D | ipv46_server.cpp | 16 void recvLoop(int fd) { argument 19 int ret = recv(fd, buffer, sizeof(buffer) - 1, 0); 84 int fd = socket(socketFamily, socketType, 0); local 85 if (fd < 0) { 90 if (bind(fd, (sockaddr *)&localAddress, localAddress.ss_family == AF_INET ? 99 recvLoop(fd); 103 if (listen(fd, 5) < 0) { 108 int clientfd = accept(fd, NULL, 0); 120 close(fd);
|
/haiku/src/tests/system/network/ipv6/ |
H A D | multicast_sender.cpp | 47 int fd = socket(socketFamily, SOCK_DGRAM, 0); local 48 if (fd < 0) { 71 if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, 80 int status = sendto(fd, buffer, length, 0, (sockaddr *) &saddr, 92 close(fd);
|
H A D | raw_client.cpp | 31 int fd = socket(socketFamily, SOCK_RAW, TEST_PROTOCOL); local 32 if (fd < 0) { 51 int status = sendto(fd, buffer, length, 0, (sockaddr *) &saddr, 63 close(fd);
|
H A D | raw_server.cpp | 21 recvLoop(int fd) argument 29 int status = recvfrom(fd, buffer, sizeof(buffer) - 1, 0, 61 int fd = socket(socketFamily, SOCK_RAW, TEST_PROTOCOL); local 62 if (fd < 0) { 78 if (bind(fd, (sockaddr *)&localAddress, socketFamily == AF_INET ? 85 recvLoop(fd);
|
H A D | tcp_udp_client.cpp | 67 int fd = socket(socketFamily1, socketType, 0); local 68 if (fd < 0) { 77 if (connect(fd, (sockaddr *) &saddr, socketFamily2 == AF_INET ? 80 close(fd); 86 int status = send(fd, buffer, length, 0); 96 close(fd);
|