Home
last modified time | relevance | path

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

12345678910>>...17

/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/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/testing/selftests/damon/
Ddebugfs_target_ids.sh9 file="$DBGFS/target_ids"
10 orig_content=$(cat "$file")
12 test_write_succ "$file" "1 2 3 4" "$orig_content" "valid input"
13 test_write_succ "$file" "1 2 abc 4" "$orig_content" "still valid input"
14 test_content "$file" "$orig_content" "1 2" "non-integer was there"
15 test_write_succ "$file" "abc 2 3" "$orig_content" "the file allows wrong input"
16 test_content "$file" "$orig_content" "" "wrong input written"
17 test_write_succ "$file" "" "$orig_content" "empty input"
18 test_content "$file" "$orig_content" "" "empty input written"
19 echo "$orig_content" > "$file"
Ddebugfs_schemes.sh9 file="$DBGFS/schemes"
10 orig_content=$(cat "$file")
12 test_write_succ "$file" "1 2 3 4 5 6 4 0 0 0 1 2 3 1 100 3 2 1" \
14 test_write_fail "$file" "1 2
16 test_write_succ "$file" "" "$orig_content" "disabling"
17 test_write_fail "$file" "2 1 2 1 10 1 3 10 1 1 1 1 1 1 1 1 2 3" \
19 echo "$orig_content" > "$file"
Ddebugfs_attrs.sh9 file="$DBGFS/attrs"
10 orig_content=$(cat "$file")
12 test_write_succ "$file" "1 2 3 4 5" "$orig_content" "valid input"
13 test_write_fail "$file" "1 2 3 4" "$orig_content" "no enough fields"
14 test_write_fail "$file" "1 2 3 5 4" "$orig_content" \
16 test_content "$file" "$orig_content" "1 2 3 4 5" "successfully written"
17 echo "$orig_content" > "$file"
D_debugfs_common.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"
/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 struct instruction *next_insn_same_sec(struct objtool_file *file, in next_insn_same_sec() argument
54 return find_insn(file, insn->sec, insn->offset + insn->len); in next_insn_same_sec()
63 static struct instruction *next_insn_same_func(struct objtool_file *file, in next_insn_same_func() argument
66 struct instruction *next = next_insn_same_sec(file, insn); in next_insn_same_func()
80 return find_insn(file, func->cfunc->sec, func->cfunc->offset); in next_insn_same_func()
83 static struct instruction *prev_insn_same_sec(struct objtool_file *file, in prev_insn_same_sec() argument
88 return find_insn(file, insn->sec, insn->offset - insn->prev_len); in prev_insn_same_sec()
95 static struct instruction *prev_insn_same_sym(struct objtool_file *file, in prev_insn_same_sym() argument
[all …]
Dobjtool.c22 static struct objtool_file file; variable
89 return &file; in objtool_open_read()
93 file.elf = elf_open_read(objname, O_RDWR); in objtool_open_read()
94 if (!file.elf) in objtool_open_read()
102 hash_init(file.insn_hash); in objtool_open_read()
103 INIT_LIST_HEAD(&file.retpoline_call_list); in objtool_open_read()
104 INIT_LIST_HEAD(&file.return_thunk_list); in objtool_open_read()
105 INIT_LIST_HEAD(&file.static_call_list); in objtool_open_read()
106 INIT_LIST_HEAD(&file.mcount_loc_list); in objtool_open_read()
107 INIT_LIST_HEAD(&file.endbr_list); in objtool_open_read()
[all …]
/tools/perf/util/
Ddata.c49 struct perf_data_file *file = &files[i]; in perf_data__create_dir() local
51 ret = asprintf(&file->path, "%s/data.%d", data->path, i); in perf_data__create_dir()
57 ret = open(file->path, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR); in perf_data__create_dir()
63 file->fd = ret; in perf_data__create_dir()
103 struct perf_data_file *file; in perf_data__open_dir() local
116 file = realloc(files, (nr + 1) * sizeof(*files)); in perf_data__open_dir()
117 if (!file) in perf_data__open_dir()
120 files = file; in perf_data__open_dir()
121 file = &files[nr++]; in perf_data__open_dir()
123 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/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/testing/selftests/filesystems/incfs/
Dincfs_test.c62 int file; member
190 if (options.file) in get_test_files_set()
192 .files = files + options.file - 1, in get_test_files_set()
222 static int get_file_block_seed(int file, int block) in get_file_block_seed() argument
224 return 7919 * file + block; in get_file_block_seed()
386 static int emit_test_blocks(const char *mnt_dir, struct test_file *file, in emit_test_blocks() argument
410 bool compress_zstd = (file->index + block_index) % 4 == 2; in emit_test_blocks()
411 bool compress_lz4 = (file->index + block_index) % 4 == 0; in emit_test_blocks()
412 int seed = get_file_block_seed(file->index, block_index); in emit_test_blocks()
417 if (block_offset > file->size) { in emit_test_blocks()
[all …]
/tools/testing/selftests/bpf/progs/
Dima.c26 static void ima_test_common(struct file *file) in ima_test_common() argument
36 ret = bpf_ima_inode_hash(file->f_inode, &ima_hash, in ima_test_common()
39 ret = bpf_ima_file_hash(file, &ima_hash, in ima_test_common()
69 ima_test_common(bprm->file); in BPF_PROG()
78 ima_test_common(bprm->file); in BPF_PROG()
83 int BPF_PROG(kernel_read_file, struct file *file, enum kernel_read_file_id id, in BPF_PROG() argument
101 ima_test_common(file); in BPF_PROG()
Dtest_module_attach.c58 struct file *file, struct kobject *kobj, in BPF_PROG() argument
69 struct file *file, struct kobject *kobj, in BPF_PROG() argument
81 struct file *file, struct kobject *kobj, in BPF_PROG() argument
91 int BPF_PROG(handle_fexit_ret, int arg, struct file *ret) in BPF_PROG()
106 struct file *file, struct kobject *kobj, in BPF_PROG() argument
Dbpf_iter_task_vma.c31 struct file *file; in proc_maps() local
37 file = vma->vm_file; in proc_maps()
49 if (file) { in proc_maps()
50 __u32 dev = file->f_inode->i_sb->s_dev; in proc_maps()
52 bpf_d_path(&file->f_path, d_path_buf, D_PATH_BUF_SIZE); in proc_maps()
56 file->f_inode->i_ino); in proc_maps()
/tools/lib/api/fs/
Dtracing_path.c70 char *file; in get_tracing_file() local
72 if (asprintf(&file, "%s/%s", tracing_path_mount(), name) < 0) in get_tracing_file()
75 return file; in get_tracing_file()
78 void put_tracing_file(char *file) in put_tracing_file() argument
80 free(file); in put_tracing_file()
85 char *file; in get_events_file() local
87 if (asprintf(&file, "%s/events/%s", tracing_path_mount(), name) < 0) in get_events_file()
90 return file; in get_events_file()
93 void put_events_file(char *file) in put_events_file() argument
95 free(file); in put_events_file()
/tools/testing/selftests/mm/
Dmlock2.h19 FILE *file; in seek_to_smaps_entry() local
29 file = fopen("/proc/self/smaps", "r"); in seek_to_smaps_entry()
30 if (!file) { in seek_to_smaps_entry()
35 while (getline(&line, &size, file) > 0) { in seek_to_smaps_entry()
49 fclose(file); in seek_to_smaps_entry()
50 file = NULL; in seek_to_smaps_entry()
54 return file; in seek_to_smaps_entry()
/tools/perf/tests/shell/
Dbuildid.sh41 ex_pe=$(dirname $0)/../pe-file.exe
79 file=${build_id_dir}/.build-id/$id_dir/`readlink ${link}`/elf
80 echo "file: ${file}"
86 if [ -x $1 ] && [ ! -x $file ]; then
87 echo "failed: file ${file} executable does not exist"
91 if [ ! -x $file ] && [ ! -e $file ]; then
92 echo "failed: file ${file} does not exist"
95 elif [ ! -x $file ]; then
96 echo "failed: file ${file} does not exist"
100 diff ${file} ${1}
[all …]
Dstat+json_output.sh50 $PYTHON $pythonchecker --no-args --file "${stat_output}"
63 $PYTHON $pythonchecker --system-wide --file "${stat_output}"
76 $PYTHON $pythonchecker --system-wide-no-aggr --file "${stat_output}"
84 $PYTHON $pythonchecker --interval --file "${stat_output}"
93 $PYTHON $pythonchecker --event --file "${stat_output}"
106 $PYTHON $pythonchecker --per-core --file "${stat_output}"
119 $PYTHON $pythonchecker --per-thread --file "${stat_output}"
144 $PYTHON $pythonchecker --per-die --file "${stat_output}"
157 $PYTHON $pythonchecker --per-node --file "${stat_output}"
170 $PYTHON $pythonchecker --per-socket --file "${stat_output}"
/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/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 err = read_ulong(file, &cpu_dscr, 16); in check_cpu_dscr_default()
34 char file[LEN_MAX]; in check_all_cpu_dscr_defaults() local
52 len = snprintf(file, LEN_MAX, "%s%s/dscr", CPU_PATH, dp->d_name); in check_all_cpu_dscr_defaults()
55 if (access(file, F_OK)) in check_all_cpu_dscr_defaults()
58 if (check_cpu_dscr_default(file, val)) { in check_all_cpu_dscr_defaults()

12345678910>>...17