[PATCH 7/9] cr_tests: fs: Add random tree test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This test creates a random tree of files and directories, opens them all,
unlinks them, "overwrites" their entries in the filesystem, and then awaits
checkpoint. Afterwards it checks the directories and file contents.

Signed-off-by: Matt Helsley <matthltc@xxxxxxxxxx>
---
 fs/tree.sh |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
 create mode 100755 fs/tree.sh

diff --git a/fs/tree.sh b/fs/tree.sh
new file mode 100755
index 0000000..1323594
--- /dev/null
+++ b/fs/tree.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+# Generate a random tree and check its contents
+./rand_tree.py -r ./tree -d 4 -f 10 && trap 'rm -rf ./tree' EXIT
+./check_tree.py -r ./tree -c original
+
+# Fill its contents with new dummy values
+./fill_tree.py -r ./tree -c dummy
+./check_tree.py -r ./tree -c dummy
+
+# Fill its contents with "original" values
+./fill_tree.py -r ./tree -c original
+./hold_unlinked_tree.py -r ./tree -n && \
+# Expect "new" contents
+./check_tree.py -r ./tree -c new
-- 
1.6.3.3

_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux