diff options
author | Ron Yorston <rmy@pobox.com> | 2023-01-05 08:56:27 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-01-05 08:56:27 +0000 |
commit | e5e4a2fec5435192d1672e6db2f335cb5e89f877 (patch) | |
tree | 08cb827a40817ea4824bc9336d57eda669c4d4b2 /testsuite | |
parent | 4343f3926355f55fc023203c992527fc34bf609e (diff) | |
parent | b1884deb514c35289d37e7bfbf23f770b0bd09b3 (diff) | |
download | busybox-w32-e5e4a2fec5435192d1672e6db2f335cb5e89f877.tar.gz busybox-w32-e5e4a2fec5435192d1672e6db2f335cb5e89f877.tar.bz2 busybox-w32-e5e4a2fec5435192d1672e6db2f335cb5e89f877.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/mount.tests | 14 | ||||
-rwxr-xr-x | testsuite/sha1sum.tests | 2 | ||||
-rwxr-xr-x | testsuite/tree.tests | 38 |
3 files changed, 35 insertions, 19 deletions
diff --git a/testsuite/mount.tests b/testsuite/mount.tests index b6d5ebe08..7370805cd 100755 --- a/testsuite/mount.tests +++ b/testsuite/mount.tests | |||
@@ -104,12 +104,24 @@ mount -r -o loop -t ext2 z1/e2img z2 || { echo 'mount -r -o loop error'; e | |||
104 | mount -o remount,ro z1 || { echo 'mount -o remount,ro error'; exit 1; } | 104 | mount -o remount,ro z1 || { echo 'mount -o remount,ro error'; exit 1; } |
105 | ) | 105 | ) |
106 | umount -d mount.dir/z2 | 106 | umount -d mount.dir/z2 |
107 | ##losetup -d /dev/loop* | 107 | ##sleep 0.1 |
108 | umount -d mount.dir/z1 | 108 | umount -d mount.dir/z1 |
109 | rm -rf mount.dir | 109 | rm -rf mount.dir |
110 | echo DONE | 110 | echo DONE |
111 | " \ | 111 | " \ |
112 | "DONE\n" "" "" | 112 | "DONE\n" "" "" |
113 | 113 | ||
114 | # On 5.18.0, "umount -d mount.dir/z1" above fails. | ||
115 | # (It would work with "sleep 0.1" - looks like z1/e2img | ||
116 | # is momentarily keeping z1 mountpoint busy, even though | ||
117 | # the "umount" which freed z1/e2img from being the base | ||
118 | # of z2 mountpoint has returned). | ||
119 | # Fixing the mess if it did fail: | ||
120 | if test -d mount.dir/z1; then | ||
121 | ls -ld mount.dir/z1/* mount.dir/z1 | ||
122 | sleep 1 | ||
123 | umount -d mount.dir/z1 | ||
124 | rmdir mount.dir/z1 mount.dir | ||
125 | fi | ||
114 | 126 | ||
115 | exit $FAILCOUNT | 127 | exit $FAILCOUNT |
diff --git a/testsuite/sha1sum.tests b/testsuite/sha1sum.tests index 7ad1334c3..e6ddb2a86 100755 --- a/testsuite/sha1sum.tests +++ b/testsuite/sha1sum.tests | |||
@@ -4,10 +4,12 @@ | |||
4 | 4 | ||
5 | # testing "test name" "cmd" "expected result" "file input" "stdin" | 5 | # testing "test name" "cmd" "expected result" "file input" "stdin" |
6 | >EMPTY | 6 | >EMPTY |
7 | optional FEATURE_MD5_SHA1_SUM_CHECK | ||
7 | testing "sha1sum: one-space separated input for -c" \ | 8 | testing "sha1sum: one-space separated input for -c" \ |
8 | 'echo "da39a3ee5e6b4b0d3255bfef95601890afd80709 EMPTY" | sha1sum -c' \ | 9 | 'echo "da39a3ee5e6b4b0d3255bfef95601890afd80709 EMPTY" | sha1sum -c' \ |
9 | "EMPTY: OK\n" \ | 10 | "EMPTY: OK\n" \ |
10 | "" "" | 11 | "" "" |
12 | SKIP= | ||
11 | rm EMPTY | 13 | rm EMPTY |
12 | 14 | ||
13 | . ./md5sum.tests sha1sum d41337e834377140ae7f98460d71d908598ef04f | 15 | . ./md5sum.tests sha1sum d41337e834377140ae7f98460d71d908598ef04f |
diff --git a/testsuite/tree.tests b/testsuite/tree.tests index 4f4a9e30b..1fa66da80 100755 --- a/testsuite/tree.tests +++ b/testsuite/tree.tests | |||
@@ -18,6 +18,8 @@ tree.tempdir [error opening dir]\n\ | |||
18 | mkdir -p tree2.tempdir | 18 | mkdir -p tree2.tempdir |
19 | touch tree2.tempdir/testfile | 19 | touch tree2.tempdir/testfile |
20 | 20 | ||
21 | optional UNICODE_SUPPORT | ||
22 | |||
21 | testing "tree single file" \ | 23 | testing "tree single file" \ |
22 | "cd tree2.tempdir && tree" \ | 24 | "cd tree2.tempdir && tree" \ |
23 | "\ | 25 | "\ |
@@ -50,17 +52,17 @@ testing "tree nested directories and files" \ | |||
50 | .\n\ | 52 | .\n\ |
51 | ├── test1\n\ | 53 | ├── test1\n\ |
52 | ├── test2\n\ | 54 | ├── test2\n\ |
53 | │ ├── a\n\ | 55 | │ ├── a\n\ |
54 | │ │ ├── testfile1\n\ | 56 | │ │ ├── testfile1\n\ |
55 | │ │ ├── testfile2\n\ | 57 | │ │ ├── testfile2\n\ |
56 | │ │ ├── testfile3\n\ | 58 | │ │ ├── testfile3\n\ |
57 | │ │ └── testfile4 -> ../b/testfile4\n\ | 59 | │ │ └── testfile4 -> ../b/testfile4\n\ |
58 | │ └── b\n\ | 60 | │ └── b\n\ |
59 | │ ├── test3 -> ../../test3\n\ | 61 | │ ├── test3 -> ../../test3\n\ |
60 | │ └── testfile4\n\ | 62 | │ └── testfile4\n\ |
61 | └── test3\n\ | 63 | └── test3\n\ |
62 | ├── c\n\ | 64 | ├── c\n\ |
63 | │ └── testfile5\n\ | 65 | │ └── testfile5\n\ |
64 | └── d\n\ | 66 | └── d\n\ |
65 | └── testfile6\n\ | 67 | └── testfile6\n\ |
66 | \n\ | 68 | \n\ |
@@ -77,17 +79,17 @@ tree2.tempdir\n\ | |||
77 | tree3.tempdir\n\ | 79 | tree3.tempdir\n\ |
78 | ├── test1\n\ | 80 | ├── test1\n\ |
79 | ├── test2\n\ | 81 | ├── test2\n\ |
80 | │ ├── a\n\ | 82 | │ ├── a\n\ |
81 | │ │ ├── testfile1\n\ | 83 | │ │ ├── testfile1\n\ |
82 | │ │ ├── testfile2\n\ | 84 | │ │ ├── testfile2\n\ |
83 | │ │ ├── testfile3\n\ | 85 | │ │ ├── testfile3\n\ |
84 | │ │ └── testfile4 -> ../b/testfile4\n\ | 86 | │ │ └── testfile4 -> ../b/testfile4\n\ |
85 | │ └── b\n\ | 87 | │ └── b\n\ |
86 | │ ├── test3 -> ../../test3\n\ | 88 | │ ├── test3 -> ../../test3\n\ |
87 | │ └── testfile4\n\ | 89 | │ └── testfile4\n\ |
88 | └── test3\n\ | 90 | └── test3\n\ |
89 | ├── c\n\ | 91 | ├── c\n\ |
90 | │ └── testfile5\n\ | 92 | │ └── testfile5\n\ |
91 | └── d\n\ | 93 | └── d\n\ |
92 | └── testfile6\n\ | 94 | └── testfile6\n\ |
93 | \n\ | 95 | \n\ |