Home
last modified time | relevance | path

Searched refs:statx (Results 1 - 25 of 40) sorted by relevance

12

/third_party/ltp/testcases/kernel/syscalls/statx/
H A Dstatx02.c10 * This code tests the following flags with statx syscall:
42 struct statx buf; in test_empty_path()
44 TEST(statx(file_fd, "", AT_EMPTY_PATH, 0, &buf)); in test_empty_path()
47 "statx(file_fd, \"\", AT_EMPTY_PATH, 0, &buf)"); in test_empty_path()
50 "statx(file_fd, \"\", AT_EMPTY_PATH, 0, &buff)"); in test_empty_path()
64 struct statx fbuf; in test_sym_link()
65 struct statx lbuf; in test_sym_link()
67 TEST(statx(AT_FDCWD, TESTFILE, 0, 0, &fbuf)); in test_sym_link()
71 "statx(AT_FDCWD, %s, 0, 0, &fbuf)", TESTFILE); in test_sym_link()
74 "statx(AT_FDCW in test_sym_link()
[all...]
H A Dstatx05.c10 * Test statx syscall with STATX_ATTR_ENCRYPTED flag, setting a key is required
40 struct statx buf; in test_flagged()
42 TEST(statx(AT_FDCWD, TESTDIR_FLAGGED, 0, 0, &buf)); in test_flagged()
58 struct statx buf; in test_unflagged()
60 TEST(statx(AT_FDCWD, TESTDIR_UNFLAGGED, 0, 0, &buf)); in test_unflagged()
H A Dstatx01.c10 * This code tests the functionality of statx system call.
53 static void test_mnt_id(struct statx *buf) in test_mnt_id()
86 "statx.stx_mnt_id equals to mount_id(%"PRIu64") in /proc/self/mountinfo", in test_mnt_id()
90 "statx.stx_mnt_id(%"PRIu64") doesn't exist in /proc/self/mountinfo", in test_mnt_id()
101 struct statx buff; in test_normal_file()
103 TEST(statx(AT_FDCWD, TESTFILE, 0, 0, &buff)); in test_normal_file()
106 "statx(AT_FDCWD, %s, 0, 0, &buff)", TESTFILE); in test_normal_file()
109 "statx(AT_FDCWD, %s, 0, 0, &buff)", TESTFILE); in test_normal_file()
153 tst_res(TCONF, "stx_mnt_id is not defined in struct statx"); in test_normal_file()
159 struct statx buf in test_device_file()
[all...]
H A Dstatx09.c10 * This code tests if STATX_ATTR_VERITY flag in the statx attributes is set correctly.
12 * The statx() system call sets STATX_ATTR_VERITY if the file has fs-verity
43 struct statx buf; in test_flagged()
45 TST_EXP_PASS(statx(AT_FDCWD, TESTFILE_FLAGGED, 0, 0, &buf), in test_flagged()
46 "statx(AT_FDCWD, %s, 0, 0, &buf)", TESTFILE_FLAGGED); in test_flagged()
57 struct statx buf; in test_unflagged()
59 TST_EXP_PASS(statx(AT_FDCWD, TESTFILE_UNFLAGGED, 0, 0, &buf), in test_unflagged()
60 "statx(AT_FDCWD, %s, 0, 0, &buf)", TESTFILE_UNFLAGGED); in test_unflagged()
H A Dstatx08.c10 * This case tests whether the attributes field of statx received expected value
11 * by using flags in the stx_attributes_mask field of statx.
40 struct statx buf; in run()
42 TEST(statx(AT_FDCWD, flag ? TESTDIR_FLAGGED : TESTDIR_UNFLAGGED, 0, 0, &buf)); in run()
124 struct statx buf; in setup()
129 TEST(statx(AT_FDCWD, TESTDIR_FLAGGED, 0, 0, &buf)); in setup()
H A Dstatx12.c43 struct statx buf; in verify_statx()
49 TST_EXP_PASS_SILENT(statx(*tc->fd, "", AT_EMPTY_PATH, 0, &buf)); in verify_statx()
53 TST_EXP_PASS_SILENT(statx(AT_FDCWD, tc->path, 0, 0, &buf)); in verify_statx()
H A Dstatx11.c34 struct statx buf; in verify_statx()
36 TST_EXP_PASS_SILENT(statx(AT_FDCWD, tst_device->dev, 0, STATX_DIOALIGN, &buf), in verify_statx()
37 "statx(AT_FDCWD, %s, 0, STATX_DIOALIGN, &buf)", tst_device->dev); in verify_statx()
57 tst_res(TCONF, "glibc statx struct miss stx_dio_mem_align field"); in verify_statx()
H A Dstatx10.c41 struct statx buf; in verify_statx()
43 TST_EXP_PASS_SILENT(statx(AT_FDCWD, TESTFILE, 0, STATX_DIOALIGN, &buf), in verify_statx()
44 "statx(AT_FDCWD, %s, 0, STATX_DIOALIGN, &buf)", TESTFILE); in verify_statx()
62 tst_res(TCONF, "glibc statx struct miss stx_dio_mem_align field"); in verify_statx()
H A Dstatx04.c9 * Test whether the kernel properly advertises support for statx() attributes:
20 * ext2, ext4, btrfs, xfs and tmpfs support statx syscall since the following commit
26 * ext2: support statx syscall
32 * ext4: Add statx support
38 * Btrfs: add statx support
44 * xfs: report crtime and attribute flags to statx
103 /* Attribute support was added to Btrfs statx() in kernel v4.13 */ in setup()
105 tst_brk(TCONF, "statx() attributes not supported on Btrfs"); in setup()
111 struct statx buf; in run()
113 TST_EXP_PASS_SILENT(statx(AT_FDCW in run()
[all...]
H A Dstatx03.c10 * Test basic error handling of statx syscall:
70 struct statx buf; in run_test()
73 TEST(statx(tc->dfd, *(tc->filename), tc->flag, in run_test()
77 tst_res(TFAIL, "statx() returned with %ld", TST_RET); in run_test()
82 tst_res(TPASS | TTERRNO, "statx() failed with"); in run_test()
87 "statx() should fail with %s", tst_strerrno(tc->errnum)); in run_test()
H A Dstatx07.c17 * A test file is created in server folder and statx is being
30 * 9ccee940bd5b ("Support statx() mask and query flags parameters")
64 struct statx buf; in get_mode()
66 TEST(statx(AT_FDCWD, file_name, flag_type, STATX_BASIC_STATS, &buf)); in get_mode()
70 "statx(AT_FDCWD, %s, %s, STATX_BASIC_STATS, &buf)", in get_mode()
74 tst_res(TINFO, "statx(AT_FDCWD, %s, %s, STATX_BASIC_STATS, &buf) = %o", in get_mode()
103 "statx() with %s for mode %o", in test_statx()
107 "statx() with %s for mode %o %o", in test_statx()
H A Dstatx06.c10 * Test the following file timestamps of statx syscall:
101 struct statx buff; in test_statx()
114 TEST(statx(AT_FDCWD, TEST_FILE, 0, STATX_BASIC_STATS | STATX_BTIME, &buff)); in test_statx()
117 "statx(AT_FDCWD, %s, 0, STATX_BASIC_STATS | STATX_BTIME, &buff)", in test_statx()
/third_party/ltp/include/lapi/
H A Dstat.h17 * Timestamp structure for the timestamps in struct statx.
35 * (statx()).
38 * parameter to statx(). What statx() actually got will be indicated in
71 struct statx { struct
106 * statx: wrapper function of statx
108 * Returns: It returns status of statx syscall
110 static inline int statx(int dirfd, const char *pathname, unsigned int flags, in statx() function
111 unsigned int mask, struct statx *statxbu in statx()
[all...]
/third_party/rust/crates/rustix/tests/fs/
H A Dstatx.rs13 // It's also ok to pass such flags to `statx`. in test_statx_unknown_flags()
14 let result = rustix::fs::statx(&f, "Cargo.toml", AtFlags::empty(), too_many_flags).unwrap(); in test_statx_unknown_flags()
18 // extend of rustix's statx buffer. So make sure we didn't get extra in test_statx_unknown_flags()
30 // value but `statx` should reliably fail with `INVAL`. in test_statx_reserved()
33 match rustix::fs::statx(&f, "Cargo.toml", AtFlags::empty(), reserved) { in test_statx_reserved()
34 Ok(_) => panic!("statx succeeded with `STATX__RESERVED`"), in test_statx_reserved()
H A Dmain.rs49 mod statx; modules
/third_party/rust/crates/rustix/src/fs/
H A Dstatx.rs1 //! Linux `statx`.
11 /// `statx(dirfd, path, flags, mask, statxbuf)`
13 /// This function returns [`io::Errno::NOSYS`] if `statx` is not available on
21 /// [Linux]: https://man7.org/linux/man-pages/man2/statx.2.html
23 pub fn statx<P: path::Arg, Fd: AsFd>( in statx() functions
32 // Linux kernel prior to 4.11 old versions of Docker don't support `statx`. We
50 _ => backend::fs::syscalls::statx(dirfd, path, flags, mask), in _statx()
54 /// The first `statx` call. We don't know if `statx` is available yet.
61 match backend::fs::syscalls::statx(dirf in statx_init()
[all...]
H A Dmod.rs59 mod statx; modules
213 pub use statx::{statx, Statx, StatxFlags, StatxTimestamp};
/third_party/musl/include/sys/
H A Dstat.h130 struct statx { struct
154 int statx(int, const char *__restrict, int, unsigned, struct statx *__restrict);
/third_party/musl/src/linux/
H A Dstatx.c9 int statx(int dirfd, const char *restrict path, int flags, unsigned mask, struct statx *restrict stx) in statx() function
/third_party/musl/src/stat/
H A Dfstatat.c10 struct statx { struct
37 struct statx stx; in fstatat_statx()
/third_party/musl/porting/liteos_a/kernel/include/bits/
H A Dstat.h33 struct statx { struct
/third_party/rust/crates/rustix/src/backend/linux_raw/fs/
H A Dsyscalls.rs38 __kernel_fsid_t, __kernel_timespec, open_how, statx, AT_EACCESS, AT_FDCWD, AT_REMOVEDIR,
414 match statx(fd, cstr!(""), AtFlags::EMPTY_PATH, StatxFlags::BASIC_STATS) {
450 match statx(
509 match statx(dirfd, filename, flags, StatxFlags::BASIC_STATS) {
563 match statx(
618 /// Convert from a Linux `statx` value to rustix's `Stat`.
718 pub(crate) fn statx(
723 ) -> io::Result<statx> {
724 // If a future Linux kernel adds more fields to `struct statx` and users
743 let mut statx_buf = MaybeUninit::<statx>
[all...]
H A Dtypes.rs416 /// `STATX_*` constants for use with [`statx`].
418 /// [`statx`]: crate::fs::statx
546 // friends, so we use our own struct, populated from `statx` where possible, to
604 /// `struct statx` for use with [`statx`].
606 /// [`statx`]: crate::fs::statx
607 pub type Statx = linux_raw_sys::general::statx;
/third_party/rust/crates/rustix/src/backend/libc/fs/
H A Dsyscalls.rs404 // `statx`.
410 match statx(dirfd, path, flags, StatxFlags::BASIC_STATS) {
960 // `statx`.
966 match statx(fd, cstr!(""), AtFlags::EMPTY_PATH, StatxFlags::BASIC_STATS) {
1328 /// Convert from a Linux `statx` value to rustix's `Stat`.
1366 /// Convert from a Linux `statx` value to rustix's `Stat`.
1498 pub(super) fn statx(
1510 pub(crate) fn statx(
1516 // If a future Linux kernel adds more fields to `struct statx` and users
1540 ret(sys::statx(
[all...]
H A Dtypes.rs583 /// `STATX_*` constants for use with [`statx`].
585 /// [`statx`]: crate::fs::statx
639 /// `STATX_*` constants for use with [`statx`].
641 /// [`statx`]: crate::fs::statx
902 // we use our own struct, populated from `statx` where possible, to avoid the
987 /// `struct statx` for use with [`statx`].
989 /// [`statx`]
[all...]

Completed in 13 milliseconds

12