Skip to contentSkip to conversation

generic/360: Create symlink with valid path

PATCH New Jan Kara 1 participant 2 messages Jun 14, 2017

lore
Share & tools
lore

Jan Kara

author
#0 lore raw

PATCH 1/2 generic/360: Create symlink with valid path

A test is creating symlink with a path containing name 1023 characters long. Such file name is invalid for most filesystems (the limit on file name lenght is mostly 255 characters) and UDF actually complains about this and so the test fails. Since the point of this test is to verify storage of the symlink, change the test to use a valid path where each component name has only 254 characters.

---
 tests/generic/360     | 4 +++-
 tests/generic/360.out | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
tests/generic/360 +3 -1
index 86e554bb5fec..cc5623f552e0 100755
@@ -50,9 +50,11 @@ _require_test
 linkfile=$TEST_DIR/$seq.symlink
 rm -f $linkfile
 
+FNAME=$(perl -e 'print "a"x254')
+
 # Create a symlink points to a very long path, so that the path could not be
 # hold in inode
-ln -s `perl -e 'print "a"x1023'` $linkfile
+ln -s $FNAME/$FNAME/$FNAME/$FNAME $linkfile
 
 # Check symlink contains the correct path.
 # 1023 chars are a bit long for golden image output, compute the md5 checksum
tests/generic/360.out +1 -1
index 1f0459bbcb5d..a076d99bb091 100644
@@ -1,2 +1,2 @@
 QA output created by 360
-cd3b0a56bc304075e28a20a4edd57068  -
+36c1641ab5d82b582cd2baa1ace16277  -
Signature · 1 line
2.12.3
author
#1 lore raw

PATCH 2/2 common: UDF does not support journalling

UDF does not support journalling. Make the appropriate feature test fail for it.

---
 common/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/rc +1 -1
index ff1b75c9cd25..d3ce3acc3308 100644
@@ -3014,7 +3014,7 @@ _require_metadata_journaling()
 	fi
 
 	case "$FSTYP" in
-	ext2|vfat|msdos)
+	ext2|vfat|msdos|udf)
 		_notrun "$FSTYP does not support metadata journaling"
 		;;
 	ext4)
Signature · 1 line
2.12.3