From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radoslav Kolev Date: Mon, 21 Dec 2020 13:22:50 +0200 Subject: [LTP] [PATCH] unzip01.sh: Fix failure with BusyBox unzip Message-ID: <20201221112250.27944-1-radoslav.kolev@suse.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it BusyBox unzip uses the word 'inflating' instead of 'extracting'. Detect it and check for the correct match in the output. Signed-off-by: Radoslav Kolev --- testcases/commands/unzip/unzip01.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/testcases/commands/unzip/unzip01.sh b/testcases/commands/unzip/unzip01.sh index 750718de4..1b9a1665f 100755 --- a/testcases/commands/unzip/unzip01.sh +++ b/testcases/commands/unzip/unzip01.sh @@ -12,6 +12,14 @@ TST_NEEDS_TMPDIR=1 TST_NEEDS_CMDS="unzip" . tst_test.sh +EXTRACT_MATCH="" + +if unzip 2>&1 | grep -q 'BusyBox'; then + EXTRACT_MATCH="inflating" +else + EXTRACT_MATCH="extracting" +fi + setup() { cat > unzip_exp.out <