Home
last modified time | relevance | path

Searched refs:state (Results 1 – 25 of 252) sorted by relevance

1234567891011

/tools/testing/selftests/kvm/x86/
A Dvmx_set_nested_state_test.c68 memset(state, 0, sizeof(*state)); in set_default_state()
71 state->format = 0; in set_default_state()
72 state->size = sizeof(*state); in set_default_state()
120 state->flags = 0; in test_vmx_nested_state()
199 state->size = sizeof(*state); in test_vmx_nested_state()
204 state->size = sizeof(*state); in test_vmx_nested_state()
219 state->size = sizeof(*state); in test_vmx_nested_state()
241 TEST_ASSERT(state->size >= sizeof(*state) && state->size <= state_sz, in test_vmx_nested_state()
243 sizeof(*state), state_sz, state->size); in test_vmx_nested_state()
247 free(state); in test_vmx_nested_state()
[all …]
/tools/usb/ffs-aio-example/multibuff/host_app/
A Dtest.c65 state->found = NULL; in test_init()
66 state->ctx = NULL; in test_init()
67 state->handle = NULL; in test_init()
68 state->attached = 0; in test_init()
92 state->found = dev; in test_init()
97 if (!state->found) { in test_init()
102 ret = libusb_open(state->found, &state->handle); in test_init()
115 state->attached = 1; in test_init()
137 libusb_exit(state->ctx); in test_init()
161 if (test_init(&state)) in main()
[all …]
/tools/usb/ffs-aio-example/simple/host_app/
A Dtest.c65 state->found = NULL; in test_init()
66 state->ctx = NULL; in test_init()
67 state->handle = NULL; in test_init()
68 state->attached = 0; in test_init()
92 state->found = dev; in test_init()
97 if (!state->found) { in test_init()
102 ret = libusb_open(state->found, &state->handle); in test_init()
115 state->attached = 1; in test_init()
137 libusb_exit(state->ctx); in test_init()
161 if (test_init(&state)) in main()
[all …]
/tools/testing/selftests/net/tcp_ao/lib/
A Drepair.c75 memset(state, 0, sizeof(*state)); in __test_sock_checkpoint()
95 test_sock_checkpoint_queue(sk, TCP_SEND_QUEUE, state->outq_len, &state->out); in __test_sock_checkpoint()
99 test_sock_checkpoint_queue(sk, TCP_RECV_QUEUE, state->inq_len, &state->in); in __test_sock_checkpoint()
102 state->outq_len = state->outq_nsd_len = 0; in __test_sock_checkpoint()
120 memset(state, 0, sizeof(*state)); in test_ao_checkpoint()
178 test_sock_restore_seq(sk, TCP_RECV_QUEUE, state->in.seq - state->inq_len); in __test_sock_restore()
179 test_sock_restore_seq(sk, TCP_SEND_QUEUE, state->out.seq - state->outq_len); in __test_sock_restore()
216 test_sock_restore_queue(sk, TCP_RECV_QUEUE, state->in.buf, state->inq_len); in __test_sock_restore()
224 if (setsockopt(sk, SOL_TCP, TCP_AO_REPAIR, state, sizeof(*state))) in test_ao_restore()
230 free(state->out.buf); in test_sock_state_free()
[all …]
/tools/testing/selftests/bpf/prog_tests/
A Dprog_tests_framework.c6 static void clear_test_state(struct test_state *state) in clear_test_state() argument
8 state->error_cnt = 0; in clear_test_state()
9 state->sub_succ_cnt = 0; in clear_test_state()
10 state->skip_cnt = 0; in clear_test_state()
15 struct test_state *state = env.test_state; in test_prog_tests_framework() local
25 if (!ASSERT_EQ(state->skip_cnt, 0, "skip_cnt_check")) in test_prog_tests_framework()
27 if (!ASSERT_EQ(state->error_cnt, 0, "error_cnt_check")) in test_prog_tests_framework()
31 clear_test_state(state); in test_prog_tests_framework()
41 if (!ASSERT_EQ(state->skip_cnt, 2, "skip_cnt_check")) in test_prog_tests_framework()
45 clear_test_state(state); in test_prog_tests_framework()
[all …]
/tools/include/linux/
A Dprandom.h24 static inline void prandom_seed_state(struct rnd_state *state, u64 seed) in prandom_seed_state() argument
28 state->s1 = __seed(i, 2U); in prandom_seed_state()
29 state->s2 = __seed(i, 8U); in prandom_seed_state()
30 state->s3 = __seed(i, 16U); in prandom_seed_state()
31 state->s4 = __seed(i, 128U); in prandom_seed_state()
41 static inline u32 prandom_u32_state(struct rnd_state *state) in prandom_u32_state() argument
44 state->s1 = TAUSWORTHE(state->s1, 6U, 13U, 4294967294U, 18U); in prandom_u32_state()
45 state->s2 = TAUSWORTHE(state->s2, 2U, 27U, 4294967288U, 2U); in prandom_u32_state()
46 state->s3 = TAUSWORTHE(state->s3, 13U, 21U, 4294967280U, 7U); in prandom_u32_state()
47 state->s4 = TAUSWORTHE(state->s4, 3U, 12U, 4294967168U, 13U); in prandom_u32_state()
[all …]
/tools/perf/util/
A Dtrigger.h32 } state; member
38 t->name, t->state, __func__)
42 return t->state >= 0; in trigger_is_available()
47 return t->state <= TRIGGER_ERROR; in trigger_is_error()
53 t->state = TRIGGER_ON; in trigger_on()
60 t->state = TRIGGER_READY; in trigger_ready()
68 t->state = TRIGGER_HIT; in trigger_hit()
75 t->state = TRIGGER_OFF; in trigger_off()
80 t->state = TRIGGER_ERROR; in trigger_error()
85 return t->state == TRIGGER_READY; in trigger_is_ready()
[all …]
A Dtp_pmu.c56 ret = cb(state, sys, evt_ent->d_name); in tp_pmu__for_each_tp_event()
64 int tp_pmu__for_each_tp_sys(void *state, tp_sys_callback cb) in tp_pmu__for_each_tp_sys() argument
90 ret = cb(state, events_ent->d_name); in tp_pmu__for_each_tp_sys()
104 void *state; member
111 struct for_each_event_args *args = state; in for_each_event_cb()
149 err = args->cb(args->state, &info); in for_each_event_cb()
154 static int for_each_event_sys_cb(void *state, const char *sys_name) in for_each_event_sys_cb() argument
162 .state = state, in tp_pmu__for_each_event()
173 size_t *count = state; in num_events_cb()
179 static int num_events_sys_cb(void *state, const char *sys_name) in num_events_sys_cb() argument
[all …]
A Dtp_pmu.h7 typedef int (*tp_sys_callback)(void *state, const char *sys_name);
8 typedef int (*tp_event_callback)(void *state, const char *sys_name, const char *evt_name);
11 int tp_pmu__for_each_tp_event(const char *sys, void *state, tp_event_callback cb);
12 int tp_pmu__for_each_tp_sys(void *state, tp_sys_callback cb);
15 int tp_pmu__for_each_event(struct perf_pmu *pmu, void *state, pmu_event_callback cb);
A Dsrccode.h9 static inline void srccode_state_init(struct srccode_state *state) in srccode_state_init() argument
11 state->srcfile = NULL; in srccode_state_init()
12 state->line = 0; in srccode_state_init()
15 void srccode_state_free(struct srccode_state *state);
/tools/testing/selftests/ublk/
A Dtest_common.sh212 local state
217 [ "$state" == "LIVE" ] && break
220 echo "$state"
228 local state
232 return "$state"
240 echo "$state"
249 local state
260 echo "$state"
288 local state
337 local state
[all …]
/tools/testing/selftests/bpf/progs/
A Ddummy_st_ops_success.c10 int BPF_PROG(test_1, struct bpf_dummy_ops_state *state) in BPF_PROG() argument
24 ::[state]"p"(state)); in BPF_PROG()
26 ret = state->val; in BPF_PROG()
27 state->val = 0x5a; in BPF_PROG()
34 int BPF_PROG(test_2, struct bpf_dummy_ops_state *state, int a1, unsigned short a2, in BPF_PROG() argument
37 test_2_args[0] = state->val; in BPF_PROG()
46 int BPF_PROG(test_sleepable, struct bpf_dummy_ops_state *state) in BPF_PROG() argument
A Dcgroup_hierarchical_stats.c16 __u64 state; member
23 __u64 state; member
51 struct percpu_attach_counter pcpu_init = {.state = state, .prev = 0}; in create_percpu_attach_counter()
59 struct attach_counter init = {.state = state, .pending = pending}; in create_attach_counter()
75 pcpu_counter->state += 1; in BPF_PROG()
90 __u64 state; in BPF_PROG() local
97 state = pcpu_counter->state; in BPF_PROG()
98 delta += state - pcpu_counter->prev; in BPF_PROG()
99 pcpu_counter->prev = state; in BPF_PROG()
116 total_counter->state += delta; in BPF_PROG()
[all …]
A Dtest_parse_tcp_hdr_opt.c36 static int parse_hdr_opt(const struct xdp_md *xdp, struct hdr_opt_state *state) in parse_hdr_opt() argument
42 tcp_opt = (__u8 *)(data + state->byte_offset); in parse_hdr_opt()
52 state->hdr_bytes_remaining--; in parse_hdr_opt()
53 state->byte_offset++; in parse_hdr_opt()
57 if (state->hdr_bytes_remaining < 2 || in parse_hdr_opt()
62 if (hdr_len > state->hdr_bytes_remaining) in parse_hdr_opt()
72 state->server_id = *(__u32 *)&tcp_opt[2]; in parse_hdr_opt()
76 state->hdr_bytes_remaining -= hdr_len; in parse_hdr_opt()
77 state->byte_offset += hdr_len; in parse_hdr_opt()
A Dverifier_netfilter_ctx.c21 : __imm_const(__bpf_nf_ctx_state, offsetof(struct bpf_nf_ctx, state)) in with_invalid_ctx_access_test1()
76 struct nf_hook_state *state = (void *)ctx->state; in with_invalid_ctx_access_test5() local
78 state->sk = NULL; in with_invalid_ctx_access_test5()
94 const struct nf_hook_state *state = ctx->state; in with_valid_ctx_access_test6() local
109 if (state->pf != 2) in with_valid_ctx_access_test6()
/tools/testing/selftests/drivers/net/mlxsw/
A Ddevlink_linecard.sh25 local state=$1; shift
29 [ "$current" == "$state" ]
47 local state=$2
56 local state=$2
101 local state
103 state=$(lc_state_get $lc)
126 local state
137 [ "$state" == "provisioned" ] || [ "$state" == "active" ]
223 local state
228 state=$(lc_state_get $lc)
[all …]
/tools/power/cpupower/utils/idle_monitor/
A Dcpuidle_sysfs.c46 int cpu, state; in cpuidle_start() local
49 for (state = 0; state < cpuidle_sysfs_monitor.hw_states_num; in cpuidle_start()
50 state++) { in cpuidle_start()
51 previous_count[cpu][state] = in cpuidle_start()
52 cpuidle_state_time(cpu, state); in cpuidle_start()
54 cpu, state, previous_count[cpu][state]); in cpuidle_start()
62 int cpu, state; in cpuidle_stop() local
68 for (state = 0; state < cpuidle_sysfs_monitor.hw_states_num; in cpuidle_stop()
69 state++) { in cpuidle_stop()
70 current_count[cpu][state] = in cpuidle_stop()
[all …]
A Damd_fam14h_idle.c96 static int amd_fam14h_get_pci_info(struct cstate *state, in amd_fam14h_get_pci_info() argument
101 switch (state->id) { in amd_fam14h_get_pci_info()
134 if (state->id == NBP1) { in amd_fam14h_init()
149 state->name, PCI_MONITOR_ENABLE_REG, enable_bit, in amd_fam14h_init()
154 previous_count[state->id][cpu] = 0; in amd_fam14h_init()
170 if (state->id == NBP1) { in amd_fam14h_disable()
181 current_count[state->id][cpu] = val; in amd_fam14h_disable()
183 dprint("%s: Current - %llu (%u)\n", state->name, in amd_fam14h_disable()
184 current_count[state->id][cpu], cpu); in amd_fam14h_disable()
185 dprint("%s: Previous - %llu (%u)\n", state->name, in amd_fam14h_disable()
[all …]
/tools/testing/selftests/powerpc/security/
A Dbranch_loops.S25 .macro state number macro
54 state 0
55 state 1
56 state 2
57 state 3
58 state 4
59 state 5
60 state 6
61 state 7
A Dspectre_v2.c106 state = VULNERABLE; in get_sysfs_state()
108 state = NOT_AFFECTED; in get_sysfs_state()
110 state = BRANCH_SERIALISATION; in get_sysfs_state()
112 state = COUNT_CACHE_DISABLED; in get_sysfs_state()
114 state = COUNT_CACHE_FLUSH_HW; in get_sysfs_state()
118 state = BTB_FLUSH; in get_sysfs_state()
120 return state; in get_sysfs_state()
130 enum spectre_v2_state state; in spectre_v2_test() local
138 state = get_sysfs_state(); in spectre_v2_test()
139 if (state == UNKNOWN) { in spectre_v2_test()
[all …]
/tools/perf/arch/x86/annotate/
A Dinstructions.c242 if (state->regs[i].caller_saved) in update_insn_state_x86()
243 state->regs[i].ok = false; in update_insn_state_x86()
248 tsr = &state->regs[state->ret_reg]; in update_insn_state_x86()
270 tsr = &state->regs[dst->reg1]; in update_insn_state_x86()
330 tsr = &state->regs[dst->reg1]; in update_insn_state_x86()
408 tsr = &state->regs[dst->reg1]; in update_insn_state_x86()
446 else if (has_reg_type(state, sreg) && state->regs[sreg].ok && in update_insn_state_x86()
492 if (has_reg_type(state, reg2) && state->regs[reg2].ok && in update_insn_state_x86()
523 else if (has_reg_type(state, sreg) && state->regs[sreg].ok && in update_insn_state_x86()
565 !state->regs[src->reg1].ok) in update_insn_state_x86()
[all …]
/tools/testing/selftests/x86/
A Dunwind_vdso.c58 struct unwind_state *state = opaque; in trace_fn() local
61 if (state->depth == -1) { in trace_fn()
62 if (ip == state->ip) in trace_fn()
63 state->depth = 0; in trace_fn()
90 state->depth++; in trace_fn()
98 struct unwind_state state; in sigtrap() local
122 state.ip = ip; in sigtrap()
123 state.depth = -1; in sigtrap()
124 _Unwind_Backtrace(trace_fn, &state); in sigtrap()
/tools/perf/util/intel-pt-decoder/
A Dintel-pt-decoder.c126 struct intel_pt_state state; member
1198 decoder->state.to_ip = 0; in intel_pt_walk_insn()
1403 decoder->state.to_ip = 0; in intel_pt_fup_event()
1624 decoder->state.to_ip = 0; in intel_pt_emulated_ptwrite()
2044 memset(decoder->state.items.mask, 0, sizeof(decoder->state.items.mask)); in intel_pt_bbp()
2312 decoder->state.to_ip = 0; in intel_pt_resample()
3155 decoder->state.to_ip = 0; in intel_pt_psb()
3926 decoder->state.type = 0; in intel_pt_sync()
3940 decoder->state.to_ip = 0; in intel_pt_sync()
4035 decoder->state.err = 0; in intel_pt_decode()
[all …]
/tools/objtool/arch/powerpc/
A Ddecode.c100 void arch_initial_func_cfi_state(struct cfi_init_state *state) in arch_initial_func_cfi_state() argument
105 state->regs[i].base = CFI_UNDEFINED; in arch_initial_func_cfi_state()
106 state->regs[i].offset = 0; in arch_initial_func_cfi_state()
110 state->cfa.base = CFI_SP; in arch_initial_func_cfi_state()
111 state->cfa.offset = 0; in arch_initial_func_cfi_state()
114 state->regs[CFI_RA].base = CFI_CFA; in arch_initial_func_cfi_state()
115 state->regs[CFI_RA].offset = 0; in arch_initial_func_cfi_state()
/tools/testing/selftests/bpf/
A Dtest_progs.c555 state->subtest_num++; in test__start_subtest()
564 subtest_state = &state->subtest_states[state->subtest_num - 1]; in test__start_subtest()
1106 argp_usage(state); in parse_arg()
1384 stdio_hijack(&state->log_buf, &state->log_cnt); in run_one_test()
1603 if (!state->tested) in calculate_summary_and_print_errors()
1644 if (!state->tested || !state->error_cnt) in calculate_summary_and_print_errors()
1780 state->log_cnt = 0; in free_subtest_state()
1782 free(state->name); in free_subtest_state()
1783 state->name = NULL; in free_subtest_state()
1874 if (verbose() || state->force_log || state->error_cnt) { in worker_main()
[all …]

Completed in 56 milliseconds

1234567891011