[LTP] [LTP|PATCH] du: bug fix for testcase/du/du01.sh

Hongling Zeng zenghongling@kylinos.cn
Thu Oct 27 09:35:18 CEST 2022


The runltp interface test for command du report error :
du01 9 TFAIL: 'du -c' failed
du01 9 TINFO: Looking for '^10[2-3][0-9][0-9][[:space:]]total' in:
4	./testdir
4	./basedir
10256	.
10256	总用量
du01 10 TFAIL: 'du --total' failed

Add slective judgement for chinese command and fix this error.

Signed-off-by: zenghongling <zenghongling@kylinos.cn>
---
 testcases/commands/du/du01.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/commands/du/du01.sh b/testcases/commands/du/du01.sh
index 7977fd4..a9c4377 100755
--- a/testcases/commands/du/du01.sh
+++ b/testcases/commands/du/du01.sh
@@ -74,7 +74,7 @@ check2="^10[2-3][0-9][0-9][[:space:]]testfile"
 check3="^\(0\|${page_size}\)[[:space:]]\.\/testdir\/testsymlink"
 check5="^20[4-6][0-9][0-9][[:space:]]\."
 check7="^10[4-5][0-9][0-9]\{4\}[[:space:]]\."
-check9="^10[2-3][0-9][0-9][[:space:]]total"
+check9="^10[2-3][0-9][0-9][[:space:]][(总用量|total)]"
 check11="^10[2-3][0-9][0-9][[:space:]]testdir\/testsymlink"
 check14="^1[0,1]M[[:space:]]\."
 check16="^10[2-3][0-9][0-9][[:space:]]testdir\/"
-- 
2.1.0



More information about the ltp mailing list