Skip to contentSkip to conversation

xfstests/common/renameat2: pass the renameat2 flags from _rename_tests to _rename_tests_source_dest

PATCH In review Wang Sheng-Hui 2 participants 4 messages May 1, 2015 – May 15, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstests/common/renameat2: pass the renameat2 flags from _rename_tests to _rename_tests_source_dest

_rename_tests() records the 'flags' arg but doesn't pass it to _rename_tests_source_dest() in old code, thus any 'flags' to renameat2 is missed. Fix the missing.

---
 common/renameat2 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
common/renameat2 +3 -2
index a335169..df2df2e 100644
@@ -78,6 +78,7 @@ _rename_tests_source_dest()
 	local source=$1
 	local dest=$2
 	local options=$3
+	local flags=$4
 
 	for stype in none regu symb dire tree; do
 		for dtype in none regu symb dire tree; do
@@ -107,11 +108,11 @@ _rename_tests()
 	local flags=$2
 
 	#same directory renames
-	_rename_tests_source_dest $testdir/src $testdir/dst     "samedir "
+	_rename_tests_source_dest $testdir/src $testdir/dst     "samedir " $flags
 
 	#cross directory renames
 	mkdir $testdir/x $testdir/y
-	_rename_tests_source_dest $testdir/x/src $testdir/y/dst "crossdir"
+	_rename_tests_source_dest $testdir/x/src $testdir/y/dst "crossdir" $flags
 	rmdir $testdir/x $testdir/y
 }
 
Signature · 8 lines
2.1.2



_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#1 lore raw
Quoted 26 lines · Wang Sheng-Hui

_rename_tests() records the 'flags' arg but doesn't pass it to _rename_tests_source_dest() in old code, thus any 'flags' to renameat2 is missed. Fix the missing.

---
 common/renameat2 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
common/renameat2 +1 -0
index a335169..df2df2e 100644
@@ -78,6 +78,7 @@ _rename_tests_source_dest()
 	local source=$1
 	local dest=$2
 	local options=$3
+	local flags=$4
 
 	for stype in none regu symb dire tree; do
 		for dtype in none regu symb dire tree; do
@@ -107,11 +108,11 @@ _rename_tests()
 	local flags=$2
 
 	#same directory renames

common/renameat2 _rename_tests() · line 118

Quoted 10 lines
common/renameat2 +2 -2
-	_rename_tests_source_dest $testdir/src $testdir/dst     "samedir "
+	_rename_tests_source_dest $testdir/src $testdir/dst     "samedir " $flags
 
 	#cross directory renames
 	mkdir $testdir/x $testdir/y
-	_rename_tests_source_dest $testdir/x/src $testdir/y/dst "crossdir"
+	_rename_tests_source_dest $testdir/x/src $testdir/y/dst "crossdir" $flags
 	rmdir $testdir/x $testdir/y
 }
 

Any comments?

Regards,
Sheng-Hui

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#2 lore raw
Quoted 31 lines · Wang Sheng-Hui
Quoted 28 lines · Wang Sheng-Hui

_rename_tests() records the 'flags' arg but doesn't pass it to _rename_tests_source_dest() in old code, thus any 'flags' to renameat2 is missed. Fix the missing.

---
 common/renameat2 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
common/renameat2 +2 -1
index a335169..df2df2e 100644
@@ -78,6 +78,7 @@ _rename_tests_source_dest()
 	local source=$1
 	local dest=$2
 	local options=$3
+	local flags=$4
 
 	for stype in none regu symb dire tree; do
 		for dtype in none regu symb dire tree; do
@@ -107,11 +108,11 @@ _rename_tests()
 	local flags=$2
 
 	#same directory renames
-	_rename_tests_source_dest $testdir/src $testdir/dst     "samedir "
+	_rename_tests_source_dest $testdir/src $testdir/dst     "samedir " $flags
 
Quoted 10 lines

common/renameat2 _rename_tests() · line 118

Quoted 8 lines
common/renameat2 +1 -1
 	#cross directory renames
 	mkdir $testdir/x $testdir/y
-	_rename_tests_source_dest $testdir/x/src $testdir/y/dst "crossdir"
+	_rename_tests_source_dest $testdir/x/src $testdir/y/dst "crossdir" $flags
 	rmdir $testdir/x $testdir/y
 }
 

Any comments?

You can send xfstests patch to [email protected] next time.

Thanks,
Eryu

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/1
#3 lore raw
In reply to Wang Sheng-Hui
Quoted 5 lines · Wang Sheng-Hui

_rename_tests() records the 'flags' arg but doesn't pass it to _rename_tests_source_dest() in old code, thus any 'flags' to renameat2 is missed. Fix the missing.

Looks good to me.

Quoted 39 lines
---
 common/renameat2 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
common/renameat2 +3 -2
index a335169..df2df2e 100644
@@ -78,6 +78,7 @@ _rename_tests_source_dest()
 	local source=$1
 	local dest=$2
 	local options=$3
+	local flags=$4
 
 	for stype in none regu symb dire tree; do
 		for dtype in none regu symb dire tree; do
@@ -107,11 +108,11 @@ _rename_tests()
 	local flags=$2
 
 	#same directory renames
-	_rename_tests_source_dest $testdir/src $testdir/dst     "samedir "
+	_rename_tests_source_dest $testdir/src $testdir/dst     "samedir " $flags
 
 	#cross directory renames
 	mkdir $testdir/x $testdir/y
-	_rename_tests_source_dest $testdir/x/src $testdir/y/dst "crossdir"
+	_rename_tests_source_dest $testdir/x/src $testdir/y/dst "crossdir" $flags
 	rmdir $testdir/x $testdir/y
 }
 
Signature · 8 lines
2.1.2



_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs