Home
last modified time | relevance | path

Searched refs:count (Results 1 – 25 of 391) sorted by relevance

12345678910>>...16

/tools/testing/selftests/kvm/lib/
Dstring_override.c10 int memcmp(const void *cs, const void *ct, size_t count) in memcmp() argument
15 for (su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--) { in memcmp()
22 void *memcpy(void *dest, const void *src, size_t count) in memcpy() argument
27 while (count--) in memcpy()
32 void *memset(void *s, int c, size_t count) in memset() argument
36 while (count--) in memset()
41 size_t strnlen(const char *s, size_t count) in strnlen() argument
45 for (sc = s; count-- && *sc != '\0'; ++sc) in strnlen()
Dio.c41 ssize_t test_write(int fd, const void *buf, size_t count) in test_write() argument
45 size_t num_left = count; in test_write()
51 TEST_ASSERT(count >= 0, "Unexpected count, count: %li", count); in test_write()
77 } while (num_written < count); in test_write()
118 ssize_t test_read(int fd, void *buf, size_t count) in test_read() argument
122 size_t num_left = count; in test_read()
128 TEST_ASSERT(count >= 0, "Unexpected count, count: %li", count); in test_read()
154 } while (num_read < count); in test_read()
/tools/testing/selftests/bpf/progs/
Dtest_sockmap_listen.c64 unsigned int *count; in prog_stream_verdict() local
73 count = bpf_map_lookup_elem(&verdict_map, &verdict); in prog_stream_verdict()
74 if (count) in prog_stream_verdict()
75 (*count)++; in prog_stream_verdict()
83 unsigned int *count; in prog_skb_verdict() local
94 count = bpf_map_lookup_elem(&verdict_map, &verdict); in prog_skb_verdict()
95 if (count) in prog_skb_verdict()
96 (*count)++; in prog_skb_verdict()
104 unsigned int *count; in prog_msg_verdict() local
113 count = bpf_map_lookup_elem(&verdict_map, &verdict); in prog_msg_verdict()
[all …]
Dbpf_iter_test_kern_common.h7 int count = 0; variable
15 if (count < 4) { in dump_task()
16 c = START_CHAR + count; in dump_task()
18 count++; in dump_task()
/tools/testing/selftests/drivers/net/mlxsw/
Dtc_flower_scale.sh70 local count=$1; shift
75 for ((i = 0; i < count; ++i)); do
92 local count=$1; shift
94 local last=$((count - 1))
96 tc_flower_rules_create $count $should_fail
101 [[ $((offload_count - 1)) -eq $count ]]
102 …check_err_fail $should_fail $? "Attempt to offload $count rules (actual result $((offload_count - …
107 local count=$1; shift
112 if ((count > 65536)); then
113 check_err 1 "Invalid count of $count. At most 65536 rules supported"
[all …]
Drif_counter_scale.sh52 local count=$1; shift
56 for ((i = 1; i <= count; i++)); do
73 local count=$1; shift
78 for ((i = 1; i <= count; i++)); do
81 for ((i = 1; i <= count; i++)); do
93 local count=$1; shift
96 for ((i = count; i > 0; i /= 2)); do
102 for ((i = count; i > 0; i /= 2)); do
Dport_range_scale.sh29 local count=$1; shift
33 for ((i = 0; i < count; ++i)); do
52 local count=$1; shift
55 port_range_rules_create $count $should_fail
59 ((offload_count == count))
65 local count=$1; shift
73 __port_range_test $count $should_fail
Drif_mac_profiles_occ.sh43 local count=$1; shift
46 for ((i = 1; i <= count; i++)); do
77 local count=$1; shift
82 if [[ $count -eq 1 ]]; then
96 [[ $occ -eq $((count - 1)) ]]
106 local count=$1; shift
107 local i=$((count + 1))
131 local count=$(devlink_resource_size_get rif_mac_profiles)
133 create_max_rif_mac_profiles $count
136 rif_mac_profile_consolidation_test $count
[all …]
Dtc_police_scale.sh36 local count=$1; shift
41 for ((i = 0; i < count; ++i)); do
58 local count=$1; shift
61 tc_police_rules_create $count $should_fail
65 ((offload_count == count))
71 local count=$1; shift
79 __tc_police_test $count $should_fail
/tools/testing/selftests/ftrace/test.d/ftrace/
Dfgraph-filter-stack.tc43 count=`cat trace | grep '()' | grep -v schedule | wc -l`
45 if [ $count -ne 0 ]; then
50 count=`cat trace | grep 'schedule()' | wc -l`
51 if [ $count -eq 0 ]; then
60 count=`cat trace | grep '()' | grep -v schedule | wc -l`
62 if [ $count -ne 0 ]; then
66 count=`cat trace | grep 'schedule()' | wc -l`
67 if [ $count -eq 0 ]; then
Dfgraph-filter.tc29 count=`cat trace | grep '()' | grep -v schedule | wc -l`
30 if [ $count -ne 0 ]; then
35 count=`cat trace | grep 'schedule()' | wc -l`
36 if [ $count -eq 0 ]; then
/tools/testing/selftests/bpf/
Durandom_read.c34 static noinline void urandom_read(int fd, int count) in urandom_read() argument
39 for (i = 0; i < count; ++i) { in urandom_read()
43 urand_read_without_sema(i, count, BUF_SIZE); in urandom_read()
44 STAP_PROBE3(urand, read_with_sema, i, count, BUF_SIZE); in urandom_read()
47 urandlib_read_without_sema(i, count, BUF_SIZE); in urandom_read()
48 urandlib_read_with_sema(i, count, BUF_SIZE); in urandom_read()
62 int count = 4; in main() local
69 count = atoi(argv[1]); in main()
91 urandom_read(fd, count); in main()
Dxdping.c36 static int get_stats(int fd, __u16 count, __u32 raddr) in get_stats() argument
52 for (i = 0; i < count; i++) { in get_stats()
59 count + i + 1, in get_stats()
63 if (i < count) { in get_stats()
64 fprintf(stderr, "Expected %d samples, got %d.\n", count, i); in get_stats()
91 __u16 count = XDPING_DEFAULT_COUNT; in main() local
109 count = atoi(optarg); in main()
110 if (count < 1 || count > XDPING_MAX_COUNT) { in main()
221 pinginfo.seq = htons(count); in main()
222 pinginfo.count = count; in main()
[all …]
/tools/testing/selftests/ftrace/test.d/event/
Dtoplevel-enable.tc22 count=`head -n 128 trace | grep -v ^# | wc -l`
23 if [ $count -eq 0 ]; then
35 count=`head -n 128 trace | grep -v ^# | wc -l`
36 if [ $count -eq 0 ]; then
46 count=`cat trace | grep -v ^# | wc -l`
47 if [ $count -ne 0 ]; then
Dsubsystem-enable.tc45 count=`check_unique`
46 if [ $count -lt 3 ]; then
56 count=`check_unique`
57 if [ $count -lt 3 ]; then
67 count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
68 if [ $count -ne 0 ]; then
Devent-enable.tc21 count=`cat trace | grep sched_switch | wc -l`
22 if [ $count -eq 0 ]; then
32 count=`cat trace | grep sched_switch | wc -l`
33 if [ $count -eq 0 ]; then
43 count=`cat trace | grep sched_switch | wc -l`
44 if [ $count -ne 0 ]; then
Devent-pid.tc26 count=`cat trace | grep sched_switch | wc -l`
27 if [ $count -eq 0 ]; then
41 count=`cat trace | grep sched_switch | grep -v "pid=$mypid" | wc -l`
42 if [ $count -ne 0 ]; then
54 count=`cat trace | grep sched_switch | grep -v "pid=$mypid" | wc -l`
55 if [ $count -eq 0 ]; then
/tools/testing/selftests/lsm/
Dlsm_get_self_attr_test.c155 int count; in TEST() local
189 count = lsm_get_self_attr(LSM_ATTR_CURRENT, ctx, &size, 0); in TEST()
190 ASSERT_EQ(cnt_current, count); in TEST()
194 for (i = 1; i < count; i++) { in TEST()
201 count = lsm_get_self_attr(LSM_ATTR_EXEC, ctx, &size, 0); in TEST()
202 ASSERT_GE(cnt_exec, count); in TEST()
203 if (count > 0) { in TEST()
208 for (i = 1; i < count; i++) { in TEST()
215 count = lsm_get_self_attr(LSM_ATTR_FSCREATE, ctx, &size, 0); in TEST()
216 ASSERT_GE(cnt_fscreate, count); in TEST()
[all …]
/tools/testing/selftests/net/mptcp/
Dmptcp_join.sh867 local count
870 count=$(mptcp_lib_get_counter ${ns} "MPTcpExtMPCurrEstab")
871 if [ -z "$count" ]; then
873 elif [ "$count" != "$cestab" ]; then
874 fail_test "got $count current establish[s] expected $cestab"
1143 local count
1158 count=$(mptcp_lib_get_counter ${ns1} "MPTcpExtDataCsumErr")
1159 if [ -n "$count" ] && [ "$count" != "$csum_ns1" ]; then
1160 extra_msg+=" ns1=$count"
1162 if [ -z "$count" ]; then
[all …]
/tools/testing/selftests/media_tests/
Dmedia_device_test.c48 int count; in main() local
76 count = rand(); in main()
91 printf("Running test for %d iterations\n", count); in main()
93 while (count > 0) { in main()
99 mdi.model, mdi.driver, count); in main()
101 count--; in main()
/tools/testing/selftests/bpf/map_tests/
Dhtab_map_batch_ops.c79 __u32 batch, count, total, total_success; in __test_map_lookup_and_delete_batch() local
108 count = max_entries; in __test_map_lookup_and_delete_batch()
110 values, &count, &opts); in __test_map_lookup_and_delete_batch()
118 count = 0; in __test_map_lookup_and_delete_batch()
120 values, &count, &opts); in __test_map_lookup_and_delete_batch()
126 count = max_entries; in __test_map_lookup_and_delete_batch()
128 values, &count, &opts); in __test_map_lookup_and_delete_batch()
131 CHECK(count != max_entries, "count = max_entries", in __test_map_lookup_and_delete_batch()
132 "count = %u, max_entries = %u\n", count, max_entries); in __test_map_lookup_and_delete_batch()
149 count = step; in __test_map_lookup_and_delete_batch()
[all …]
/tools/testing/selftests/net/netfilter/
Dnft_zones_many.sh78 …dd if=/dev/zero bs=8k count=1000 2>/dev/null | ip netns exec "$ns1" socat -u STDIN UDP:127.0.0.1:1…
90 local count duration
91 count=$(ip netns exec "$ns1" conntrack -C)
94 if [ "$count" -ge "$max_zones" ]; then
95 echo "PASS: inserted $count entries from packet path in $duration ms total"
98 …echo "FAIL: inserted $count entries from packet path in $duration ms total, expected $max_zones en…
139 local count
141 count=$(ip netns exec "$ns1" conntrack -C)
144 if [ "$count" -eq "$max_zones" ]; then
145 echo "PASS: inserted $count entries via ctnetlink in $duration ms"
[all …]
/tools/testing/selftests/powerpc/
Dutils.c31 int read_file(const char *path, char *buf, size_t count, size_t *len) in read_file() argument
42 rc = read(fd, buf, count); in read_file()
52 if (rc == count) { in read_file()
126 int write_file(const char *path, const char *buf, size_t count) in write_file() argument
136 rc = write(fd, buf, count); in write_file()
142 if (rc != count) { in write_file()
168 int read_debugfs_file(const char *subpath, char *buf, size_t count) in read_debugfs_file() argument
174 return read_file(path, buf, count, NULL); in read_debugfs_file()
177 int write_debugfs_file(const char *subpath, const char *buf, size_t count) in write_debugfs_file() argument
183 return write_file(path, buf, count); in write_debugfs_file()
[all …]
/tools/perf/tests/
Dbp_signal_overflow.c48 long long count; in bp_count() local
51 ret = read(fd, &count, sizeof(long long)); in bp_count()
57 return count; in bp_count()
67 long long count; in test__bp_signal_overflow() local
121 count = bp_count(fd); in test__bp_signal_overflow()
126 count, overflows); in test__bp_signal_overflow()
128 if (count != EXECUTIONS) { in test__bp_signal_overflow()
130 count, EXECUTIONS); in test__bp_signal_overflow()
/tools/perf/util/intel-pt-decoder/
Dintel-pt-pkt-decoder.c77 int count; in intel_pt_get_long_tnt() local
84 for (count = 47; count; count--) { in intel_pt_get_long_tnt()
91 packet->count = count; in intel_pt_get_long_tnt()
134 packet->count = 5; in intel_pt_get_vmcs()
177 packet->count = buf[5] | ((buf[6] & BIT(0)) << 8); in intel_pt_get_tma()
214 packet->count = (buf[1] >> 5) & 0x3; in intel_pt_get_ptwrite()
218 switch (packet->count) { in intel_pt_get_ptwrite()
282 packet->count = buf[2] >> 7; in intel_pt_get_bbp()
293 packet->count = buf[0] >> 3; in intel_pt_get_bip_4()
304 packet->count = buf[0] >> 3; in intel_pt_get_bip_8()
[all …]

12345678910>>...16