diff mbox

btrfs-progs: Add fast,slow symlinks,fifo types to convert test

Message ID 20161009150811.GA32553@fedori (mailing list archive)
State Accepted
Headers show

Commit Message

Lakshmipathi.G Oct. 9, 2016, 3:08 p.m. UTC
Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in>
---
 tests/common.convert | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

Comments

David Sterba Oct. 10, 2016, 3:24 p.m. UTC | #1
On Sun, Oct 09, 2016 at 05:08:12PM +0200, Lakshmipathi.G wrote:
> Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tests/common.convert b/tests/common.convert
index 1e00d38..5083e65 100644
--- a/tests/common.convert
+++ b/tests/common.convert
@@ -25,10 +25,10 @@  generate_dataset() {
 			done
 			;;
 
-		symlink)
+		fast_symlink)
 			for num in $(seq 1 $DATASET_SIZE); do
 				run_check $SUDO_HELPER touch $dirpath/$dataset_type.$num
-				run_check $SUDO_HELPER ln -s $dirpath/$dataset_type.$num $dirpath/slink.$num
+				run_check $SUDO_HELPER cd $dirpath && ln -s $dataset_type.$num $dirpath/slink.$num && cd /
 			done
 			;;
 
@@ -71,12 +71,26 @@  generate_dataset() {
 				run_check $SUDO_HELPER setfattr -n user.foo -v bar$num $dirpath/$dataset_type.$num
 			done
 			;;
+
+		fifo)
+			for num in $(seq 1 $DATASET_SIZE); do
+				run_check $SUDO_HELPER mkfifo $dirpath/$dataset_type.$num
+			done
+			;;
+
+		slow_symlink)
+			long_filename=`date +%s | sha256sum | cut -f1 -d'-'`
+			run_check $SUDO_HELPER touch $dirpath/$long_filename
+			for num in $(seq 1 $DATASET_SIZE); do
+				run_check $SUDO_HELPER ln -s $dirpath/$long_filename $dirpath/slow_slink.$num
+			done
+			;;
 	esac
 }
 
 populate_fs() {
 
-        for dataset_type in 'small' 'hardlink' 'symlink' 'brokenlink' 'perm' 'sparse' 'acls'; do
+        for dataset_type in 'small' 'hardlink' 'fast_symlink' 'brokenlink' 'perm' 'sparse' 'acls' 'fifo' 'slow_symlink'; do
 		generate_dataset "$dataset_type"
 	done
 }