btrfs-progs: test: fix name generation not to contain trailing spaces
authorMisono, Tomohiro <misono.tomohiro@jp.fujitsu.com>
Tue, 5 Sep 2017 05:50:03 +0000 (14:50 +0900)
committerDavid Sterba <dsterba@suse.com>
Fri, 8 Sep 2017 14:15:05 +0000 (16:15 +0200)
First patch causes test-convert fails.  This is because
generate_dataset() creates a name containing trailing spaces for
"slow_symlink" type, and cause getfacl error in convert_test_perm().
(This is not noticed since original run_check_stdout() throws away the
error.)

Fix this by use space for delimiter for cut.

Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
tests/common

index d450c2c..08a2591 100644 (file)
@@ -509,7 +509,7 @@ generate_dataset() {
                        ;;
 
                slow_symlink)
-                       long_filename=`date +%s | sha256sum | cut -f1 -d'-'`
+                       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"