summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcoveragetool19
-rwxr-xr-xtests/bcache/bcache_journal_stress.ktest13
2 files changed, 22 insertions, 10 deletions
diff --git a/coveragetool b/coveragetool
index da1b40f..fbc98a1 100755
--- a/coveragetool
+++ b/coveragetool
@@ -5,9 +5,6 @@ set -o errexit
if [ "$#" -eq 0 ]; then
echo "Usage: coveragetool <outputdir> <inputs>..."
- echo
- echo "You may need to install perl-digest-MD5 for lcov"
- echo " sudo yum install perl-Digest-MD5"
exit 1
fi
@@ -16,18 +13,22 @@ if ! which lcov; then
exit 0
fi
-gcov_out="$1"
+lcov_out="$1"
shift
-info=$gcov_out/gcov.info
-html=$gcov_out/gcov.html
+info=$lcov_out/lcov.info
+html=$lcov_out/lcov.html
tracefiles=""
-for i in $@; do
- out=$gcov_out/$(basename "$i").info
+n=0
+
+for dir in $@; do
+ out=$lcov_out/lcov.${n}.info
tracefiles+=" --add-tracefile $out"
- lcov --capture --quiet --directory "$i" --output-file "$out"
+ lcov --capture --quiet --directory "$dir" --output-file "$out"
+
+ n=$((n+1))
done
[ -n "$tracefiles" ] || return 0
diff --git a/tests/bcache/bcache_journal_stress.ktest b/tests/bcache/bcache_journal_stress.ktest
index 394d3e0..63cec72 100755
--- a/tests/bcache/bcache_journal_stress.ktest
+++ b/tests/bcache/bcache_journal_stress.ktest
@@ -8,7 +8,6 @@ config-tier 256M,256M,256M,256M,256M,256M,256M,256M,256M,256M
config-bucket-size 64k
config-block-size 4k
config-volume 1900M
-config-bcache-sysfs journal_delay_ms 0
config-bcache-sysfs btree_flush_delay 0
config-timeout $(stress_timeout)
@@ -19,6 +18,18 @@ main()
setup_bcache
test_antagonist
+
+ (
+ while true; do
+ # Lots of small journal entries
+ echo 0 > /sys/fs/bcache/*/internal/journal_delay_ms
+ sleep 5
+ # Let the journal entries fill up
+ echo 10000 > /sys/fs/bcache/*/internal/journal_delay_ms
+ sleep 5
+ done
+ ) &
+
test_stress
stop_volumes
test_bcachefs_stress