[2/2] btrfs-progs: test: fix name generation not to contain trailing spaces
diff mbox

Message ID c27eb6e9-4a07-12c5-acd6-76229b2a7103@jp.fujitsu.com
State New
Headers show

Commit Message

Misono Tomohiro Sept. 5, 2017, 5:50 a.m. UTC
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>
---
 tests/common | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Sterba Sept. 6, 2017, 3:51 p.m. UTC | #1
On Tue, Sep 05, 2017 at 02:50:03PM +0900, Misono, Tomohiro wrote:
> 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>

Both 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

Patch
diff mbox

diff --git a/tests/common b/tests/common
index b7d3436..2647aa6 100644
--- a/tests/common
+++ b/tests/common
@@ -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"