All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]btrfs-progs: Add fast,slow symlinks and fifo types to convert test
@ 2016-09-15  9:34 Lakshmipathi.G
  2016-09-19 17:05 ` David Sterba
       [not found] ` <89977db3-aae4-01d1-62a2-34011e0227f8@cn.fujitsu.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Lakshmipathi.G @ 2016-09-15  9:34 UTC (permalink / raw)
  To: linux-btrfs

Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in>
---
 tests/common.convert | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/tests/common.convert b/tests/common.convert
index 67c99b1..2790be5 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,24 @@ 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)
+			for num in $(seq 1 $DATASET_SIZE); do
+				fname64=`date +%s | sha256sum | cut -f1 -d'-'`
+				run_check $SUDO_HELPER touch $dirpath/$fname64
+				run_check $SUDO_HELPER ln -s $dirpath/$fname64 $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
 }
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH]btrfs-progs: Add fast,slow symlinks and fifo types to convert test
  2016-09-15  9:34 [PATCH]btrfs-progs: Add fast,slow symlinks and fifo types to convert test Lakshmipathi.G
@ 2016-09-19 17:05 ` David Sterba
  2016-09-20 16:03   ` lakshmipathi.g
       [not found] ` <89977db3-aae4-01d1-62a2-34011e0227f8@cn.fujitsu.com>
  1 sibling, 1 reply; 4+ messages in thread
From: David Sterba @ 2016-09-19 17:05 UTC (permalink / raw)
  To: Lakshmipathi.G; +Cc: linux-btrfs

On Thu, Sep 15, 2016 at 11:34:07AM +0200, Lakshmipathi.G wrote:
> +		slow_symlink)
> +			for num in $(seq 1 $DATASET_SIZE); do
> +				fname64=`date +%s | sha256sum | cut -f1 -d'-'`

Do you need to generate the date and sha all the time?

> +				run_check $SUDO_HELPER touch $dirpath/$fname64
> +				run_check $SUDO_HELPER ln -s $dirpath/$fname64 $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
>  }
> -- 
> 1.9.3
> 
> --
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH]btrfs-progs: Add fast,slow symlinks and fifo types to convert test
  2016-09-19 17:05 ` David Sterba
@ 2016-09-20 16:03   ` lakshmipathi.g
  0 siblings, 0 replies; 4+ messages in thread
From: lakshmipathi.g @ 2016-09-20 16:03 UTC (permalink / raw)
  To: dsterba, Lakshmipathi.G, linux-btrfs

On 2016-09-19 11:05, David Sterba wrote:
> On Thu, Sep 15, 2016 at 11:34:07AM +0200, Lakshmipathi.G wrote:
>> +		slow_symlink)
>> +			for num in $(seq 1 $DATASET_SIZE); do
>> +				fname64=`date +%s | sha256sum | cut -f1 -d'-'`
> 
> Do you need to generate the date and sha all the time?
> 

Right, I missed that part. We can create a single file and create 
multiple symlink to that same file. fname64 creation can be moved out of 
the loop. I'll re-send another patch with this fix.


Cheers.
Lakshmipathi.G

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH]btrfs-progs: Add fast,slow symlinks and fifo types to convert test
       [not found] ` <89977db3-aae4-01d1-62a2-34011e0227f8@cn.fujitsu.com>
@ 2016-09-20 16:06   ` lakshmipathi.g
  0 siblings, 0 replies; 4+ messages in thread
From: lakshmipathi.g @ 2016-09-20 16:06 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: linux-btrfs

On 2016-09-19 18:21, Qu Wenruo wrote:
> Just curious, did the new fifo/slow_symlink exposed any convert bug?
> 
> Thanks,
> Qu
Unfortunately no. I was hoping something will fail, but sadly 
convert-tests.sh passed!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-20 16:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-15  9:34 [PATCH]btrfs-progs: Add fast,slow symlinks and fifo types to convert test Lakshmipathi.G
2016-09-19 17:05 ` David Sterba
2016-09-20 16:03   ` lakshmipathi.g
     [not found] ` <89977db3-aae4-01d1-62a2-34011e0227f8@cn.fujitsu.com>
2016-09-20 16:06   ` lakshmipathi.g

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.