file01.sh: Fix in was not recognized
PATCH v2 1/1 file01.sh: Fix in was not recognized
From: He Zhe <[email protected]>
Some file has "pie" appending after LSB or MSB, which causes mismatch and the following error.
"file01 10 TFAIL: in: was not recognized"
..."ELF 64-bit LSB pie executable"...
This patches tunes the regulation expression to include those cases.
---
v1 to v2: split into two groups to just match the encountered case
testcases/commands/file/file01.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
testcases/commands/file/file01.sh +3 -1
@@ -91,7 +91,9 @@ do_test() 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, .*" \ - "ELF .*-bit $TEST_ARCH shared object, .*";; + "ELF .*-bit $TEST_ARCH shared object, .*" \ + "ELF .*-bit $TEST_ARCH pie executable, .*" \ + "ELF .*-bit $TEST_ARCH pie shared object, .*";; 11) file_test in.ar "current ar archive";; 12) file_test in.tar "tar archive";; 13) file_test in.tar.gz "gzip compressed data, .*";;
Signature · 1 line
2.7.4
PATCH v2 1/1 file01.sh: Fix in was not recognized
Quoted 22 lines · On 2019/04/22 16:35, [email protected] wrote:
From: He Zhe<[email protected]>
Some file has "pie" appending after LSB or MSB, which causes mismatch and the following error.
"file01 10 TFAIL: in: was not recognized"
..."ELF 64-bit LSB pie executable"...This patches tunes the regulation expression to include those cases.
Signed-off-by He Zhe<[email protected]>---
v1 to v2: split into two groups to just match the encountered casetestcases/commands/file/file01.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)testcases/commands/file/file01.sh +0
-0
testcases/commands/file/file01.sh do_test() · line 96
Quoted 7 lines
testcases/commands/file/file01.sh +3
-1@@ -91,7 +91,9 @@ do_test() 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, .*" \ - "ELF .*-bit $TEST_ARCH shared object, .*";; + "ELF .*-bit $TEST_ARCH shared object, .*" \ + "ELF .*-bit $TEST_ARCH pie executable, .*" \ + "ELF .*-bit $TEST_ARCH pie shared object, .*";;
Hi He,
Perhap, it's simpler to use the ‘.*’regexp directly as your first patch does:
-----------------------------------------------------------------------
- 10) file_test in "ELF .*-bit $TEST_ARCH executable, .*" \
- "ELF .*-bit $TEST_ARCH shared object, .*";;
+ 10) file_test in "ELF .*-bit $TEST_ARCH .*executable, .*" \
+ "ELF .*-bit $TEST_ARCH .*shared object, .*";;
-----------------------------------------------------------------------
Best Regards,
Xiao Yang
Quoted 3 lines
testcases/commands/file/file01.sh +0
-011) file_test in.ar "current ar archive";; 12) file_test in.tar "tar archive";; 13) file_test in.tar.gz "gzip compressed data, .*";;
PATCH v2 1/1 file01.sh: Fix in was not recognized
Quoted 35 lines · Xiao Yang
Quoted 22 lines · On 2019/04/22 16:35, [email protected] wrote:
From: He Zhe<[email protected]>
Some file has "pie" appending after LSB or MSB, which causes mismatch and the following error.
"file01 10 TFAIL: in: was not recognized"
..."ELF 64-bit LSB pie executable"...This patches tunes the regulation expression to include those cases.
Signed-off-by He Zhe<[email protected]>---
v1 to v2: split into two groups to just match the encountered case
testcases/commands/file/file01.sh| 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)testcases/commands/file/file01.sh +0
-0testcases/commands/file/file01.sh do_test() · line 96
Quoted 7 lines
testcases/commands/file/file01.sh +3
-1@@ -91,7 +91,9 @@ do_test() 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, .*" \ - "ELF .*-bit $TEST_ARCH shared object, .*";; + "ELF .*-bit $TEST_ARCH shared object, .*" \ + "ELF .*-bit $TEST_ARCH pie executable, .*" \ + "ELF .*-bit $TEST_ARCH pie shared object, .*";;Hi He,
Perhap, it's simpler to use the ‘.*’regexp directly as your first patch does:
-----------------------------------------------------------------------
Quoted 6 lines
- 10)
file_testin "ELF .*-bit $TEST_ARCH executable, .*" \
- "ELF .*-bit $TEST_ARCH shared object, .*";; + 10)file_testin "ELF .*-bit $TEST_ARCH .*executable, .*" \
+ "ELF .*-bit $TEST_ARCH .*shared object, .*";;-----------------------------------------------------------------------
Not exactly, now it can match 4 different cases.
Zhe
Quoted 10 lines
Best Regards,
Xiao YangQuoted 3 lines
testcases/commands/file/file01.sh +0
-011) file_test in.ar "current ar archive";; 12) file_test in.tar "tar archive";; 13) file_test in.tar.gz "gzip compressed data, .*";;
PATCH v2 1/1 file01.sh: Fix in was not recognized
Hi Zhe,
I am sorry for the late reply. Thanks for your pacth and pushed.
BTW:
I try to think about simplifying all keywords by extended regular expression.
(e.g. use (pie )? to match your encountered keywords).
Best Regards,
Xiao Yang
Quoted 59 lines · He Zhe
Quoted 35 lines · Xiao Yang
Quoted 22 lines · On 2019/04/22 16:35, [email protected] wrote:
From: He Zhe<[email protected]>
Some file has "pie" appending after LSB or MSB, which causes mismatch and the following error.
"file01 10 TFAIL: in: was not recognized"
..."ELF 64-bit LSB pie executable"...This patches tunes the regulation expression to include those cases.
Signed-off-by He Zhe<[email protected]>---
v1 to v2: split into two groups to just match the encountered casetestcases/commands/file/file01.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)testcases/commands/file/file01.sh +0
-0testcases/commands/file/file01.sh do_test() · line 96
Quoted 7 lines
testcases/commands/file/file01.sh +3
-1@@ -91,7 +91,9 @@ do_test() 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, .*" \ - "ELF .*-bit $TEST_ARCH shared object, .*";; + "ELF .*-bit $TEST_ARCH shared object, .*" \ + "ELF .*-bit $TEST_ARCH pie executable, .*" \ + "ELF .*-bit $TEST_ARCH pie shared object, .*";;Hi He,
Perhap, it's simpler to use the ‘.*’regexp directly as your first patch does:
-----------------------------------------------------------------------Review
Quoted 6 lines
(quoted diff) +2
-3- 10) file_test in "ELF .*-bit $TEST_ARCH executable, .*" \ - "ELF .*-bit $TEST_ARCH shared object, .*";; + 10) file_test in "ELF .*-bit $TEST_ARCH .*executable, .*" \ + "ELF .*-bit $TEST_ARCH .*shared object, .*";; -----------------------------------------------------------------------Not exactly, now it can match 4 different cases.
Zhe
Quoted 8 lines
Best Regards,
Xiao YangQuoted 3 lines
testcases/commands/file/file01.sh +0
-011) file_test in.ar "current ar archive";; 12) file_test in.tar "tar archive";; 13) file_test in.tar.gz "gzip compressed data, .*";;.