[LTP] [PATCH 2/2] commands/file01: Fix "python3" match failure

Xiao Yang yangx.jy@cn.fujitsu.com
Thu Apr 26 08:45:37 CEST 2018


On some distros(e.g. RHEL6.9GA), we got the mismatched
output by running 'file in.py':
----------------------------------------------
in.py: a /usr/bin/env python3 script text executable
----------------------------------------------

We just match both python and python3 to fix this issue.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 testcases/commands/file/file01.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/commands/file/file01.sh b/testcases/commands/file/file01.sh
index e04b32e..5a81b3b 100755
--- a/testcases/commands/file/file01.sh
+++ b/testcases/commands/file/file01.sh
@@ -84,8 +84,8 @@ do_test()
 	 7) file_test in.pl "[pP]erl script, ASCII text executable" \
 			    "[pP]erl script text executable" \
 			    "a /usr/bin/perl script text";;
-	 8) file_test in.py "[pP]ython script, ASCII text executable" \
-			    "[pP]ython script text executable";;
+	 8) file_test in.py "[pP]ython3\{0,1\} script, ASCII text executable" \
+			    "[pP]ython3\{0,1\} script text executable";;
 	 9) file_test in.m4 "M4 macro processor script, ASCII text" \
 			    "ASCII M4 macro language pre-processor text";;
 	10) file_test in "ELF .*-bit $TEST_ARCH executable, .*" \
-- 
1.8.3.1





More information about the ltp mailing list