projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rcutorture: Check histogram of ages
[userspace-rcu.git]
/
tests
/
regression
/
rcutorture.h
diff --git
a/tests/regression/rcutorture.h
b/tests/regression/rcutorture.h
index 01f64569757c5fb2a39afec2074a482d252501b0..441ff79bf349fa301b60e7ee61935e0caa58aba2 100644
(file)
--- a/
tests/regression/rcutorture.h
+++ b/
tests/regression/rcutorture.h
@@
-527,6
+527,7
@@
int stresstest(int nreaders)
int t;
long long *p;
long long sum;
int t;
long long *p;
long long sum;
+ int ret;
init_per_thread(n_reads_pt, 0LL);
for_each_thread(t) {
init_per_thread(n_reads_pt, 0LL);
for_each_thread(t) {
@@
-552,11
+553,19
@@
int stresstest(int nreaders)
n_reads, n_updates, n_mberror);
rdiag_start();
rdiag("rcu_stress_count:");
n_reads, n_updates, n_mberror);
rdiag_start();
rdiag("rcu_stress_count:");
+ ret = 0;
for (i = 0; i <= RCU_STRESS_PIPE_LEN; i++) {
sum = 0LL;
for_each_thread(t) {
sum += per_thread(rcu_stress_count, t)[i];
}
for (i = 0; i <= RCU_STRESS_PIPE_LEN; i++) {
sum = 0LL;
for_each_thread(t) {
sum += per_thread(rcu_stress_count, t)[i];
}
+ /*
+ * If any entries past the first two are non-zero, RCU is
+ * broken. See details above about rcu_stress_count.
+ */
+ if (i > 1 && sum != 0) {
+ ret = -1;
+ }
rdiag(" %lld", sum);
}
rdiag_end();
rdiag(" %lld", sum);
}
rdiag_end();
@@
-564,10
+573,9
@@
int stresstest(int nreaders)
diag("Deallocating per-CPU call_rcu threads.");
free_all_cpu_call_rcu_data();
}
diag("Deallocating per-CPU call_rcu threads.");
free_all_cpu_call_rcu_data();
}
- if (!n_mberror)
- return 0;
- else
- return -1;
+ if (n_mberror)
+ ret = -1;
+ return ret;
}
/*
}
/*
This page took
0.023505 seconds
and
4
git commands to generate.