Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 1 | From 85f164ec427fecbae24140b3c93acbbe2ba1c817 Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Tue, 13 Nov 2018 11:27:01 +0800 |
| 4 | Subject: [PATCH] testsuite: check uudecode before using it |
| 5 | |
| 6 | The unzip and tar test cases use uudecode command, so also |
| 7 | check it via optional function. |
| 8 | |
| 9 | Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2018-November/086833.html] |
| 10 | |
| 11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
| 12 | --- |
| 13 | testsuite/tar.tests | 2 +- |
| 14 | testsuite/unzip.tests | 2 +- |
| 15 | 2 files changed, 2 insertions(+), 2 deletions(-) |
| 16 | |
| 17 | diff --git a/testsuite/tar.tests b/testsuite/tar.tests |
| 18 | index d71a349..8c88567 100755 |
| 19 | --- a/testsuite/tar.tests |
| 20 | +++ b/testsuite/tar.tests |
| 21 | @@ -336,7 +336,7 @@ SKIP= |
| 22 | cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null |
| 23 | |
| 24 | mkdir tar.tempdir && cd tar.tempdir || exit 1 |
| 25 | -optional FEATURE_SEAMLESS_BZ2 FEATURE_TAR_AUTODETECT LS |
| 26 | +optional FEATURE_SEAMLESS_BZ2 FEATURE_TAR_AUTODETECT LS UUDECODE |
| 27 | testing "Symlink attack: create symlink and then write through it" '\ |
| 28 | exec 2>&1 |
| 29 | uudecode -o input && tar xvf input; echo $? |
| 30 | diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests |
| 31 | index af53de9..3b45ece 100755 |
| 32 | --- a/testsuite/unzip.tests |
| 33 | +++ b/testsuite/unzip.tests |
| 34 | @@ -31,7 +31,7 @@ rmdir foo |
| 35 | rm foo.zip |
| 36 | |
| 37 | # File containing some damaged encrypted stream |
| 38 | -optional FEATURE_UNZIP_CDF CONFIG_UNICODE_SUPPORT |
| 39 | +optional FEATURE_UNZIP_CDF CONFIG_UNICODE_SUPPORT UUDECODE |
| 40 | testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \ |
| 41 | "Archive: bad.zip |
| 42 | inflating: ]3j½r«I??K-%Ix |
| 43 | -- |
| 44 | 2.7.4 |
| 45 | |