Lines Matching refs:fd2
396 _cleanup_close_ int fd1 = -1, fd2 = -1; in TEST() local
412 fd2 = fd_reopen(fd1, O_RDONLY|O_DIRECTORY|O_CLOEXEC); /* drop the O_PATH */ in TEST()
413 assert_se(fd2 >= 0); in TEST()
415 assert_se(fstat(fd2, &st2) >= 0); in TEST()
420 fl = fcntl(fd2, F_GETFL); in TEST()
427 fd1 = fd_reopen(fd2, O_DIRECTORY|O_PATH|O_CLOEXEC); /* reacquire the O_PATH */ in TEST()
455 fd2 = fd_reopen(fd1, O_RDONLY|O_CLOEXEC); /* drop the O_PATH */ in TEST()
456 assert_se(fd2 >= 0); in TEST()
458 assert_se(fstat(fd2, &st2) >= 0); in TEST()
463 fl = fcntl(fd2, F_GETFL); in TEST()
470 assert_se(fd_reopen(fd2, O_DIRECTORY|O_PATH|O_CLOEXEC) == -ENOTDIR); in TEST()
471 fd1 = fd_reopen(fd2, O_PATH|O_CLOEXEC); /* reacquire the O_PATH */ in TEST()
491 _cleanup_close_ int fd1 = -1, fd2 = -1; in TEST() local
495 assert_se(fd2 == -1); in TEST()
500 fd2 = TAKE_FD(fd1); in TEST()
502 assert_se(fd2 >= 0); in TEST()
507 array[0] = TAKE_FD(fd2); in TEST()
509 assert_se(fd2 == -1); in TEST()