Home
last modified time | relevance | path

Searched refs:file (Results 1 – 25 of 394) sorted by relevance

12345678910>>...16

/tools/testing/selftests/efivarfs/
Defivarfs.sh56 local file=$efivarfs_mount/$FUNCNAME-$test_guid
58 printf "$attrs\x00" > $file
60 if [ ! -e $file ]; then
61 echo "$file couldn't be created" >&2
65 if [ $(stat -c %s $file) -ne 5 ]; then
66 echo "$file has invalid size" >&2
67 file_cleanup $file
70 file_cleanup $file
75 local file=$efivarfs_mount/$FUNCNAME-$test_guid
77 : > $file
[all …]
/tools/testing/selftests/damon/
Ddebugfs_attrs.sh5 file=$1
11 echo "$content" > "$file"
14 echo "writing $content to $file doesn't return $expected"
16 echo "$orig_content" > "$file"
30 file=$1
35 content=$(cat "$file")
38 echo "reading $file expected $expected but $content"
40 echo "$orig_content" > "$file"
50 file="$DBGFS/attrs"
51 orig_content=$(cat "$file")
[all …]
/tools/testing/selftests/rcutorture/bin/
Dparse-console.sh15 file="$1"
23 if test -f "$file" -a -r "$file"
27 echo $title unreadable console output file: $file
30 if grep -Pq '\x00' < $file
34 cat /dev/null > $file.diags
41 if grep -q FAILURE $file || grep -q -e '-torture.*!!!' $file
43 nerrs=`grep --binary-files=text '!!!' $file |
67 grep --binary-files=text 'torture:.*ver:' $file |
96 if grep -q SUCCESS $file
101 echo " " $file
[all …]
/tools/testing/ktest/examples/bootconfigs/
Dverify-functiongraph.sh6 file="$1"
8 content=`cat $file`
10 echo "FAILED: $file has '$content', expected '$val'"
16 file="$1"
18 content=`cat $file | sed -ne "/^$val/p"`
20 echo "FAILED: $file does not contain '$val'"
21 cat $file
27 file=$1
30 if ! grep -q "$val" $file ; then
31 echo "FAILED: $file does not contain $val"
[all …]
Dverify-tracing.sh6 file="$1"
8 content=`cat $file`
10 echo "FAILED: $file has '$content', expected '$val'"
16 file="$1"
18 content=`cat $file | sed -ne "/^$val/p"`
20 echo "FAILED: $file does not contain '$val'"
21 cat $file
27 file=$1
30 if ! grep -q "$val" $file ; then
31 echo "FAILED: $file does not contain $val"
[all …]
Dverify-boottrace.sh6 file="$1"
8 content=`cat $file`
10 echo "FAILED: $file has '$content', expected '$val'"
16 file="$1"
18 content=`cat $file | sed -ne "/^$val/p"`
20 echo "FAILED: $file does not contain '$val'"
21 cat $file
27 file=$1
30 if ! grep -q "$val" $file ; then
31 echo "FAILED: $file does not contain $val"
[all …]
/tools/perf/util/
Ddata.c48 struct perf_data_file *file = &files[i]; in perf_data__create_dir() local
50 ret = asprintf(&file->path, "%s/data.%d", data->path, i); in perf_data__create_dir()
54 ret = open(file->path, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR); in perf_data__create_dir()
58 file->fd = ret; in perf_data__create_dir()
98 struct perf_data_file *file; in perf_data__open_dir() local
111 file = realloc(files, (nr + 1) * sizeof(*files)); in perf_data__open_dir()
112 if (!file) in perf_data__open_dir()
115 files = file; in perf_data__open_dir()
116 file = &files[nr++]; in perf_data__open_dir()
118 file->path = strdup(path); in perf_data__open_dir()
[all …]
/tools/power/acpi/tools/acpidump/
Dapfiles.c67 ACPI_FILE file; in ap_open_output_file() local
77 file = fopen(pathname, "w"); in ap_open_output_file()
78 if (!file) { in ap_open_output_file()
85 gbl_output_file = file; in ap_open_output_file()
108 ACPI_FILE file; in ap_write_to_binary_file() local
148 file = fopen(filename, "wb"); in ap_write_to_binary_file()
149 if (!file) { in ap_write_to_binary_file()
154 actual = fwrite(table, 1, table_length, file); in ap_write_to_binary_file()
158 fclose(file); in ap_write_to_binary_file()
162 fclose(file); in ap_write_to_binary_file()
[all …]
/tools/testing/selftests/exec/
Dnon-regular.c36 FIXTURE(file) { in FIXTURE() argument
41 FIXTURE_VARIANT(file) in FIXTURE_VARIANT() argument
47 FIXTURE_DATA(file) *self, in FIXTURE_VARIANT()
48 const FIXTURE_VARIANT(file) *variant); in FIXTURE_VARIANT()
53 FIXTURE_DATA(file) *self, in setup_link()
54 const FIXTURE_VARIANT(file) *variant) in setup_link()
73 FIXTURE_VARIANT_ADD(file, S_IFLNK) in FIXTURE_VARIANT_ADD() argument
81 FIXTURE_DATA(file) *self, in setup_dir()
82 const FIXTURE_VARIANT(file) *variant) in setup_dir()
87 FIXTURE_VARIANT_ADD(file, S_IFDIR) in FIXTURE_VARIANT_ADD() argument
[all …]
/tools/objtool/
Dcheck.c37 struct instruction *find_insn(struct objtool_file *file, in find_insn() argument
42 hash_for_each_possible(file->insn_hash, insn, hash, sec_offset_hash(sec, offset)) { in find_insn()
50 static struct instruction *next_insn_same_sec(struct objtool_file *file, in next_insn_same_sec() argument
55 if (!next || &next->list == &file->insn_list || next->sec != insn->sec) in next_insn_same_sec()
61 static struct instruction *next_insn_same_func(struct objtool_file *file, in next_insn_same_func() argument
70 if (&next->list != &file->insn_list && next->func == func) in next_insn_same_func()
78 return find_insn(file, func->cfunc->sec, func->cfunc->offset); in next_insn_same_func()
81 static struct instruction *prev_insn_same_sym(struct objtool_file *file, in prev_insn_same_sym() argument
86 if (&prev->list != &file->insn_list && prev->func == insn->func) in prev_insn_same_sym()
92 #define func_for_each_insn(file, func, insn) \ argument
[all …]
Dbuiltin-orc.c34 struct objtool_file *file; in cmd_orc() local
40 file = objtool_open_read(objname); in cmd_orc()
41 if (!file) in cmd_orc()
44 ret = check(file); in cmd_orc()
48 if (list_empty(&file->insn_list)) in cmd_orc()
51 ret = orc_create(file); in cmd_orc()
55 if (!file->elf->changed) in cmd_orc()
58 return elf_write(file->elf); in cmd_orc()
Dobjtool.c46 static struct objtool_file file; variable
113 return &file; in objtool_open_read()
117 file.elf = elf_open_read(objname, O_RDWR); in objtool_open_read()
118 if (!file.elf) in objtool_open_read()
126 INIT_LIST_HEAD(&file.insn_list); in objtool_open_read()
127 hash_init(file.insn_hash); in objtool_open_read()
128 INIT_LIST_HEAD(&file.retpoline_call_list); in objtool_open_read()
129 INIT_LIST_HEAD(&file.return_thunk_list); in objtool_open_read()
130 INIT_LIST_HEAD(&file.static_call_list); in objtool_open_read()
131 INIT_LIST_HEAD(&file.mcount_loc_list); in objtool_open_read()
[all …]
/tools/testing/selftests/cpufreq/
Dcpufreq.sh52 for file in $files; do
53 if [ -f $1/$file ]; then
54 printf "$file:"
55 cat $1/$file
58 read_cpufreq_files_in_dir "$1/$file"
84 for file in $files; do
85 if [ -f $1/$file ]; then
87 local wfile=$(ls -l $1/$file | awk '$1 ~ /^.*w.*/ { print $NF; }')
92 if [ $file != "scaling_setspeed" ]; then
93 local val=$(cat $1/$file)
[all …]
/tools/perf/tests/shell/
Dpipe_test.sh11 file=$(mktemp /tmp/test.file.XXXXXX)
14 cat <<EOF | cc -o ${file} -x c -
45 if ! perf record -e task-clock:u -o - ${file} | perf report -i - --task | grep test.file; then
50 if ! perf record -e task-clock:u -o - ${file} | perf inject -b | perf report -i - | grep noploop; t…
55 perf record -e task-clock:u -o - ${file} | perf inject -b -o ${data}
61 perf record -e task-clock:u -o ${data} ${file}
68 rm -f ${file} ${data} ${data}.old
/tools/testing/selftests/filesystems/incfs/
Dincfs_test.c61 int file; member
188 if (options.file) in get_test_files_set()
190 .files = files + options.file - 1, in get_test_files_set()
220 static int get_file_block_seed(int file, int block) in get_file_block_seed() argument
222 return 7919 * file + block; in get_file_block_seed()
384 static int emit_test_blocks(const char *mnt_dir, struct test_file *file, in emit_test_blocks() argument
408 bool compress_zstd = (file->index + block_index) % 4 == 2; in emit_test_blocks()
409 bool compress_lz4 = (file->index + block_index) % 4 == 0; in emit_test_blocks()
410 int seed = get_file_block_seed(file->index, block_index); in emit_test_blocks()
415 if (block_offset > file->size) { in emit_test_blocks()
[all …]
/tools/lib/api/fs/
Dtracing_path.c75 char *file; in get_tracing_file() local
77 if (asprintf(&file, "%s/%s", tracing_path_mount(), name) < 0) in get_tracing_file()
80 return file; in get_tracing_file()
83 void put_tracing_file(char *file) in put_tracing_file() argument
85 free(file); in put_tracing_file()
90 char *file; in get_events_file() local
92 if (asprintf(&file, "%s/events/%s", tracing_path_mount(), name) < 0) in get_events_file()
95 return file; in get_events_file()
98 void put_events_file(char *file) in put_events_file() argument
100 free(file); in put_events_file()
/tools/testing/selftests/vm/
Dmlock2.h27 FILE *file; in seek_to_smaps_entry() local
37 file = fopen("/proc/self/smaps", "r"); in seek_to_smaps_entry()
38 if (!file) { in seek_to_smaps_entry()
43 while (getline(&line, &size, file) > 0) { in seek_to_smaps_entry()
57 fclose(file); in seek_to_smaps_entry()
58 file = NULL; in seek_to_smaps_entry()
62 return file; in seek_to_smaps_entry()
/tools/testing/selftests/bpf/progs/
Dtest_module_attach.c44 struct file *file, struct kobject *kobj, in BPF_PROG() argument
55 struct file *file, struct kobject *kobj, in BPF_PROG() argument
67 struct file *file, struct kobject *kobj, in BPF_PROG() argument
80 struct file *file, struct kobject *kobj, in BPF_PROG() argument
Dbpf_iter_task_vma.c29 struct file *file; in proc_maps() local
35 file = vma->vm_file; in proc_maps()
44 if (file) { in proc_maps()
45 __u32 dev = file->f_inode->i_sb->s_dev; in proc_maps()
47 bpf_d_path(&file->f_path, d_path_buf, D_PATH_BUF_SIZE); in proc_maps()
51 file->f_inode->i_ino); in proc_maps()
Dbpf_iter_task_file.c17 struct file *file = ctx->file; in dump_task_file() local
19 if (task == (void *)0 || file == (void *)0) in dump_task_file()
31 (long)file->f_op); in dump_task_file()
Dbpf_iter_bpf_sk_storage_helpers.c29 struct file *file = ctx->file; in fill_socket_owner() local
33 if (!task || !file) in fill_socket_owner()
36 sock = bpf_sock_from_file(file); in fill_socket_owner()
/tools/power/acpi/common/
Dcmfsize.c29 u32 cm_get_file_size(ACPI_FILE file) in cm_get_file_size() argument
37 current_offset = ftell(file); in cm_get_file_size()
42 status = fseek(file, 0, SEEK_END); in cm_get_file_size()
47 file_size = ftell(file); in cm_get_file_size()
54 status = fseek(file, current_offset, SEEK_SET); in cm_get_file_size()
/tools/testing/kunit/
Dkunit_tool_test.py106 with open(log_path) as file:
107 result = kunit_parser.extract_tap_lines(file.readlines())
117 with open(log_path) as file:
118 result = kunit_parser.extract_tap_lines(file.readlines())
146 with open(all_passed_log) as file:
147 result = kunit_parser.parse_run_tests(file.readlines())
154 with open(failed_log) as file:
155 result = kunit_parser.parse_run_tests(file.readlines())
162 with open(empty_log) as file:
164 kunit_parser.extract_tap_lines(file.readlines()))
[all …]
/tools/perf/pmu-events/arch/powerpc/
Dmapfile.csv2 # PVR,Version,JSON/file/pathname,Type
6 # Version could be used to track version of of JSON file
8 # JSON/file/pathname is the path to JSON file, relative
12 # Multiple PVRs could map to a single JSON file.
/tools/testing/selftests/powerpc/dscr/
Ddscr_sysfs_test.c13 static int check_cpu_dscr_default(char *file, unsigned long val) in check_cpu_dscr_default() argument
18 fd = open(file, O_RDWR); in check_cpu_dscr_default()
45 char file[LEN_MAX]; in check_all_cpu_dscr_defaults() local
63 len = snprintf(file, LEN_MAX, "%s%s/dscr", CPU_PATH, dp->d_name); in check_all_cpu_dscr_defaults()
66 if (access(file, F_OK)) in check_all_cpu_dscr_defaults()
69 if (check_cpu_dscr_default(file, val)) { in check_all_cpu_dscr_defaults()

12345678910>>...16