[Reproducible-commits] [disorderfs] 03/03: tests/shuffle: Test that --shuffle-dirents works as directed.

Chris Lamb chris at chris-lamb.co.uk
Thu Aug 25 14:21:56 UTC 2016


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository disorderfs.

commit f12496531f7ab3d6e3c0ef4ee7cd1877e417e5d4
Author: Chris Lamb <lamby at debian.org>
Date:   Thu Aug 25 15:21:41 2016 +0100

    tests/shuffle: Test that --shuffle-dirents works as directed.
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 tests/shuffle | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/tests/shuffle b/tests/shuffle
new file mode 100755
index 0000000..33453eb
--- /dev/null
+++ b/tests/shuffle
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+. ./common
+
+Expect_num_variations () {
+	Mount ${1}
+
+	N="$(for X in $(seq 500); do Get_entries; echo; done | sort -u | wc -l)"
+
+	if test ${N} ${2}
+	then
+		Fail "${1} ${3} (saw ${N} variations)"
+	fi
+	Unmount
+}
+
+Expect_num_variations --shuffle-dirents=yes "= 1" \
+	"should always return the same result"
+
+Expect_num_variations --shuffle-dirents=no "!= 1" \
+	"should not always return the same result"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/disorderfs.git



More information about the Reproducible-commits mailing list