/tools/testing/selftests/efivarfs/ |
D | efivarfs.sh | 56 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/ |
D | debugfs_attrs.sh | 5 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/ |
D | parse-console.sh | 15 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/perf/util/ |
D | data.c | 48 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/ |
D | apfiles.c | 67 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/ |
D | non-regular.c | 36 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/ |
D | objtool.c | 45 static struct objtool_file file; variable 54 return &file; in objtool_open_read() 58 file.elf = elf_open_read(objname, O_RDWR); in objtool_open_read() 59 if (!file.elf) in objtool_open_read() 62 INIT_LIST_HEAD(&file.insn_list); in objtool_open_read() 63 hash_init(file.insn_hash); in objtool_open_read() 64 INIT_LIST_HEAD(&file.retpoline_call_list); in objtool_open_read() 65 INIT_LIST_HEAD(&file.return_thunk_list); in objtool_open_read() 66 INIT_LIST_HEAD(&file.static_call_list); in objtool_open_read() 67 INIT_LIST_HEAD(&file.mcount_loc_list); in objtool_open_read() [all …]
|
D | check.c | 36 struct instruction *find_insn(struct objtool_file *file, in find_insn() argument 41 hash_for_each_possible(file->insn_hash, insn, hash, sec_offset_hash(sec, offset)) { in find_insn() 49 static struct instruction *next_insn_same_sec(struct objtool_file *file, in next_insn_same_sec() argument 54 if (!next || &next->list == &file->insn_list || next->sec != insn->sec) in next_insn_same_sec() 60 static struct instruction *next_insn_same_func(struct objtool_file *file, in next_insn_same_func() argument 69 if (&next->list != &file->insn_list && next->func == func) in next_insn_same_func() 77 return find_insn(file, func->cfunc->sec, func->cfunc->offset); in next_insn_same_func() 80 static struct instruction *prev_insn_same_sym(struct objtool_file *file, in prev_insn_same_sym() argument 85 if (&prev->list != &file->insn_list && prev->func == insn->func) in prev_insn_same_sym() 91 #define func_for_each_insn(file, func, insn) \ argument [all …]
|
D | builtin-orc.c | 34 struct objtool_file *file; in cmd_orc() local 43 file = objtool_open_read(objname); in cmd_orc() 44 if (!file) in cmd_orc() 47 ret = check(file); in cmd_orc() 51 if (list_empty(&file->insn_list)) in cmd_orc() 54 ret = orc_create(file); in cmd_orc() 58 if (!file->elf->changed) in cmd_orc() 61 return elf_write(file->elf); in cmd_orc()
|
D | builtin-check.c | 50 struct objtool_file *file; in cmd_check() local 60 file = objtool_open_read(objname); in cmd_check() 61 if (!file) in cmd_check() 64 ret = check(file); in cmd_check() 68 if (file->elf->changed) in cmd_check() 69 return elf_write(file->elf); in cmd_check()
|
/tools/testing/selftests/cpufreq/ |
D | cpufreq.sh | 52 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/ |
D | incfs_test.c | 62 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/lib/api/fs/ |
D | tracing_path.c | 75 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/ |
D | mlock2.h | 27 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/kunit/ |
D | kunit_tool_test.py | 103 file = open(log_path) 104 result = kunit_parser.isolate_kunit_output(file.readlines()) 111 file.close() 116 with open(log_path) as file: 117 result = kunit_parser.isolate_kunit_output(file.readlines()) 146 file = open(all_passed_log) 147 result = kunit_parser.parse_run_tests(file.readlines()) 151 file.close() 156 file = open(failed_log) 157 result = kunit_parser.parse_run_tests(file.readlines()) [all …]
|
/tools/power/acpi/common/ |
D | cmfsize.c | 29 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/bpf/progs/ |
D | bpf_iter_task_file.c | 18 struct file *file = ctx->file; in dump_task_file() local 20 if (task == (void *)0 || file == (void *)0) in dump_task_file() 32 (long)file->f_op); in dump_task_file()
|
/tools/perf/pmu-events/arch/powerpc/ |
D | mapfile.csv | 2 # 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/bpf/prog_tests/ |
D | test_global_funcs.c | 31 static int check_load(const char *file) in check_load() argument 38 attr.file = file; in check_load() 49 const char *file; member 73 if (!test__start_subtest(test->file)) in test_test_global_funcs() 77 err = check_load(test->file); in test_test_global_funcs()
|
D | bpf_verif_scale.c | 20 static int check_load(const char *file, enum bpf_prog_type type) in check_load() argument 27 attr.file = file; in check_load() 37 const char *file; member 110 if (!test__start_subtest(test->file)) in test_bpf_verif_scale() 113 err = check_load(test->file, test->attach_type); in test_bpf_verif_scale()
|
/tools/testing/selftests/powerpc/dscr/ |
D | dscr_sysfs_test.c | 13 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()
|
/tools/bpf/bpftool/skeleton/ |
D | pid_iter.bpf.c | 44 struct file *file = ctx->file; in iter() local 49 if (!file || !task) in iter() 69 if (file->f_op != fops) in iter() 73 e.id = get_obj_id(file->private_data, obj_type); in iter()
|
/tools/perf/arch/arm64/util/ |
D | header.c | 30 FILE *file; in _get_cpuid() local 35 file = fopen(path, "r"); in _get_cpuid() 36 if (!file) { in _get_cpuid() 41 if (!fgets(buf, MIDR_SIZE, file)) { in _get_cpuid() 42 fclose(file); in _get_cpuid() 45 fclose(file); in _get_cpuid()
|
/tools/perf/tests/shell/ |
D | buildid.sh | 39 file=${build_id_dir}/.build-id/${id:0:2}/`readlink ${link}`/elf 40 echo "file: ${file}" 42 if [ ! -x $file ]; then 43 echo "failed: file ${file} does not exist" 47 diff ${file} ${1} 49 echo "failed: ${file} do not match"
|
D | trace+probe_vfs_getname.sh | 20 file=$(mktemp /tmp/temporary_file.XXXXX) 24 perf trace -e $evts touch $file 2>&1 | \ 25 …0-9]+\.[0-9]+ ms\): +touch\/[0-9]+ open(at)?\((dfd: +CWD, +)?filename: +${file}, +flags: CREAT\|NO… 41 rm -f ${file}
|