Home
last modified time | relevance | path

Searched refs:TEST_FILE (Results 1 – 25 of 71) sorted by relevance

123

/external/ltp/testcases/kernel/syscalls/name_to_handle_at/
Dname_to_handle_at01.c21 #define TEST_FILE "test_file" macro
33 {&dir_fd, TEST_FILE, 0, O_RDWR},
34 {&dir_fd, TEST_FILE, 0, O_RDONLY},
35 {&dir_fd, TEST_FILE, 0, O_WRONLY},
36 {&dir_fd, TEST_FILE, AT_EMPTY_PATH, O_RDWR},
37 {&dir_fd, TEST_FILE, AT_EMPTY_PATH, O_RDONLY},
38 {&dir_fd, TEST_FILE, AT_EMPTY_PATH, O_WRONLY},
39 {&dir_fd, TEST_FILE, AT_SYMLINK_FOLLOW, O_RDWR},
40 {&dir_fd, TEST_FILE, AT_SYMLINK_FOLLOW, O_RDONLY},
41 {&dir_fd, TEST_FILE, AT_SYMLINK_FOLLOW, O_WRONLY},
[all …]
/external/ltp/testcases/kernel/syscalls/utimensat/
Dutimensat01.c25 #define TEST_FILE MNTPOINT"/test_file" macro
56 {AT_FDCWD, TEST_FILE, NULL, 0, O_RDONLY, 0, 0400, 0},
57 {AT_FDCWD, TEST_FILE, &tnn, 0, O_RDONLY, 0, 0400, 0},
58 {AT_FDCWD, TEST_FILE, &too, 0, O_RDONLY, 0, 0400, 0},
59 {AT_FDCWD, TEST_FILE, &tno, 0, O_RDONLY, 0, 0400, 0},
60 {AT_FDCWD, TEST_FILE, &ton, 0, O_RDONLY, 0, 0400, 0},
61 {AT_FDCWD, TEST_FILE, &t11, 0, O_RDONLY, 0, 0400, 0},
64 {AT_FDCWD, TEST_FILE, NULL, 0, O_RDONLY, 0, 0666, 0},
65 {AT_FDCWD, TEST_FILE, &tnn, 0, O_RDONLY, 0, 0666, 0},
66 {AT_FDCWD, TEST_FILE, &too, 0, O_RDONLY, 0, 0666, 0},
[all …]
/external/ltp/testcases/kernel/syscalls/openat2/
Dopenat201.c10 #define TEST_FILE "test_file" macro
27 {&dir_fd, TEST_FILE, O_RDWR, S_IRWXU, 0, &how, sizeof(*how)},
28 {&dir_fd, TEST_FILE, O_RDONLY, S_IRUSR, 0, &how, sizeof(*how)},
29 {&dir_fd, TEST_FILE, O_WRONLY, S_IWUSR, 0, &how, sizeof(*how)},
30 {&dir_fd, TEST_FILE, O_RDWR, S_IRWXU, RESOLVE_NO_XDEV, &how, sizeof(*how)},
31 {&dir_fd, TEST_FILE, O_RDWR, S_IRWXU, RESOLVE_NO_MAGICLINKS, &how, sizeof(*how)},
32 {&dir_fd, TEST_FILE, O_RDWR, S_IRWXU, RESOLVE_NO_SYMLINKS, &how, sizeof(*how)},
33 {&dir_fd, TEST_FILE, O_RDWR, S_IRWXU, RESOLVE_BENEATH, &how, sizeof(*how)},
34 {&dir_fd, TEST_FILE, O_RDWR, S_IRWXU, RESOLVE_IN_ROOT, &how, sizeof(*how)},
35 {&fd_atcwd, TEST_FILE, O_RDWR, S_IRWXU, 0, &how, sizeof(*how)},
[all …]
Dopenat203.c10 #define TEST_FILE "test_file" macro
26 {"invalid-dfd", -1, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, 0, &how, sizeof(*how), EBADF},
28 {"invalid-flags", AT_FDCWD, TEST_FILE, O_RDONLY, S_IWUSR, 0, &how, sizeof(*how), EINVAL},
29 {"invalid-mode", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, -1, 0, &how, sizeof(*how), EINVAL},
30 …{"invalid-resolve", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, -1, &how, sizeof(*how), EINVAL…
31 {"invalid-size-zero", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, 0, &how, 0, EINVAL},
32 …{"invalid-size-small", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, 0, &how, sizeof(*how) - 1, …
33 …{"invalid-size-big", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, 0, &how, sizeof(*how) + 1, EF…
34 …{"invalid-size-big-with-pad", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, 0, (struct open_how …
/external/ltp/testcases/kernel/syscalls/fanotify/
Dfanotify23.c34 #define TEST_FILE MOUNT_PATH "/testfile" macro
101 AT_FDCWD, TEST_FILE); in test_fanotify()
104 AT_FDCWD, TEST_FILE); in test_fanotify()
108 AT_FDCWD, TEST_FILE); in test_fanotify()
120 AT_FDCWD, TEST_FILE); in test_fanotify()
121 verify_mark_removed(TEST_FILE, "after empty mask"); in test_fanotify()
133 SAFE_CHMOD(TEST_FILE, 0600); in test_fanotify()
146 FAN_ATTRIB, AT_FDCWD, TEST_FILE); in test_fanotify()
149 SAFE_CHMOD(TEST_FILE, 0600); in test_fanotify()
165 fsync_file(TEST_FILE); in test_fanotify()
[all …]
Dfanotify19.c39 #define TEST_FILE MOUNT_PATH "/testfile" macro
108 fd = SAFE_OPEN(TEST_FILE, O_RDWR); in generate_events()
114 SAFE_WRITE(SAFE_WRITE_ALL, fd, TEST_FILE, 1); in generate_events()
173 AT_FDCWD, TEST_FILE) < 0) { in test_fanotify()
179 TEST_FILE); in test_fanotify()
265 SAFE_FILE_PRINTF(TEST_FILE, "1"); in setup()
266 SAFE_CHMOD(TEST_FILE, 0666); in setup()
269 REQUIRE_FANOTIFY_INIT_FLAGS_SUPPORTED_ON_FS(FAN_REPORT_FID, TEST_FILE); in setup()
Dfanotify18.c43 #define TEST_FILE MOUNT_PATH "/testfile" macro
129 TEST_FILE) < 0) { in test_fanotify()
147 TEST_FILE); in test_fanotify()
163 SAFE_TOUCH(TEST_FILE, 0666, NULL); in setup()
166 REQUIRE_FANOTIFY_INIT_FLAGS_SUPPORTED_ON_FS(FAN_REPORT_FID, TEST_FILE); in setup()
/external/ltp/testcases/kernel/syscalls/readlinkat/
Dreadlinkat01.c50 #define TEST_FILE "readlink_file" macro
61 {&dir_fd, TEST_SYMLINK, TEST_FILE, sizeof(TEST_FILE)-1, 0},
62 {&dir_fd, abspath, TEST_FILE, sizeof(TEST_FILE)-1, 0},
65 {&fd_atcwd, TEST_SYMLINK, TEST_FILE, sizeof(TEST_FILE)-1, 0},
127 fd = SAFE_OPEN(cleanup, TEST_FILE, O_CREAT, 0600); in setup()
128 SAFE_SYMLINK(cleanup, TEST_FILE, TEST_SYMLINK); in setup()
/external/zstd/zlibWrapper/
DMakefile19 TEST_FILE = ../doc/zstd_compression_format.md macro
54 ./fitblk 10240 <$(TEST_FILE)
55 ./fitblk 40960 <$(TEST_FILE)
56 ./fitblk_zstd 10240 <$(TEST_FILE)
57 ./fitblk_zstd 40960 <$(TEST_FILE)
66 ./zwrapbench -qi1b3B1K $(TEST_FILE)
75 $(VALGRIND) ./fitblk 10240 <$(TEST_FILE)
76 $(VALGRIND) ./fitblk 40960 <$(TEST_FILE)
77 $(VALGRIND) ./fitblk_zstd 10240 <$(TEST_FILE)
78 $(VALGRIND) ./fitblk_zstd 40960 <$(TEST_FILE)
[all …]
/external/ltp/testcases/kernel/syscalls/openat/
Dopenat01.c37 #define TEST_FILE "test_file" macro
51 {&dir_fd, TEST_FILE, 0, 0},
53 {&fd, TEST_FILE, -1, ENOTDIR},
54 {&fd_invalid, TEST_FILE, -1, EBADF},
55 {&fd_atcwd, TEST_DIR TEST_FILE, 0, 0}
85 fd = SAFE_OPEN(TEST_DIR TEST_FILE, O_CREAT | O_RDWR, 0600); in setup()
87 snprintf(glob_path, sizeof(glob_path), "%s/" TEST_DIR TEST_FILE, buf); in setup()
Dopenat02.c55 #define TEST_FILE "test_file" macro
111 SAFE_FILE_PRINTF(cleanup, TEST_FILE, "test file"); in setup()
113 SAFE_SYMLINK(cleanup, TEST_FILE, SFILE); in setup()
120 SAFE_FILE_PRINTF(cleanup, TEST_FILE, "test file"); in testfunc_append()
122 TEST(openat(AT_FDCWD, TEST_FILE, O_APPEND | O_RDWR, 0777)); in testfunc_append()
147 TEST(openat(AT_FDCWD, TEST_FILE, O_CLOEXEC | O_RDWR, 0777)); in testfunc_cloexec()
228 SAFE_STAT(cleanup, TEST_FILE, &file_stat); in testfunc_noatime()
232 TEST(openat(AT_FDCWD, TEST_FILE, O_NOATIME | O_RDONLY, 0777)); in testfunc_noatime()
243 SAFE_STAT(cleanup, TEST_FILE, &file_newstat); in testfunc_noatime()
267 TEST(openat(AT_FDCWD, TEST_FILE, O_TRUNC | O_RDWR, 0777)); in testfunc_trunc()
/external/vboot_reference/tests/
Dgen_test_cases.sh12 TEST_FILE=${TESTCASE_DIR}/test_file
24 openssl dgst -${hashalgo} -binary ${TEST_FILE} > \
25 ${TEST_FILE}.${hashalgo}.digest
27 ${TEST_FILE} | openssl rsautl \
29 > ${TEST_FILE}.rsa${keylen}_${hashalgo}.sig
38 dd if=/dev/urandom of=${TEST_FILE} bs=${TEST_FILE_SIZE} count=1
/external/ltp/testcases/kernel/syscalls/open/
Dopen12.c36 #define TEST_FILE MNTPOINT"/test_file" macro
108 SAFE_FILE_PRINTF(cleanup, TEST_FILE, TEST_FILE); in setup()
115 TEST(open(TEST_FILE, O_RDWR | O_APPEND, 0777)); in test_append()
123 SAFE_WRITE(cleanup, SAFE_WRITE_ALL, TEST_RETURN, TEST_FILE, in test_append()
124 sizeof(TEST_FILE)); in test_append()
146 SAFE_STAT(cleanup, TEST_FILE, &old_stat); in test_noatime()
150 TEST(open(TEST_FILE, O_RDONLY | O_NOATIME, 0777)); in test_noatime()
158 SAFE_STAT(cleanup, TEST_FILE, &new_stat); in test_noatime()
172 TEST(open(TEST_FILE, O_RDWR | O_APPEND | O_CLOEXEC, 0777)); in test_cloexec()
/external/ltp/testcases/kernel/syscalls/renameat2/
Drenameat201.c45 #define TEST_FILE "test_file" macro
64 {&olddirfd, TEST_FILE, &newdirfd, TEST_FILE2, RENAME_NOREPLACE, EEXIST},
65 {&olddirfd, TEST_FILE, &newdirfd, TEST_FILE2, RENAME_EXCHANGE, 0},
66 {&olddirfd, TEST_FILE, &newdirfd, NON_EXIST, RENAME_EXCHANGE, ENOENT},
67 {&olddirfd, TEST_FILE, &newdirfd, TEST_FILE3, RENAME_NOREPLACE, 0},
68 {&olddirfd, TEST_FILE, &newdirfd, TEST_FILE2, RENAME_NOREPLACE
70 {&olddirfd, TEST_FILE, &newdirfd, TEST_FILE2, RENAME_WHITEOUT
115 SAFE_TOUCH(cleanup, TEST_DIR TEST_FILE, 0600, NULL); in setup()
Drenameat202.c34 #define TEST_FILE "test_file" macro
67 TEST(renameat2(olddirfd, TEST_FILE, in main()
93 SAFE_TOUCH(cleanup, TEST_DIR TEST_FILE, 0600, NULL); in setup()
99 SAFE_FILE_PRINTF(cleanup, TEST_DIR TEST_FILE, "%s", content); in setup()
138 emptyfile = TEST_DIR TEST_FILE; in renameat2_verify()
142 contentfile = TEST_DIR TEST_FILE; in renameat2_verify()
/external/ltp/testcases/kernel/syscalls/getxattr/
Dgetxattr04.c38 #define TEST_FILE MNTPOINT "/file" macro
56 res = getxattr(TEST_FILE, TRUSTED_SMALL, NULL, 0); in loop_getxattr()
86 SAFE_SETXATTR(TEST_FILE, TRUSTED_BIG, big_value, in verify_getxattr()
88 SAFE_REMOVEXATTR(TEST_FILE, TRUSTED_BIG); in verify_getxattr()
99 SAFE_TOUCH(TEST_FILE, 0644, NULL); in setup()
104 SAFE_SETXATTR(TEST_FILE, TRUSTED_SMALL, small_value, in setup()
Dgetxattr05.c38 #define TEST_FILE "testfile" macro
63 res1 = SAFE_GETXATTR(TEST_FILE, "system.posix_acl_access", in verify_getxattr()
65 res2 = SAFE_GETXATTR(TEST_FILE, "system.posix_acl_access", in verify_getxattr()
135 SAFE_TOUCH(TEST_FILE, 0644, NULL); in setup()
141 res = acl_set_file(TEST_FILE, ACL_TYPE_ACCESS, acl); in setup()
146 tst_brk(TBROK | TERRNO, "acl_set_file(%s) failed", TEST_FILE); in setup()
/external/ltp/testcases/kernel/syscalls/open_by_handle_at/
Dopen_by_handle_at01.c21 #define TEST_FILE "test_file" macro
57 SAFE_TOUCH(TEST_FILE, 0600, NULL); in setup()
60 f_fhp = allocate_file_handle(AT_FDCWD, TEST_FILE); in setup()
61 d_fhp = allocate_file_handle(AT_FDCWD, TEST_FILE); in setup()
62 at_fhp = allocate_file_handle(AT_FDCWD, TEST_FILE); in setup()
70 TEST(name_to_handle_at(dir_fd, TEST_FILE, d_fhp, &mount_id, in setup()
77 TEST(name_to_handle_at(AT_FDCWD, TEST_FILE, at_fhp, &mount_id, in setup()
Dopen_by_handle_at02.c16 #define TEST_FILE "test_file" macro
48 SAFE_TOUCH(TEST_FILE, 0600, NULL); in setup()
49 SAFE_SYMLINK(TEST_FILE, FOO_SYMLINK); in setup()
53 valid_fhp = allocate_file_handle(AT_FDCWD, TEST_FILE); in setup()
57 TEST(name_to_handle_at(AT_FDCWD, TEST_FILE, valid_fhp, &mount_id, 0)); in setup()
/external/ltp/testcases/kernel/syscalls/fcntl/
Dfcntl39.c23 #define TEST_FILE "test_file" macro
75 SAFE_RENAME(TEST_FILE, TEST_DIR "/" TEST_FILE); in verify_dnotify()
105 SAFE_RENAME(TEST_DIR2 "/" TEST_FILE, TEST_FILE); in verify_dnotify()
114 SAFE_TOUCH(TEST_FILE, 0666, NULL); in setup()
/external/ltp/testcases/kernel/security/integrity/ima/tests/
Dima_measurements.sh17 TEST_FILE="$PWD/test.txt"
55 ROD echo "$(cat /proc/uptime) this is a test file" \> $TEST_FILE
56 ima_check $TEST_FILE
64 ROD echo "$(cat /proc/uptime) modified file" \> $TEST_FILE
65 ima_check $TEST_FILE
/external/linux-kselftest/tools/testing/selftests/sysctl/
Dsysctl.sh23 TEST_FILE=$(mktemp)
213 rm -f "${TEST_FILE}"
228 echo "${TEST_STR}" > "${TEST_FILE}"
229 if ! verify "${TEST_FILE}"; then
268 dd if="${TEST_FILE}" of="${TARGET}" bs=4096 2>/dev/null
278 dd if="${TEST_FILE}" of="${TARGET}" bs=1 seek=1 skip=1 2>/dev/null
288 dd if="${TEST_FILE}" of="${TARGET}" bs=20 seek=2 2>/dev/null
554 dd if="${TEST_FILE}" of="${TARGET}" bs=1 2>/dev/null
564 dd if="${TEST_FILE}" of="${TARGET}" bs=1 seek=1 2>/dev/null
660 TEST_FILE=$(mktemp)
[all …]
/external/ltp/testcases/kernel/security/dirtyc0w_shmem/
Ddirtyc0w_shmem.c27 #define TEST_FILE TMP_DIR"/testfile" macro
65 SAFE_FILE_PRINTF(TEST_FILE, STR); in dirtyc0w_shmem_test()
66 SAFE_CHMOD(TEST_FILE, 0444); in dirtyc0w_shmem_test()
81 SAFE_FILE_SCANF(TEST_FILE, "%c", &c); in dirtyc0w_shmem_test()
92 SAFE_UNLINK(TEST_FILE); in dirtyc0w_shmem_test()
/external/ltp/testcases/kernel/syscalls/statx/
Dstatx06.c34 #define TEST_FILE MOUNT_POINT"/test_file.txt" macro
61 SAFE_UNLINK(TEST_FILE); in create_file()
63 fd = SAFE_OPEN(TEST_FILE, O_CREAT | O_RDWR, 0666); in create_file()
82 SAFE_CHMOD(TEST_FILE, 0777); in change_mode()
114 TEST(statx(AT_FDCWD, TEST_FILE, 0, STATX_ALL, &buff)); in test_statx()
118 TEST_FILE); in test_statx()
/external/ltp/testcases/kernel/mem/mmapstress/
Dmmapstress04.c18 #define TEST_FILE "mmapstress04-testfile" macro
41 if (tst_fill_file(TEST_FILE, 'b', page_size, 1)) in mmapstress04()
44 rofd = SAFE_OPEN(TEST_FILE, O_RDONLY | O_CREAT, 0777); in mmapstress04()
73 rwfd = SAFE_OPEN(TEST_FILE, O_RDWR); in mmapstress04()
96 SAFE_UNLINK(TEST_FILE); in mmapstress04()

123