summaryrefslogtreecommitdiff
path: root/release/src/router/busybox/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'release/src/router/busybox/testsuite')
-rw-r--r--release/src/router/busybox/testsuite/README4
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/TODO28
-rwxr-xr-xrelease/src/router/busybox/testsuite/all_sourcecode.tests92
-rwxr-xr-xrelease/src/router/busybox/testsuite/awk.tests50
-rw-r--r--release/src/router/busybox/testsuite/awk_t1.tar.bz2bin0 -> 15955 bytes
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/basename/basename-does-not-remove-identical-extension0
-rw-r--r--release/src/router/busybox/testsuite/basename/basename-works2
-rwxr-xr-xrelease/src/router/busybox/testsuite/bunzip2.tests524
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/bunzip2/bunzip2-reads-from-standard-input0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/bunzip2/bunzip2-removes-compressed-file0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/bunzip2/bzcat-does-not-remove-compressed-file0
-rwxr-xr-xrelease/src/router/busybox/testsuite/busybox.tests46
-rwxr-xr-xrelease/src/router/busybox/testsuite/bzcat.tests49
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/cat/cat-prints-a-file0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/cat/cat-prints-a-file-and-standard-input0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/cmp/cmp-detects-difference8
-rwxr-xr-xrelease/src/router/busybox/testsuite/comm.tests19
-rw-r--r--release/src/router/busybox/testsuite/cp/cp-RHL-does_not_preserve-links6
-rw-r--r--release/src/router/busybox/testsuite/cp/cp-a-files-to-dir15
-rw-r--r--release/src/router/busybox/testsuite/cp/cp-a-preserves-links5
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/cp/cp-copies-empty-file0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/cp/cp-copies-large-file0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/cp/cp-copies-small-file0
-rw-r--r--release/src/router/busybox/testsuite/cp/cp-d-files-to-dir11
-rw-r--r--release/src/router/busybox/testsuite/cp/cp-dev-file2
-rw-r--r--release/src/router/busybox/testsuite/cp/cp-dir-create-dir4
-rw-r--r--release/src/router/busybox/testsuite/cp/cp-dir-existing-dir5
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/cp/cp-does-not-copy-unreadable-file9
-rw-r--r--release/src/router/busybox/testsuite/cp/cp-files-to-dir11
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/cp/cp-follows-links0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/cp/cp-preserves-hard-links0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/cp/cp-preserves-links1
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/cp/cp-preserves-source-file0
-rwxr-xr-xrelease/src/router/busybox/testsuite/cpio.tests83
-rwxr-xr-xrelease/src/router/busybox/testsuite/cut.tests18
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/cut/cut-cuts-a-character0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/cut/cut-cuts-a-closed-range0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/cut/cut-cuts-a-field0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/cut/cut-cuts-an-open-range0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/cut/cut-cuts-an-unclosed-range0
-rw-r--r--release/src/router/busybox/testsuite/date/date-R-works1
-rw-r--r--release/src/router/busybox/testsuite/date/date-format-works4
-rw-r--r--release/src/router/busybox/testsuite/date/date-u-works1
-rw-r--r--release/src/router/busybox/testsuite/date/date-works44
-rw-r--r--release/src/router/busybox/testsuite/date/date-works-1129
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/dd/dd-accepts-if0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/dd/dd-accepts-of0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/dd/dd-copies-from-standard-input-to-standard-output0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/dd/dd-prints-count-to-standard-error0
-rw-r--r--release/src/router/busybox/testsuite/dd/dd-reports-write-errors2
-rwxr-xr-xrelease/src/router/busybox/testsuite/diff.tests124
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/dirname/dirname-handles-absolute-path0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/dirname/dirname-handles-empty-path0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/dirname/dirname-handles-multiple-slashes0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/dirname/dirname-handles-relative-path0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/dirname/dirname-handles-root0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/dirname/dirname-handles-single-component0
-rw-r--r--release/src/router/busybox/testsuite/dirname/dirname-works2
-rw-r--r--release/src/router/busybox/testsuite/du/du-h-works4
-rw-r--r--release/src/router/busybox/testsuite/du/du-k-works4
-rw-r--r--release/src/router/busybox/testsuite/du/du-l-works4
-rw-r--r--release/src/router/busybox/testsuite/du/du-m-works4
-rw-r--r--release/src/router/busybox/testsuite/du/du-s-works4
-rw-r--r--release/src/router/busybox/testsuite/du/du-works4
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/echo/echo-does-not-print-newline0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/echo/echo-prints-argument2
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/echo/echo-prints-arguments0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/echo/echo-prints-newline0
-rw-r--r--release/src/router/busybox/testsuite/echo/echo-prints-slash-zero1
-rwxr-xr-xrelease/src/router/busybox/testsuite/expand.tests15
-rw-r--r--release/src/router/busybox/testsuite/expand/expand-works-like-GNU18
-rw-r--r--release/src/router/busybox/testsuite/expr/expr-big16
-rw-r--r--release/src/router/busybox/testsuite/expr/expr-works59
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/false/false-is-silent0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/false/false-returns-failure0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/find/find-supports-minus-xdev1
-rwxr-xr-xrelease/src/router/busybox/testsuite/grep.tests88
-rwxr-xr-xrelease/src/router/busybox/testsuite/grep/egrep-is-not-case-insensitive2
-rwxr-xr-xrelease/src/router/busybox/testsuite/grep/egrep-supports-extended-regexps2
-rwxr-xr-xrelease/src/router/busybox/testsuite/grep/grep-handles-binary-files1
-rwxr-xr-xrelease/src/router/busybox/testsuite/grep/grep-handles-multiple-regexps1
-rwxr-xr-xrelease/src/router/busybox/testsuite/grep/grep-is-also-egrep2
-rwxr-xr-xrelease/src/router/busybox/testsuite/grep/grep-matches-NUL2
-rwxr-xr-xrelease/src/router/busybox/testsuite/gunzip.tests3
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/gunzip/gunzip-reads-from-standard-input0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/gzip/gzip-accepts-multiple-files0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/gzip/gzip-accepts-single-minus0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/gzip/gzip-removes-original-file0
-rw-r--r--release/src/router/busybox/testsuite/head/head-n-works4
-rw-r--r--release/src/router/busybox/testsuite/head/head-works4
-rw-r--r--release/src/router/busybox/testsuite/hostid/hostid-works2
-rw-r--r--release/src/router/busybox/testsuite/hostname/hostname-d-works2
-rw-r--r--release/src/router/busybox/testsuite/hostname/hostname-i-works2
-rw-r--r--release/src/router/busybox/testsuite/hostname/hostname-s-works1
-rw-r--r--release/src/router/busybox/testsuite/hostname/hostname-works1
-rw-r--r--release/src/router/busybox/testsuite/id/id-g-works1
-rw-r--r--release/src/router/busybox/testsuite/id/id-u-works1
-rw-r--r--release/src/router/busybox/testsuite/id/id-un-works1
-rw-r--r--release/src/router/busybox/testsuite/id/id-ur-works1
-rw-r--r--release/src/router/busybox/testsuite/ln/ln-creates-hard-links4
-rw-r--r--release/src/router/busybox/testsuite/ln/ln-creates-soft-links4
-rw-r--r--release/src/router/busybox/testsuite/ln/ln-force-creates-hard-links5
-rw-r--r--release/src/router/busybox/testsuite/ln/ln-force-creates-soft-links5
-rw-r--r--release/src/router/busybox/testsuite/ln/ln-preserves-hard-links8
-rw-r--r--release/src/router/busybox/testsuite/ln/ln-preserves-soft-links9
-rw-r--r--release/src/router/busybox/testsuite/ls/ls-1-works4
-rw-r--r--release/src/router/busybox/testsuite/ls/ls-h-works4
-rw-r--r--release/src/router/busybox/testsuite/ls/ls-l-works4
-rw-r--r--release/src/router/busybox/testsuite/ls/ls-s-works4
-rw-r--r--release/src/router/busybox/testsuite/makedevs.device_table.txt172
-rwxr-xr-xrelease/src/router/busybox/testsuite/makedevs.tests139
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/md5sum/md5sum-verifies-non-binary-file0
-rwxr-xr-xrelease/src/router/busybox/testsuite/mdev.tests143
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/mkdir/mkdir-makes-a-directory0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/mkdir/mkdir-makes-parent-directories0
-rwxr-xr-xrelease/src/router/busybox/testsuite/mkfs.minix.tests22
-rwxr-xr-xrelease/src/router/busybox/testsuite/mount.testroot183
-rwxr-xr-xrelease/src/router/busybox/testsuite/mount.tests35
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/msh/msh-supports-underscores-in-variable-names0
-rw-r--r--release/src/router/busybox/testsuite/mv/mv-files-to-dir16
-rw-r--r--release/src/router/busybox/testsuite/mv/mv-follows-links4
-rw-r--r--release/src/router/busybox/testsuite/mv/mv-moves-empty-file4
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/mv/mv-moves-file0
-rw-r--r--release/src/router/busybox/testsuite/mv/mv-moves-hardlinks4
-rw-r--r--release/src/router/busybox/testsuite/mv/mv-moves-large-file4
-rw-r--r--release/src/router/busybox/testsuite/mv/mv-moves-small-file4
-rw-r--r--release/src/router/busybox/testsuite/mv/mv-moves-symlinks6
-rw-r--r--release/src/router/busybox/testsuite/mv/mv-moves-unreadable-files5
-rw-r--r--release/src/router/busybox/testsuite/mv/mv-preserves-hard-links6
-rw-r--r--release/src/router/busybox/testsuite/mv/mv-preserves-links5
-rw-r--r--release/src/router/busybox/testsuite/mv/mv-refuses-mv-dir-to-subdir23
-rw-r--r--release/src/router/busybox/testsuite/mv/mv-removes-source-file4
-rwxr-xr-xrelease/src/router/busybox/testsuite/od.tests17
-rwxr-xr-xrelease/src/router/busybox/testsuite/parse.tests109
-rwxr-xr-xrelease/src/router/busybox/testsuite/patch.tests65
-rwxr-xr-xrelease/src/router/busybox/testsuite/pidof.tests31
-rwxr-xr-xrelease/src/router/busybox/testsuite/printf.tests108
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/pwd/pwd-prints-working-directory2
-rwxr-xr-xrelease/src/router/busybox/testsuite/readlink.tests32
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/rm/rm-removes-file0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/rmdir/rmdir-removes-parent-directories0
-rwxr-xr-xrelease/src/router/busybox/testsuite/runtest185
-rwxr-xr-xrelease/src/router/busybox/testsuite/sed.tests210
-rwxr-xr-xrelease/src/router/busybox/testsuite/sed/sed-accepts-blanks-before-command1
-rwxr-xr-xrelease/src/router/busybox/testsuite/sed/sed-aic-commands134
-rwxr-xr-xrelease/src/router/busybox/testsuite/sed/sed-chains-substs1
-rwxr-xr-xrelease/src/router/busybox/testsuite/sed/sed-does-not-substitute-in-deleted-line2
-rwxr-xr-xrelease/src/router/busybox/testsuite/sed/sed-handles-embedded-slashes1
-rwxr-xr-xrelease/src/router/busybox/testsuite/sed/sed-handles-empty-lines1
-rwxr-xr-xrelease/src/router/busybox/testsuite/sed/sed-handles-unsatisfied-backrefs6
-rwxr-xr-xrelease/src/router/busybox/testsuite/sed/sed-prints-line-once-for-multiple-substs4
-rwxr-xr-xrelease/src/router/busybox/testsuite/sed/sed-recurses-properly2
-rwxr-xr-xrelease/src/router/busybox/testsuite/sed/sed-requires-newline-after-edit-command1
-rwxr-xr-xrelease/src/router/busybox/testsuite/sed/sed-splits-edit-commands-on-command-line9
-rwxr-xr-xrelease/src/router/busybox/testsuite/seq.tests41
-rwxr-xr-xrelease/src/router/busybox/testsuite/sort.tests119
-rwxr-xr-xrelease/src/router/busybox/testsuite/start-stop-daemon.tests19
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/strings/strings-works-like-GNU7
-rwxr-xr-xrelease/src/router/busybox/testsuite/sum.tests24
-rw-r--r--release/src/router/busybox/testsuite/tail/tail-n-works4
-rw-r--r--release/src/router/busybox/testsuite/tail/tail-works4
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/tar/tar-archives-multiple-files0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/tar/tar-complains-about-missing-file1
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/tar/tar-demands-at-least-one-ctx0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/tar/tar-demands-at-most-one-ctx0
-rw-r--r--release/src/router/busybox/testsuite/tar/tar-extracts-all-subdirs12
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/tar/tar-extracts-file0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/tar/tar-extracts-from-standard-input0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/tar/tar-extracts-multiple-files5
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/tar/tar-extracts-to-standard-output0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/tar/tar-handles-cz-options3
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list3
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/tar/tar-handles-exclude-and-extract-lists3
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/tar/tar-handles-multiple-X-options2
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/tar/tar-handles-nested-exclude3
-rw-r--r--release/src/router/busybox/testsuite/tar/tar_with_link_with_size29
-rw-r--r--release/src/router/busybox/testsuite/tar/tar_with_prefix_fields261
-rwxr-xr-xrelease/src/router/busybox/testsuite/taskset.tests17
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/tee/tee-appends-input0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/tee/tee-tees-input0
-rwxr-xr-xrelease/src/router/busybox/testsuite/test.tests79
-rwxr-xr-xrelease/src/router/busybox/testsuite/testing.sh154
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/touch/touch-creates-file0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/touch/touch-does-not-create-file0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/touch/touch-touches-files-after-non-existent-file0
-rw-r--r--release/src/router/busybox/testsuite/tr.tests31
-rw-r--r--release/src/router/busybox/testsuite/tr/tr-d-alnum-works4
-rw-r--r--release/src/router/busybox/testsuite/tr/tr-d-works4
-rw-r--r--release/src/router/busybox/testsuite/tr/tr-non-gnu1
-rw-r--r--release/src/router/busybox/testsuite/tr/tr-rejects-wrong-class19
-rw-r--r--release/src/router/busybox/testsuite/tr/tr-works26
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/true/true-is-silent0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/true/true-returns-success0
-rwxr-xr-xrelease/src/router/busybox/testsuite/umlwrapper.sh20
-rwxr-xr-xrelease/src/router/busybox/testsuite/unexpand.tests30
-rw-r--r--release/src/router/busybox/testsuite/unexpand/unexpand-works-like-GNU52
-rwxr-xr-xrelease/src/router/busybox/testsuite/uniq.tests87
-rwxr-xr-xrelease/src/router/busybox/testsuite/unzip.tests38
-rw-r--r--release/src/router/busybox/testsuite/uptime/uptime-works2
-rwxr-xr-xrelease/src/router/busybox/testsuite/uuencode.tests28
-rwxr-xr-xrelease/src/router/busybox/testsuite/uuencode/uuencode-sets-standard-input-mode-correctly6
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/wc/wc-counts-all3
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/wc/wc-counts-characters0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/wc/wc-counts-lines0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/wc/wc-counts-words0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/wc/wc-prints-longest-line-length0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/wget/wget--O-overrides--P0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/wget/wget-handles-empty-path0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/wget/wget-retrieves-google-index0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/wget/wget-supports--P0
-rw-r--r--[-rwxr-xr-x]release/src/router/busybox/testsuite/which/which-uses-default-path3
-rwxr-xr-xrelease/src/router/busybox/testsuite/xargs.tests29
-rw-r--r--release/src/router/busybox/testsuite/xargs/xargs-works4
213 files changed, 4209 insertions, 275 deletions
diff --git a/release/src/router/busybox/testsuite/README b/release/src/router/busybox/testsuite/README
index 40439bfe..b4719e64 100644
--- a/release/src/router/busybox/testsuite/README
+++ b/release/src/router/busybox/testsuite/README
@@ -1,7 +1,9 @@
To run the test suite, change to this directory and run "./runtest". It will
run all of the test cases, and list those with unexpected outcomes. Adding the
-v option will cause it to show expected outcomes as well. To only run the test
-cases for particular applets, specify them as parameters to runtest.
+cases for particular applets:
+
+./runtest <applet1> <applet2>...
The test cases for an applet reside in the subdirectory of the applet name. The
name of the test case should be the assertion that is tested. The test case
diff --git a/release/src/router/busybox/testsuite/TODO b/release/src/router/busybox/testsuite/TODO
index ced57159..b8957f48 100755..100644
--- a/release/src/router/busybox/testsuite/TODO
+++ b/release/src/router/busybox/testsuite/TODO
@@ -2,17 +2,25 @@ This testsuite is quite obviously a work in progress. As such,
there are a number of good extensions. If you are looking for
something to do, feel free to tackle one or more of the following:
-Buildroot support
- Erik has put together a handy package for constructing and
- testing busybox called buildroot. Integrating this into
- the testsuite would allow for greater test coverage (e.g.,
- init, mount, and other privileged applications).
+Moving to the new format.
+ The old way was "lots of little tests files in a directory", which
+ doesn't interact well with source control systems. The new test
+ format is command.tests files that use testing.sh.
+
+Every busybox applet needs a corresponding applet.tests.
+
+Full SUSv3 test suite.
+ Let's make the Linux Test Project jealous, shall we? Don't just
+ audit programs for standards compliance, _prove_ it with a regression
+ test harness.
+
+ http://www.opengroup.org/onlinepubs/009695399/utilities/
+
+Some tests need root access.
+ It's hard to test things like mount or init as a normal user.
+ Possibly User Mode Linux could be used for this, or perhaps
+ Erik's buildroot.
libbb unit testing
Being able to test the functions of libbb individually may
help to prevent regressions.
-
-Standardization
- This testsuite is totally bastardized. It would be better
- to use an existing test framework, such as dejagnu, greg,
- or a XUnit clone (shunit?).
diff --git a/release/src/router/busybox/testsuite/all_sourcecode.tests b/release/src/router/busybox/testsuite/all_sourcecode.tests
new file mode 100755
index 00000000..45f40112
--- /dev/null
+++ b/release/src/router/busybox/testsuite/all_sourcecode.tests
@@ -0,0 +1,92 @@
+#!/bin/sh
+
+# Tests for the sourcecode base itself.
+# Copyright 2006 by Mike Frysinger <vapier@gentoo.org>
+# Licensed under GPL v2, see file LICENSE for details.
+
+[ -n "$srcdir" ] || srcdir=$(pwd)
+. testing.sh
+
+
+#
+# if we don't have the sourcecode available, let's just bail
+#
+[ -s "$srcdir/../Makefile" ] || exit 0
+[ -s "$srcdir/../include/applets.h" ] || exit 0
+
+
+#
+# make sure all usage strings are properly escaped. oftentimes people miss
+# an escape sequence so we end up with:
+# #define foo_usage \
+# " this line is ok" \
+# " as is this line"
+# " but this one is broken as the \ is missing from above"
+#
+${CROSS_COMPILE}cpp -dD -P $srcdir/../include/usage.h \
+ | sed -e '/^#define/d' -e '/^$/d' > src.usage.escaped
+testing "Usage strings escaped" "cat src.usage.escaped" "" "" ""
+rm -f src.usage.escaped
+
+
+#
+# verify the applet order is correct in applets.h, otherwise
+# applets won't be called properly.
+#
+sed -n -e '/^USE_[A-Z]*(APPLET/{s:,.*::;s:.*(::;s:"::g;p}' \
+ $srcdir/../include/applets.h > applet.order.current
+LC_ALL=C sort applet.order.current > applet.order.correct
+testing "Applet order" "diff -u applet.order.current applet.order.correct" "" "" ""
+rm -f applet.order.current applet.order.correct
+
+
+#
+# check for misc common typos
+#
+find $srcdir/../ \
+ '(' -type d -a '(' -name .svn -o -name testsuite ')' -prune ')' \
+ -o '(' -type f -a -print0 ')' | xargs -0 \
+ grep -I \
+ -e '\<compatability\>' \
+ -e '\<compatable\>' \
+ -e '\<fordeground\>' \
+ -e '\<depency\>' -e '\<dependancy\>' -e '\<dependancies\>' \
+ -e '\<defalt\>' \
+ -e '\<remaing\>' \
+ -e '\<queueing\>' \
+ -e '\<detatch\>' \
+ -e '\<sempahore\>' \
+ -e '\<reprenstative\>' \
+ -e '\<overriden\>' \
+ -e '\<readed\>' \
+ -e '\<formated\>' \
+ -e '\<algorithic\>' \
+ -e '\<deamon\>' \
+ -e '\<derefernce\>' \
+ -e '\<acomadate\>' \
+ | sed -e "s:^$srcdir/\.\./::g" > src.typos
+testing "Common typos" "cat src.typos" "" "" ""
+rm -f src.typos
+
+
+#
+# don't allow obsolete functions
+#
+find $srcdir/.. '(' -name '*.c' -o -name '*.h' ')' -print0 | xargs -0 \
+ grep -E -e '\<(bcmp|bcopy|bzero|getwd|index|mktemp|rindex|utimes|sigblock|siggetmask|sigsetmask)\>[[:space:]]*\(' \
+ | sed -e "s:^$srcdir/\.\./::g" > src.obsolete.funcs
+testing "Obsolete function usage" "cat src.obsolete.funcs" "" "" ""
+rm -f src.obsolete.funcs
+
+
+#
+# don't allow obsolete headers
+#
+find $srcdir/.. '(' -name '*.c' -o -name '*.h' ')' -print0 | xargs -0 \
+ grep -E -e '\<(malloc|memory|sys/(errno|fcntl|signal|stropts|termios|unistd))\.h\>' \
+ | sed -e "s:^$srcdir/\.\./::g" > src.obsolete.headers
+testing "Obsolete headers" "cat src.obsolete.headers" "" "" ""
+rm -f src.obsolete.headers
+
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/awk.tests b/release/src/router/busybox/testsuite/awk.tests
new file mode 100755
index 00000000..0db99ab2
--- /dev/null
+++ b/release/src/router/busybox/testsuite/awk.tests
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com>
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# testing "description" "command" "result" "infile" "stdin"
+
+testing "awk -F case 0" "awk -F '[#]' '{ print NF }'" "" "" ""
+testing "awk -F case 1" "awk -F '[#]' '{ print NF }'" "0\n" "" "\n"
+testing "awk -F case 2" "awk -F '[#]' '{ print NF }'" "2\n" "" "#\n"
+testing "awk -F case 3" "awk -F '[#]' '{ print NF }'" "3\n" "" "#abc#\n"
+testing "awk -F case 4" "awk -F '[#]' '{ print NF }'" "3\n" "" "#abc#zz\n"
+testing "awk -F case 5" "awk -F '[#]' '{ print NF }'" "4\n" "" "#abc##zz\n"
+testing "awk -F case 6" "awk -F '[#]' '{ print NF }'" "4\n" "" "z#abc##zz\n"
+testing "awk -F case 7" "awk -F '[#]' '{ print NF }'" "5\n" "" "z##abc##zz\n"
+
+# 4294967295 = 0xffffffff
+testing "awk bitwise op" "awk '{ print or(4294967295,1) }'" "4.29497e+09\n" "" "\n"
+testing "awk hex const 1" "awk '{ print or(0xffffffff,1) }'" "4.29497e+09\n" "" "\n"
+testing "awk hex const 2" "awk '{ print or(0x80000000,1) }'" "2.14748e+09\n" "" "\n"
+testing "awk oct const" "awk '{ print or(01234,1) }'" "669\n" "" "\n"
+
+# long field seps requiring regex
+testing "awk long field sep" "awk -F-- '{ print NF, length(\$NF), \$NF }'" \
+ "2 0 \n3 0 \n4 0 \n5 0 \n" \
+ "" \
+ "a--\na--b--\na--b--c--\na--b--c--d--"
+
+# '@(samp|code|file)\{' is an invalid extended regex (unmatched '{'),
+# but gawk 3.1.5 does not bail out on it.
+testing "awk gsub falls back to non-extended-regex" \
+ "awk 'gsub(\"@(samp|code|file)\{\",\"\");'; echo \$?" "0\n" "" "Hi\n"
+
+tar xjf awk_t1.tar.bz2
+testing "awk 'gcc build bug'" \
+ "awk -f awk_t1_opt-functions.awk -f awk_t1_opth-gen.awk <awk_t1_input | md5sum" \
+ "f842e256461a5ab1ec60b58d16f1114f -\n" \
+ "" ""
+rm -rf awk_t1_*
+
+Q='":"'
+
+testing "awk NF in BEGIN" \
+ "awk 'BEGIN { print ${Q} NF ${Q} \$0 ${Q} \$1 ${Q} \$2 ${Q} }'" \
+ ":0::::\n" \
+ "" ""
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/awk_t1.tar.bz2 b/release/src/router/busybox/testsuite/awk_t1.tar.bz2
new file mode 100644
index 00000000..0fb8a074
--- /dev/null
+++ b/release/src/router/busybox/testsuite/awk_t1.tar.bz2
Binary files differ
diff --git a/release/src/router/busybox/testsuite/basename/basename-does-not-remove-identical-extension b/release/src/router/busybox/testsuite/basename/basename-does-not-remove-identical-extension
index 4448fdec..4448fdec 100755..100644
--- a/release/src/router/busybox/testsuite/basename/basename-does-not-remove-identical-extension
+++ b/release/src/router/busybox/testsuite/basename/basename-does-not-remove-identical-extension
diff --git a/release/src/router/busybox/testsuite/basename/basename-works b/release/src/router/busybox/testsuite/basename/basename-works
new file mode 100644
index 00000000..38907d4c
--- /dev/null
+++ b/release/src/router/busybox/testsuite/basename/basename-works
@@ -0,0 +1,2 @@
+test x$(basename $(pwd)) = x$(busybox basename $(pwd))
+
diff --git a/release/src/router/busybox/testsuite/bunzip2.tests b/release/src/router/busybox/testsuite/bunzip2.tests
new file mode 100755
index 00000000..3105ba4a
--- /dev/null
+++ b/release/src/router/busybox/testsuite/bunzip2.tests
@@ -0,0 +1,524 @@
+#!/bin/sh
+# Used by both gunzip and bunzip2 tests
+
+if test "${0##*/}" = "gunzip.tests"; then
+ unpack=gunzip
+ ext=gz
+elif test "${0##*/}" = "bunzip2.tests"; then
+ unpack=bunzip2
+ ext=bz2
+else
+ echo "WTF? argv0='$0'"
+ exit 1
+fi
+
+bb="busybox "
+
+unset LC_ALL
+unset LC_MESSAGES
+unset LANG
+unset LANGUAGE
+
+hello_gz() {
+# Gzipped "HELLO\n"
+#_________________________ vvv vvv vvv vvv - mtime
+$ECHO -ne "\x1f\x8b\x08\x00\x85\x1d\xef\x45\x02\x03\xf3\x70\xf5\xf1\xf1\xe7"
+$ECHO -ne "\x02\x00\x6e\xd7\xac\xfd\x06\x00\x00\x00"
+}
+
+hello_bz2() {
+# Bzipped "HELLO\n"
+$ECHO -ne "\x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\x5b\xb8\xe8\xa3\x00\x00"
+$ECHO -ne "\x01\x44\x00\x00\x10\x02\x44\xa0\x00\x30\xcd\x00\xc3\x46\x29\x97"
+$ECHO -ne "\x17\x72\x45\x38\x50\x90\x5b\xb8\xe8\xa3"
+}
+
+# We had bunzip2 error on this .bz2 file (fixed in rev 22521)
+test1_bz2()
+{
+$ECHO -ne "\x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\xbf\x4b\x95\xe7\x00\x15"
+$ECHO -ne "\xa1\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"
+$ECHO -ne "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xef\xff\xff\xfb\xff\xff\xff"
+$ECHO -ne "\xff\xff\xff\xe0\x16\xe6\x37\xb7\x77\xb0\xfb\x22\xb5\x81\x40\xf5"
+$ECHO -ne "\xa7\x69\xa4\x47\xab\x61\x4d\x6a\x3d\xef\x75\x7b\x22\xaf\x71\x9b"
+$ECHO -ne "\xb3\x5a\x93\xbb\x78\x00\x79\xbd\xc0\x07\xae\x1b\xdb\xc5\xc6\x6b"
+$ECHO -ne "\x7a\x7b\xd3\xd7\x38\xbb\x70\x5e\xf0\xd1\x08\x9a\x64\x26\x53\x68"
+$ECHO -ne "\x03\x53\x4d\x32\x30\xd2\x61\x31\x13\x68\xd1\xa6\x4c\x41\x89\x84"
+$ECHO -ne "\x31\x4f\x40\xd2\x79\x14\xf0\xa3\xda\x1a\x00\x65\x4f\x53\xd9\x28"
+$ECHO -ne "\xd3\xf4\x4c\x13\x26\x4c\x4c\x64\x34\x9a\x6a\x7a\x99\x3c\x12\x78"
+$ECHO -ne "\xd2\x68\xd4\xda\x6a\x79\x32\x64\xd1\xa8\x1b\x13\x01\x4f\x29\xea"
+$ECHO -ne "\x6c\xa3\xd2\x07\x94\x06\xa6\x44\x01\x4f\x11\xa3\x4d\x13\x4d\x31"
+$ECHO -ne "\x32\x4c\x98\x0c\x9a\xa6\xda\x29\x3d\xa4\xf1\x24\xfd\x1a\xa3\x7a"
+$ECHO -ne "\x93\xf4\xa7\xb5\x3d\x51\xe2\x47\x94\xf2\x8f\x29\xb2\x9b\x29\xe9"
+$ECHO -ne "\x34\x79\x4f\x46\x9e\x84\x6a\x69\xea\x69\xa7\xa9\xb5\x03\x27\xa8"
+$ECHO -ne "\xf1\x40\x32\x7a\x13\x10\x00\x3d\x41\x90\x00\xd0\x1e\x84\x0d\x1b"
+$ECHO -ne "\x53\x41\xa3\x21\x93\xd0\x83\x53\x10\x99\x34\x24\xf5\x32\x99\x34"
+$ECHO -ne "\xd2\x7a\x86\xca\x6c\x28\xda\x6d\x29\xa6\x4d\x31\x0c\xd4\x7a\x69"
+$ECHO -ne "\x1e\x93\x23\xca\x1e\x93\x4d\x03\x26\x9a\x68\x01\xa0\xc9\xa0\x1a"
+$ECHO -ne "\x00\x34\x00\x00\x69\xa0\xf4\x80\x0d\x00\x00\x34\x06\x86\x80\x34"
+$ECHO -ne "\x00\x00\x00\x34\x00\x48\x88\x84\x53\x68\x4f\x45\x3d\x51\xfa\x4d"
+$ECHO -ne "\x4c\xda\x9a\x8d\xb5\x4c\xd4\xf2\x35\x1b\x51\xb4\xd3\x14\xf5\x0f"
+$ECHO -ne "\x50\xf5\x0f\x24\xd3\x32\x23\xd4\xcd\x21\xa6\xd4\xd0\xd0\x69\xa0"
+$ECHO -ne "\xf4\x8d\x3d\x43\xd3\x51\xea\x6c\x90\xd0\x68\xf4\x40\x00\x07\xa8"
+$ECHO -ne "\x19\x3d\x47\xa8\x1e\xa0\xd0\x34\x00\x0d\x1a\x06\x80\x01\xe9\x00"
+$ECHO -ne "\x64\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+$ECHO -ne "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+$ECHO -ne "\x00\x00\x48\x92\x1a\x46\x9a\x02\x9e\x24\xc5\x4f\xc9\x91\x4f\x29"
+$ECHO -ne "\xec\xa9\xea\x34\xd3\xd2\x68\x68\x00\xf4\xd4\xf5\x19\x00\x34\x00"
+$ECHO -ne "\x06\x4d\x00\xd0\x1a\x1a\x03\x20\x01\xa0\x00\xf5\x00\x0d\x06\x9b"
+$ECHO -ne "\x50\x36\xa3\x35\x00\x03\x40\x03\x40\x68\xf5\x34\x00\x00\x00\x71"
+$ECHO -ne "\xe4\x3c\x0c\x0f\x0f\x3d\x23\x9a\x7f\x31\x80\xae\x1a\xe1\x09\x03"
+$ECHO -ne "\x2c\x61\x63\x18\xfc\x1a\x28\x0e\x9a\x85\xc3\x86\x96\x11\x94\x88"
+$ECHO -ne "\x0f\x92\x11\x8a\x1a\xb4\x61\x8c\x38\x30\xf3\xa9\xfb\xbe\xcd\x8d"
+$ECHO -ne "\xc4\xb7\x7a\x52\xad\x92\x9f\xde\xe6\x75\x74\xb7\xbb\x0b\xf5\x4c"
+$ECHO -ne "\x97\xd9\x49\xc8\x63\x9b\xa6\xba\x95\xe8\x46\x70\x11\x71\x55\x67"
+$ECHO -ne "\x17\xe3\xab\x91\x7d\xbe\x0d\x56\x78\x61\x98\x41\x28\x2c\xb5\xa3"
+$ECHO -ne "\xd1\xb8\x76\x80\xc8\xad\x9b\x79\x6f\x8a\x7a\x84\x44\x35\x24\x64"
+$ECHO -ne "\xa0\xde\x18\x80\x11\x14\xcd\xb0\xc6\xe4\x31\x49\x71\x53\xaf\x5d"
+$ECHO -ne "\x20\xc9\x59\xdc\xa2\x53\x06\xf0\x4f\xc8\x09\x21\x92\x6b\xf2\x37"
+$ECHO -ne "\x32\xcb\x75\x91\x75\x41\xc0\xe8\x47\x02\xb3\x8e\x0b\x17\x47\x42"
+$ECHO -ne "\x79\x21\x3c\xec\x6c\xb0\x84\x24\x96\x45\x4a\x8e\xbb\xbe\xc2\xe0"
+$ECHO -ne "\x16\x85\x76\x43\x26\xd5\xd0\x58\xdd\xf7\x83\x65\x44\x8f\xbe\x6c"
+$ECHO -ne "\x72\xe1\x5b\x1a\x0e\x3a\xbb\x51\xcf\xbd\x9b\x3a\xd0\xd5\x39\x5b"
+$ECHO -ne "\x23\x7d\xc9\x0b\x08\x0a\x23\x7b\x3a\x00\x67\xa1\x76\xa5\x19\xab"
+$ECHO -ne "\x48\xbd\x54\xaa\x8f\xaf\xb6\xe8\xd5\x91\x0f\x3e\x4b\x3a\x8d\xc9"
+$ECHO -ne "\x48\x02\xc2\x6b\xfc\xef\x0a\x9b\xf1\x67\xd0\x45\x48\x45\x05\xc0"
+$ECHO -ne "\x07\xc4\x47\x96\x6e\x79\xac\x31\x49\xcf\x1f\xa8\x3b\xdc\x1d\x44"
+$ECHO -ne "\x83\x84\x04\x49\x9f\x25\x01\x4b\x41\x80\x14\x1b\x9d\xaf\xfc\xb5"
+$ECHO -ne "\x46\x22\xca\x96\x4e\xd5\xe3\x08\x7d\xab\x17\x0b\x65\xcd\xa7\xd4"
+$ECHO -ne "\x5e\xd1\x8a\x27\xc8\x60\xe9\x17\xa3\xc9\xb4\x26\xf8\x58\xb2\x4a"
+$ECHO -ne "\x15\x52\x8e\x15\x20\x72\xb2\x0e\x4f\x64\xcb\x2b\xa3\xd9\xf0\xa6"
+$ECHO -ne "\x6f\x0b\x50\xed\x4e\xa4\x28\xe8\xe0\x05\x2d\x15\x26\x2c\x3d\x9f"
+$ECHO -ne "\x87\xc4\xd1\xd3\x69\xe2\x1c\xea\x41\x99\xbd\x43\x59\x9f\x06\x57"
+$ECHO -ne "\x06\xb4\x72\xe7\x45\x2c\xd2\xcf\x5f\x66\xa5\xeb\x58\x6a\xc0\x37"
+$ECHO -ne "\x82\x81\xf6\xdc\x1c\x35\x5b\xc6\xf1\x92\x4e\xe0\xe2\xd2\x12\x82"
+$ECHO -ne "\x92\x97\x14\xe5\xac\x49\x9f\xfd\x16\x46\xc6\xc2\xf1\x48\x86\x05"
+$ECHO -ne "\xe6\x74\xac\x9a\x52\x49\x64\x45\x25\x43\x08\x06\x03\x63\x49\x91"
+$ECHO -ne "\x9a\x92\x96\x5b\xe3\x2f\x11\x51\xcd\xe3\xa3\x9f\x3e\x8f\x9f\xab"
+$ECHO -ne "\x92\xbc\x6d\x36\xa3\xd1\x71\xa4\x4a\xb6\xe1\x49\xb8\xdc\x2c\x90"
+$ECHO -ne "\xb2\xd6\xfb\xa6\xc6\xd9\xa4\x5b\x9b\xe5\xd6\x59\xb3\x76\x37\xeb"
+$ECHO -ne "\xa6\x3e\xf0\x4c\x98\x1d\x73\x04\x01\x06\x8c\x10\x00\x3b\x2b\x04"
+$ECHO -ne "\x55\xf4\xfd\xec\x9d\xad\xc7\x2b\xbd\xe3\xda\x4b\xee\x28\x5d\x7a"
+$ECHO -ne "\xbe\xa6\xb9\xe0\x81\x15\xa6\x09\x26\x52\x60\xcc\x03\x30\x66\x60"
+$ECHO -ne "\xb9\xd0\x79\xfd\xb6\xb3\x85\xac\xd1\xc4\x4c\xbf\x80\x20\x44\x45"
+$ECHO -ne "\x7f\x72\x27\xff\x14\xc2\xc0\x81\x02\xab\x32\x20\x43\x46\x06\x7f"
+$ECHO -ne "\xb7\xc2\xb9\xf6\x39\x7b\x0b\x0c\xcb\xe7\x6e\x03\xe3\x20\x46\x82"
+$ECHO -ne "\x4a\x01\x23\xbb\xb0\x0c\xb5\x6f\xf7\xfb\xfc\xf5\xf2\x3c\x8e\x7e"
+$ECHO -ne "\xcb\x77\x6f\x7e\xc3\x71\x7c\x44\x3f\xbc\x3c\x54\xb8\x40\x27\x78"
+$ECHO -ne "\x63\x4d\x83\x22\x6a\x0a\x00\x0e\x8d\xa5\xfa\x5e\xe5\x89\x55\xa4"
+$ECHO -ne "\x18\x60\xc2\xa6\xd6\x17\x98\x23\xf0\x07\x44\x45\x18\xa4\x68\xd9"
+$ECHO -ne "\xcc\x0d\xe3\x81\x06\x09\x0c\x17\xaf\x52\xad\x85\x83\x5d\x09\x30"
+$ECHO -ne "\x0d\xa9\xb3\xe6\x45\x85\x9e\x26\x47\xab\x7d\x14\xe1\x8a\xb9\xfe"
+$ECHO -ne "\x0a\x0f\x8d\x68\x73\x73\x5c\xa3\x0b\xb5\x29\x0c\xd8\xde\xc2\x30"
+$ECHO -ne "\xbe\x61\xce\xbd\x4d\x3a\x03\xef\xe9\x45\xef\xeb\x07\xe8\x6b\x7d"
+$ECHO -ne "\xd2\xf4\x92\x8f\x91\xa1\x6e\x85\x2b\x73\xaf\x01\x8a\xd2\x0f\x52"
+$ECHO -ne "\xed\x65\x9f\xe6\x15\x47\xb2\x71\xd3\xbc\xee\xde\xff\x10\xfa\x4d"
+$ECHO -ne "\x7f\x9d\x5a\x4b\x13\x4a\x92\xd6\x85\xb2\xef\xe1\xbb\x92\x80\x4a"
+$ECHO -ne "\x45\x70\xa0\x4e\xe6\xf3\x39\x9a\xf6\x55\xee\x80\xc5\xa0\xff\x9d"
+$ECHO -ne "\xb6\x66\xe6\xcc\x81\xb2\xdc\xd6\x39\xb7\x06\x2c\xd6\x3b\x27\x0e"
+$ECHO -ne "\x5d\x01\x92\x5c\xf3\xbe\x3d\x46\x8a\x46\xa4\xd4\x03\x21\x86\x8e"
+$ECHO -ne "\x68\x05\x3b\xf0\x66\x69\x4c\x61\xf0\x39\x1c\x9d\xe2\x74\x3b\x5f"
+$ECHO -ne "\xd7\x87\xdc\xd3\xeb\x59\x50\xb6\x6d\x75\xc9\x5b\xdc\x4d\xb7\x29"
+$ECHO -ne "\x0c\x64\x9c\x5c\x22\xd1\x44\xd7\x01\x68\x0a\x26\x25\x7d\x6a\x76"
+$ECHO -ne "\x1c\x1b\xbf\x7a\xa5\xeb\x42\x8f\x2f\x93\xa3\xc1\xca\xe3\x9f\x46"
+$ECHO -ne "\xfd\x77\x07\x27\x2d\xaf\xbb\x1a\x13\x5b\x86\x94\x00\x90\x86\xc1"
+$ECHO -ne "\x24\x8d\x86\x22\x56\xbe\x06\xe1\xa1\x44\x4c\x36\xe2\x22\x08\x21"
+$ECHO -ne "\xb2\x20\x6d\xb6\xdb\x6c\x6e\x26\x26\x06\xc0\x26\x09\x94\x09\x75"
+$ECHO -ne "\x2c\x10\x4b\x44\xb0\x1b\x44\x26\x11\x58\x10\xdf\x2c\xc1\x55\x8a"
+$ECHO -ne "\xad\xb2\xa3\x08\x67\x34\xe5\x83\x95\x0a\x08\x82\xc1\x8a\x06\xdd"
+$ECHO -ne "\xb1\x32\x14\xa5\x27\x78\xca\xb6\xd1\x57\x5a\xc9\x2a\x06\x05\x29"
+$ECHO -ne "\x0c\x88\x28\xd2\x86\xa5\xa9\x69\x51\x81\x46\xa1\xa4\x81\xb1\x8d"
+$ECHO -ne "\xb1\xb0\x01\x83\x49\x4b\x15\x1a\x6e\x13\x24\x68\x54\x60\x4b\x4e"
+$ECHO -ne "\x21\x39\x82\x1c\x8d\x02\x6d\x23\xc3\x30\x25\x83\x69\x05\x11\x05"
+$ECHO -ne "\x4d\x24\x04\x4e\x0c\x53\x81\x25\xce\x34\x10\xd0\x04\xd4\x98\xa1"
+$ECHO -ne "\x21\x0b\x7e\xc4\x09\x11\x30\x82\x8f\x68\xc4\x13\x48\x0a\x30\x17"
+$ECHO -ne "\x4f\xaf\x80\x52\xd0\x36\x22\xd6\x43\x48\x15\xf6\xa1\x82\x84\xdc"
+$ECHO -ne "\x44\x34\x07\x52\xc4\x2c\x56\xb7\xaf\xa8\x3b\xb1\x08\x4b\x6b\x6c"
+$ECHO -ne "\x24\x05\xce\x1a\x10\xe2\x02\x31\x22\x25\xb8\x23\x65\xd0\x52\x9b"
+$ECHO -ne "\x4a\xcb\x64\xae\xbd\xe8\xda\x30\xb4\x25\x79\xa4\xbc\xe6\xe0\xf3"
+$ECHO -ne "\xde\x82\x23\x84\xce\xe5\xb9\xc9\xe9\xeb\x69\x78\x2f\xbc\x76\x6d"
+$ECHO -ne "\x58\x86\xc4\xa5\x82\xfa\xad\x61\x75\x62\x0c\xb6\x9b\x00\xdf\x30"
+$ECHO -ne "\x4a\xd6\x83\xaa\x60\x8a\x33\x7c\xd2\x12\xf5\x6c\x48\x52\xc5\x85"
+$ECHO -ne "\xe2\x6f\x37\x73\xc7\xbc\xad\xea\x27\x27\xa8\xef\xf7\xef\x59\x17"
+$ECHO -ne "\x65\xb6\xe1\xd8\xdd\xb5\x93\x42\xd0\x29\x5a\x18\x76\x08\xdb\xe5"
+$ECHO -ne "\x38\xf9\xa8\xe4\xa1\xa2\xd4\x40\xa0\xfd\x45\x18\x4b\x3c\xa6\x85"
+$ECHO -ne "\x02\x94\x8c\x88\xa9\x71\x87\x40\x96\x4d\x23\x26\xf4\x17\x44\xb8"
+$ECHO -ne "\x78\x1e\x71\xe3\x3b\xee\xc6\x4b\x87\x88\xfd\x2b\xb5\x8b\x1b\x53"
+$ECHO -ne "\x0b\xab\xd6\x47\x23\xa7\xcf\x78\x3a\x25\xd7\x3c\x77\xb3\x8e\x00"
+$ECHO -ne "\x37\x83\x11\xbb\x68\xf5\xed\x0a\x1a\x4d\xa3\x90\x68\xea\xed\x49"
+$ECHO -ne "\x8d\xb6\x80\x69\x83\x67\xcf\x65\x5a\xec\xda\x12\xe6\x5a\x47\x5a"
+$ECHO -ne "\x3c\x63\x50\x41\x73\x40\x83\xc7\x69\xbc\x46\xa7\xb1\xed\x79\x3c"
+$ECHO -ne "\xfe\xdf\x27\x4b\xbe\xeb\x68\xec\x83\x00\x6b\x7b\x08\x4a\x6e\x0c"
+$ECHO -ne "\x2d\x16\xba\x1a\x96\xa1\x03\xc3\x63\x9e\x7a\xce\x8b\xe2\xae\x51"
+$ECHO -ne "\xfb\x7d\xed\x5d\xfb\xbc\xed\x04\x6f\x1f\x21\xfc\x69\x3c\xb1\xaa"
+$ECHO -ne "\xdf\xbf\xa0\xab\xc3\xcc\x6a\xbf\xe7\x96\xbe\x36\xb3\x23\x32\x1c"
+$ECHO -ne "\xb5\x18\x44\x54\x51\x81\xb4\x63\xc7\x99\x84\x06\xcb\xaf\x5b\x05"
+$ECHO -ne "\x4f\x82\xf5\x93\xb4\xc3\xcf\xdb\x65\xb8\x8d\xae\xa1\xc2\xf0\xdf"
+$ECHO -ne "\xa7\xe5\xf3\x37\xd2\x57\x73\x0d\x89\xb8\x21\x10\x9a\x43\xe9\xe0"
+$ECHO -ne "\x09\x1a\x40\x49\xa0\xcc\x03\x30\x46\x66\x66\x0c\x12\x48\x89\xff"
+$ECHO -ne "\x57\xe8\xd2\x7c\x3e\x8d\x9e\x46\x7f\x97\xfc\x3b\x12\x95\xd2\xdf"
+$ECHO -ne "\x2f\xb1\xc8\x7d\x61\xdb\xb2\x8a\xdd\xbf\xf3\x7e\x08\xcc\xad\x16"
+$ECHO -ne "\xbe\x45\x13\xf2\x7f\x14\x5a\x79\x2e\xb5\xbb\x78\x0c\x22\xc6\x10"
+$ECHO -ne "\x31\xce\x9c\x6b\x1d\x48\x11\x16\x4c\xdf\x98\x12\xf3\x41\x05\x81"
+$ECHO -ne "\xd3\x24\x94\x92\x37\x51\x5d\xdc\x51\x08\xd3\x73\xba\x89\x42\x3f"
+$ECHO -ne "\xcb\x5c\x4c\xb2\x16\xcb\x04\xcd\x86\xb2\x05\x8a\xc3\x56\xc8\x83"
+$ECHO -ne "\x0b\x2e\x90\x31\x86\x5c\x68\xb9\x8d\xbc\xbf\xf2\xe2\xd2\xb0\x0b"
+$ECHO -ne "\x76\x2b\x3d\x79\xba\x3f\x9b\xe3\x8e\xc4\xf5\xed\xe0\xf7\xdd\xdb"
+$ECHO -ne "\x97\x5f\x9a\xb3\xfc\x50\xbf\x89\xf4\x7a\x38\xa3\x44\x0c\x50\x5d"
+$ECHO -ne "\x7c\xbb\x65\x47\xf1\x33\xd6\x67\xa4\xe0\xf0\x68\x58\xe9\x6c\x40"
+$ECHO -ne "\x02\x6b\x01\x20\x40\x84\x89\x80\x08\xcc\x52\xa0\x20\x81\x98\x16"
+$ECHO -ne "\xa1\x90\xf8\xcd\xbe\x1e\xc7\x6b\x1d\xb5\x81\x6b\x04\xdb\x4c\x43"
+$ECHO -ne "\x1a\xbc\xd4\x0d\xb6\x0d\xb3\x82\xc8\xc7\xf0\x13\xa8\xc5\x20\xd5"
+$ECHO -ne "\xbd\xb4\xc0\x5a\xdd\xe8\xd1\x31\x4f\xad\x88\x63\x30\x44\x0d\xd5"
+$ECHO -ne "\xc6\x56\x96\x28\xe2\xe8\xa8\xa9\x10\xdb\x1a\xa3\x21\xa6\xc5\xe6"
+$ECHO -ne "\xf5\xb2\xa4\x6d\x8d\xb4\x31\xb5\xc3\xec\x3e\x8f\xd0\xeb\x35\xce"
+$ECHO -ne "\xdb\x02\x9c\x4e\x96\xcd\x40\x14\xcd\x97\xb9\x0a\xe3\x09\xf5\x49"
+$ECHO -ne "\xfe\x1e\xc7\xc5\x57\xb9\x96\xe9\xf5\x8a\x56\xdf\x63\xda\x8a\xea"
+$ECHO -ne "\x41\x97\x74\x7b\xa6\x57\x99\x8d\xb0\x78\x60\xe4\x04\xd7\xe4\xbf"
+$ECHO -ne "\x89\x71\xa5\xc8\x93\x42\x02\x53\x7a\x6a\x9d\x99\xc9\xd3\x2b\x87"
+$ECHO -ne "\x75\xb2\x8f\x19\x86\x28\x2b\xc3\x2b\x67\x95\x72\xfb\x13\x39\xb5"
+$ECHO -ne "\xca\x8c\x43\x88\x1c\xdc\x47\xb6\xdb\x05\xaf\x8e\x31\x54\xb8\xbd"
+$ECHO -ne "\x98\x8b\x1d\x1f\x17\x87\x9d\x6d\x05\xca\xa8\x90\x49\x10\xbb\x67"
+$ECHO -ne "\x2f\x92\x61\x43\xfe\xe2\xd6\x18\x6d\x2a\xc0\x14\x96\x9a\x2a\x65"
+$ECHO -ne "\x48\x04\xc7\x2d\x76\xa6\x1f\xc5\x79\x36\x28\x69\x6f\x09\xb6\x90"
+$ECHO -ne "\xc3\x55\x6d\x98\xf0\xbd\xce\xb1\x37\xf4\xc4\x90\x1c\xdf\x5a\x27"
+$ECHO -ne "\xbc\x24\x38\x52\x75\xc0\xee\xc9\x05\x5a\xd7\x2b\x61\xfd\xba\xfb"
+$ECHO -ne "\xea\x9f\x65\x39\x9f\xe7\xc9\xc3\x0e\xa9\x3a\x20\x50\x87\xb6\x08"
+$ECHO -ne "\xc7\x80\x92\xe2\x60\x21\xd2\x2d\x51\x12\xf8\x46\x60\xbd\xf4\x65"
+$ECHO -ne "\xd5\x7b\x1a\xa7\x79\xb7\x73\x79\xe9\x0d\x60\x34\xc3\xb0\x58\xc8"
+$ECHO -ne "\xcc\x42\x7b\xb0\x56\x8c\xde\x66\x72\x23\xc2\x59\xe6\x9f\x83\x6a"
+$ECHO -ne "\xef\x4a\x9e\x1e\xf3\xd5\xde\x52\x32\x14\x8a\x2d\x0b\xf0\x1e\x5b"
+$ECHO -ne "\x7c\x4a\x34\x4d\x72\x4f\x1d\x8f\x97\xe8\xc9\xcd\xe2\xb9\x03\x36"
+$ECHO -ne "\x9f\x89\x97\xc3\x19\x8d\x8d\x84\x41\x0c\x03\x34\x18\x41\x20\x10"
+$ECHO -ne "\x26\x4c\x10\x18\x50\x5e\xd7\x93\x1f\x31\xf7\x54\xb3\x43\x4d\xd7"
+$ECHO -ne "\x48\x69\xcf\x7d\x29\x2f\x7f\x8f\x11\xf2\x4c\x3f\xcd\xe7\xa2\xe1"
+$ECHO -ne "\x09\x9a\x1a\x6c\xc6\xf3\xcf\x33\xe5\xb5\x8f\x6e\x41\xf1\x80\x07"
+$ECHO -ne "\x4d\x7f\xbe\x1b\x37\xdd\xe3\x64\xb8\xa2\x59\x90\x2c\xa2\xbe\xf4"
+$ECHO -ne "\x82\x2a\x80\x46\x4d\x1a\x8c\x88\x5a\x18\x30\x64\x0a\x5a\x57\x37"
+$ECHO -ne "\x63\xe9\x6d\x8a\x6d\x5f\x88\x5e\x6d\x41\x33\x60\xfd\x45\x90\x7e"
+$ECHO -ne "\x15\xaa\x95\x6f\xbd\xfc\xe9\x0b\x34\xe4\x3b\xa8\x41\x78\x1c\x55"
+$ECHO -ne "\x62\x5d\xb2\x19\xdd\xeb\x69\xeb\xef\xe1\xbf\x7b\xeb\x62\x23\x8a"
+$ECHO -ne "\x61\x14\x9f\x22\x53\x08\x6a\x31\xba\x30\x24\x1e\x54\x83\xae\xbd"
+$ECHO -ne "\x87\xa1\x71\xf0\x3c\x7d\x94\xa1\x2c\xea\xff\x84\x76\x77\xd2\xc9"
+$ECHO -ne "\x9f\x2f\x9c\xc7\x83\x3f\x89\x5d\x1b\x5c\xc3\x0f\xfa\xd2\x93\x32"
+$ECHO -ne "\xfc\xed\xa6\x26\x86\x98\x1b\x05\x10\x20\x27\x4c\x95\x3f\x6d\x94"
+$ECHO -ne "\x82\x5a\xa8\x68\x72\xae\xd7\xae\xdb\xaf\x26\xb6\x5a\x89\x30\xe7"
+$ECHO -ne "\xd0\x5a\x7c\xc6\x66\xfa\xc3\x85\x7d\x26\xee\xb3\x34\xc2\xac\x70"
+$ECHO -ne "\x88\x03\x15\xc6\xee\x55\x45\xde\x1c\x10\x01\xe6\x3b\x36\x26\x11"
+$ECHO -ne "\xbe\xec\x54\xea\xd8\x20\x1d\x35\x00\xd1\x8c\x00\xe8\xf5\x21\x97"
+$ECHO -ne "\x26\x06\x69\x87\x55\xa3\xc8\xf6\x58\xcc\x60\x12\x30\x0b\x8a\x50"
+$ECHO -ne "\x01\x57\x30\xdc\x9a\x01\xd4\xa4\xcd\xd6\x69\x23\x0f\xc3\xb8\x85"
+$ECHO -ne "\x12\xbb\x8e\xdf\xc5\xf1\xf3\x7c\xc9\x7a\x24\x25\x07\x9c\x86\x97"
+$ECHO -ne "\x68\xb5\xad\x0b\xba\x2e\xe8\x6f\x7f\xa1\xed\x4f\x0c\x34\x7b\xc8"
+$ECHO -ne "\x84\x10\x08\x2a\xcc\x19\x59\xbd\xbc\xe4\x3d\xa8\xd9\x35\xaf\x8b"
+$ECHO -ne "\xa7\x0a\xad\x42\xe8\x02\x90\xe6\x8e\x76\x5d\x0f\x3b\x87\xb8\xe4"
+$ECHO -ne "\x65\x4e\x5f\x0d\xe8\x26\xaf\x2a\x94\x9a\x2e\x21\x9a\x19\xb9\xa0"
+$ECHO -ne "\x8d\x26\x78\xa1\x4b\x6e\xf6\xd7\x29\x66\xdb\x49\x09\xa0\xca\x4d"
+$ECHO -ne "\x32\xb0\x31\xf5\x73\xe1\x67\xce\xe0\x5a\x79\x84\xa4\x22\xd4\xc9"
+$ECHO -ne "\x43\x59\x08\xa8\xd5\x5e\x8c\x72\x61\x70\x9a\xa6\x42\xc0\x42\x22"
+$ECHO -ne "\x2d\xd0\xbe\xb1\x49\x6e\x36\xbb\x8d\x8f\x03\x9b\xb4\xdb\x5a\x77"
+$ECHO -ne "\x3e\x29\x91\xc6\x73\x88\xef\x8c\xf7\xde\xe2\x2b\xc2\xce\xcd\x8c"
+$ECHO -ne "\x92\x60\x96\x29\x89\x99\x62\x99\x81\x36\x9b\x50\xc8\x70\xd6\x8d"
+$ECHO -ne "\xaf\x6b\x30\xba\xc7\x7a\xca\x4c\x56\x66\x66\x2d\xc7\xa5\xf7\x63"
+$ECHO -ne "\xa4\x55\x8d\xd4\x92\xdb\x2b\x6b\xb1\xa1\x96\x99\xd9\x25\xdb\x14"
+$ECHO -ne "\x1c\x49\x04\x67\x25\x45\x0a\x50\x1d\x20\xd8\x8d\xcf\xe7\x03\x20"
+$ECHO -ne "\xf0\xd7\xc0\xcc\x84\x20\x68\x4a\x63\x41\xa4\x6c\x32\x08\xa2\x37"
+$ECHO -ne "\x03\x6b\x42\x12\xbe\xa9\x4e\x9b\x97\x16\x92\x48\x56\x32\xae\x2c"
+$ECHO -ne "\x10\xc6\x31\x14\x8c\xcc\xd6\x23\x09\xf4\x64\x15\x9e\xf1\x35\x75"
+$ECHO -ne "\x98\x3a\x0c\x12\x29\xaa\xb7\x2b\x82\xe0\xf9\xcd\x05\xed\xb8\xbe"
+$ECHO -ne "\xb6\xf5\x6f\xcc\x41\xbc\x3a\x81\x39\x3b\x03\xe8\xb2\xab\xb6\xaa"
+$ECHO -ne "\xed\xa8\x58\xdf\xca\x06\xba\x64\x7b\xc4\xef\xec\x23\x38\x77\xec"
+$ECHO -ne "\xcf\xd7\xd2\xeb\x75\x3d\x26\xe2\xfa\x66\x49\x0b\x4a\xdc\xe3\x48"
+$ECHO -ne "\x64\x33\xc4\xb3\x93\xda\xdd\x3c\x08\x83\x7d\x91\x78\xe5\x61\x57"
+$ECHO -ne "\x67\x37\x73\xe1\x05\xbb\x96\x3e\x26\xc7\x6c\x44\xb5\xfb\x80\xb2"
+$ECHO -ne "\xd9\xa0\x99\x6b\xbf\x74\x62\xb7\xf7\x14\xec\x07\x12\xfc\xe6\x1b"
+$ECHO -ne "\xf1\x1d\x24\xfe\xd0\xb9\x61\x76\x56\xa0\xa5\x8c\x63\xce\x96\x5d"
+$ECHO -ne "\x65\x4f\xae\xcc\x7d\x86\x2d\xd7\x74\x96\x67\xb7\x5c\x94\xa6\x30"
+$ECHO -ne "\xbd\xb3\x84\x56\x93\x1e\x44\xc5\x43\x5f\x65\x9d\x1a\x92\xb1\x9a"
+$ECHO -ne "\x4c\x46\x1f\xd2\x64\x54\xb6\x4e\x7e\xb2\x71\x75\xf6\xce\xac\xdc"
+$ECHO -ne "\x5a\xa1\xd4\xf1\xf5\x71\x6a\x93\x50\xd2\x8b\xb2\xb1\x7f\xaf\x20"
+$ECHO -ne "\xd2\xc9\xce\xeb\xfb\x1d\x4a\xff\x26\x89\xa2\x60\xed\x8a\xeb\xa7"
+$ECHO -ne "\x6e\x92\xea\xb7\xef\x7a\xcc\xd9\x4b\xbb\x3e\xad\xc6\x7a\xfa\xbb"
+$ECHO -ne "\xe0\x25\x0c\x0f\xe2\x14\xf9\x2e\x0b\x5f\xd4\xbd\x8f\x5a\xae\xb6"
+$ECHO -ne "\xca\xc1\x5a\x89\x4c\x74\x36\xd3\x32\xab\x87\xa7\x7d\x57\x7f\x45"
+$ECHO -ne "\x1a\x1d\x45\xcc\xc8\xf1\x36\x8c\x4d\x6e\xc9\x01\xb8\x7a\x99\xdc"
+$ECHO -ne "\x4d\x9a\xa1\xc3\x7a\x81\xac\xa9\x40\x20\xc1\x18\xc7\x1e\x0d\xeb"
+$ECHO -ne "\xf7\x53\x9b\xcb\xe2\x64\x4e\x17\x1c\x6a\xd7\x74\x6b\xe4\x4b\xe7"
+$ECHO -ne "\x5f\x06\x31\xac\xe7\x5c\x64\x93\x05\x69\x13\x1a\x34\x52\x3e\x1a"
+$ECHO -ne "\xc8\xf6\xed\xde\x5e\x79\xf4\xe2\x04\xc3\xb6\xb3\x49\xdc\x7a\xe3"
+$ECHO -ne "\x52\x12\x1b\x32\xd9\xe2\x5c\x95\x5f\x69\x01\xde\x77\x16\x34\xf7"
+$ECHO -ne "\xda\x43\x2c\x56\x77\x21\xcc\x86\xc4\x4a\x14\xb8\x29\x28\x0a\xf1"
+$ECHO -ne "\x79\x8a\x9e\x94\x86\x6c\x6a\x6c\x0f\x15\xe6\xb4\x57\x92\xfc\x1f"
+$ECHO -ne "\x6d\x98\xbf\x2f\x0b\x97\xb3\x4b\xec\xe6\xd3\xf7\x94\xe4\x2c\xf3"
+$ECHO -ne "\x20\xfa\x42\x69\xd9\xb6\xb2\x96\x31\x09\x6b\xcb\xd2\x92\x14\x40"
+$ECHO -ne "\x69\x75\x9a\x83\x49\x44\xed\xe0\xdd\xa3\x3d\x09\xe0\xe4\xcf\x4f"
+$ECHO -ne "\x3b\x12\x84\xb6\x47\x2b\x1b\x7e\xc2\xac\x8d\xf6\x1c\x74\x26\xb0"
+$ECHO -ne "\x2a\x27\xf6\x03\xe3\xf9\xe3\xbb\x4a\x1a\x6f\xa2\xf4\x10\xb0\xe5"
+$ECHO -ne "\x70\x9a\x9b\xdf\xac\x42\x6a\xdc\x80\xc3\x80\x0c\x84\x26\xf0\x23"
+$ECHO -ne "\xd6\x5b\xcb\x8b\x3b\xe1\x65\xfe\xba\xad\x85\xe9\x1d\x88\xa4\xf8"
+$ECHO -ne "\x05\xb8\x58\x0b\xb1\x13\xa8\xd8\xea\xfd\x07\x68\xee\x6b\x5c\x88"
+$ECHO -ne "\x17\x49\x89\x0e\xa5\x7a\xe6\xa0\x9c\x3a\x06\x2d\x71\x84\x2c\xd2"
+$ECHO -ne "\x1b\x07\xfd\x43\x9b\x48\x9b\xae\x60\x54\x5d\xd3\x2b\xf1\xc0\x0d"
+$ECHO -ne "\x49\x01\x64\x34\x36\x77\x2f\x0e\xe7\x72\x35\x48\x2f\x05\xaa\xd5"
+$ECHO -ne "\xb4\x98\x77\xa3\x19\xa2\xf4\xb8\x11\xa7\xa6\x24\x91\xac\x1e\x09"
+$ECHO -ne "\x38\x04\xc6\xff\x0b\x7d\x36\xc2\xcb\xb8\x9c\x7e\x7b\x49\x8c\x4e"
+$ECHO -ne "\xbb\x37\x19\x18\x83\xc5\x23\x03\x6c\xcb\x51\x24\xe5\x42\x85\xc7"
+$ECHO -ne "\x73\x13\x2c\xc8\x22\x28\x50\x83\xbc\x3a\x8e\x60\xac\xb1\xda\x18"
+$ECHO -ne "\x24\x6d\x64\xd0\xa9\x65\xcd\xd6\x5a\xa7\xaa\xc6\xed\x32\x76\x7b"
+$ECHO -ne "\x07\x90\xb4\x7b\x5d\x16\x88\x9b\xd7\x5e\x0a\xb7\xbf\xbf\xc4\x5d"
+$ECHO -ne "\x1c\xbd\x39\xf3\x17\xae\x50\xaa\xc7\xa4\xe9\xad\xa5\xac\x04\xd9"
+$ECHO -ne "\xa4\x27\x5f\x79\x75\x29\x10\x69\x75\xe9\x06\x53\x7c\x66\x8b\x83"
+$ECHO -ne "\xf7\x7c\xfd\xcd\x16\xc3\x8c\x8e\x51\x6f\xcb\x68\x0a\x9c\x39\x39"
+$ECHO -ne "\xb9\x0b\x6a\x16\xc5\x4a\x22\xc0\x31\x09\x22\x28\xa0\x65\x69\x05"
+$ECHO -ne "\x30\x90\xc1\x18\x22\x05\x9e\xad\xa9\xc3\x54\x3e\x27\xa9\xc4\x41"
+$ECHO -ne "\x2c\x39\x03\xd2\x8e\x3f\x91\x9a\x4c\xc8\x68\x14\xe4\x1c\xa6\x5f"
+$ECHO -ne "\x0b\x57\x27\x09\x8a\x7d\xff\x47\x63\xa7\x5a\x29\x82\xa0\x3a\x28"
+$ECHO -ne "\x30\x9a\x2b\xf3\x69\x63\x18\xcd\xe2\x32\x66\x3c\xd7\x79\xdd\x12"
+$ECHO -ne "\x86\x34\xc6\x9e\x75\x05\x87\x39\x23\x72\x97\x71\x27\x64\xcd\xd9"
+$ECHO -ne "\xa6\x2e\x61\xd2\x37\xe4\xae\xc6\xc9\x81\xc0\x2e\x9f\xc6\xf9\x7f"
+$ECHO -ne "\xd9\x5e\xd0\xa9\x09\x97\x35\xa2\xe3\x4f\xe9\x19\x7c\xa5\xc7\x4d"
+$ECHO -ne "\x2d\x92\xec\xd6\xef\xda\x55\xf3\xa2\x95\x17\x1b\xce\xbe\x6b\x74"
+$ECHO -ne "\x70\xee\xdb\xa8\x42\x26\xb1\xcc\xc1\x31\x0a\x67\x92\x13\x9d\x9c"
+$ECHO -ne "\x12\x18\xa4\x08\x4d\x4d\xfc\x7c\xeb\x59\x6b\x22\x03\xaa\x97\xc3"
+$ECHO -ne "\x27\xa5\x21\x35\x68\xd2\x57\x54\xca\x58\x38\x82\xc5\x05\xa0\x71"
+$ECHO -ne "\x01\x1b\xce\x57\x1e\x20\xbf\x89\x96\x2a\x31\x8e\x6e\xaf\x7f\x35"
+$ECHO -ne "\x08\x10\xd9\x0e\x8a\x78\xb0\x48\x98\xa4\x64\x14\xa2\xcf\x23\x2d"
+$ECHO -ne "\x0a\x7b\x84\xe5\xfd\x29\x49\x15\x3d\x75\x39\xfd\xaa\xd6\xa4\xb9"
+$ECHO -ne "\x05\x12\x57\x31\x04\xdc\x26\x34\x16\x3f\xa7\x03\x32\x1d\x4b\x1d"
+$ECHO -ne "\x78\xdc\x9b\x79\x96\x9a\x87\x6e\xb4\x80\xaa\x01\x19\x33\x92\xb0"
+$ECHO -ne "\x16\xc9\x94\x9c\xe7\xa5\x63\xe6\x18\x13\xb2\x34\xbd\x98\x41\xd6"
+$ECHO -ne "\xa4\xc8\xb9\x6e\x06\x9c\x72\xf8\x49\xab\xd5\x47\x9e\xa1\xe6\xde"
+$ECHO -ne "\x62\xd0\xec\xaf\xbf\x1b\x8a\xaf\x63\xa0\x29\xbe\x3d\x87\xa0\x22"
+$ECHO -ne "\xce\x46\x4e\x18\x30\x7b\x3c\x3d\x86\xe1\x9e\xb6\x59\xef\x1c\x43"
+$ECHO -ne "\x65\xd0\x3d\x53\xd0\x41\x20\x40\xb7\x2b\xb1\xdd\x52\x2c\xdd\x68"
+$ECHO -ne "\x44\xc1\xbe\x40\x72\x61\xd7\x25\x5d\xf5\x69\xce\x3a\x3b\x2e\x9b"
+$ECHO -ne "\x13\x19\x79\x1a\xf0\xee\xb0\xe7\x17\x44\x45\xe8\x2d\x59\x50\xbc"
+$ECHO -ne "\x40\x67\x66\x12\x20\xcc\x43\x8a\x9c\x1d\xde\xac\x2d\x00\x76\xb2"
+$ECHO -ne "\x98\x8a\xa9\xde\x1c\xb6\x8b\x32\x19\x67\x1c\x67\x95\x41\x40\x60"
+$ECHO -ne "\xf3\x13\x44\xb8\xc5\x18\xa7\xca\xdd\x8c\x5a\x8f\x72\x69\xf1\x31"
+$ECHO -ne "\xa9\xd2\xeb\xac\x3e\x2f\xdc\xc7\xe0\x00\x78\x5d\x72\xff\x01\x95"
+$ECHO -ne "\x86\x4a\x90\x2b\xf8\x10\xc5\xc2\xd1\x9d\x7a\xc3\x65\xb1\xfd\x2d"
+$ECHO -ne "\x09\x0b\xcd\xdf\x03\x80\x3e\x44\x81\x65\x49\x4f\x50\x7e\x1f\x75"
+$ECHO -ne "\x97\xc6\x05\xda\x5a\xe9\xf6\xee\xe5\x66\xcc\x5e\x17\xe2\x8c\xb2"
+$ECHO -ne "\x06\x5b\xdd\x41\x0d\x26\xcc\x87\x0d\x37\x2e\x2d\x35\xe0\x5d\x93"
+$ECHO -ne "\xc5\xdf\x2d\xb4\xa2\xb1\x1b\x0e\x9b\xe6\x76\xb4\x28\x69\x5c\xe9"
+$ECHO -ne "\x4e\x27\x6f\x52\xcb\x4d\xb3\xc8\xaa\xea\xd3\x1a\x57\x00\xdf\x20"
+$ECHO -ne "\x2d\x42\xea\x6a\x18\x0a\xac\xae\x9a\x32\x08\x23\x99\xb7\xd8\xe5"
+$ECHO -ne "\x75\x3a\x65\x8b\x2f\xaa\x4f\x7b\x68\xd5\x66\x76\xf4\xec\x3d\xdb"
+$ECHO -ne "\xe9\x37\xdb\x69\x40\x6d\x35\x4f\x77\xfa\x8f\x07\x60\xac\x8e\x3b"
+$ECHO -ne "\x89\x46\x3c\x16\xd4\x4b\x6e\x71\x4f\x00\x10\x22\x14\x12\xca\x72"
+$ECHO -ne "\xe0\x6c\x54\x2f\x0e\x32\x8c\xba\x53\xad\x51\x48\xaf\xee\xb2\xca"
+$ECHO -ne "\x93\x4a\x46\x24\x1f\x09\x83\x69\x1c\x3f\x72\x50\x70\xff\x10\x74"
+$ECHO -ne "\x21\xef\x4a\x08\x38\x25\x4c\x54\xb6\x34\x83\x64\x99\x22\x0f\x02"
+$ECHO -ne "\x49\x58\x50\x74\xa3\xbe\xc2\x17\x05\xa7\x60\x55\xc4\x21\x52\x0c"
+$ECHO -ne "\x57\xee\x0f\x64\x6a\xa9\x73\x25\xa1\x2a\x94\x1d\x00\xca\x65\xc4"
+$ECHO -ne "\x39\xfc\x53\xa8\xe7\x4c\x07\x44\x5f\x29\x19\x98\x08\x16\x53\x1a"
+$ECHO -ne "\xba\xee\x8e\x2e\x16\x97\x66\x5b\x7c\xb5\x63\x2d\x31\x18\xdb\x64"
+$ECHO -ne "\xc5\x69\x15\xa9\xe8\x23\x5f\x92\xdb\x75\x60\x90\x6a\xbf\xb5\xba"
+$ECHO -ne "\xe5\xa5\x70\xce\x26\xd0\xc1\x63\xcb\x0e\x21\x67\x1e\x8e\x20\x32"
+$ECHO -ne "\xa1\x2d\x51\xfc\x32\xa0\xc9\xd0\x32\x91\x9a\xda\x45\x73\x2e\x97"
+$ECHO -ne "\x09\x17\x0c\xea\xe4\x89\x94\xe8\xad\x64\xd6\x78\x02\x07\x79\x06"
+$ECHO -ne "\xa4\x01\xce\xd0\xcc\x33\x20\x8d\xc9\x2d\x67\xdf\x85\x06\xb5\x21"
+$ECHO -ne "\x74\x61\x49\x99\x98\xec\x28\x06\xc4\xbd\x25\xb5\x62\x2d\xb0\xba"
+$ECHO -ne "\x5f\x4c\xc4\x33\x85\x42\x58\x11\xd4\xff\x27\x21\x3c\x57\x9e\xd9"
+$ECHO -ne "\xc4\xb1\x6d\x8d\x4a\x8c\x8a\x80\x6c\x1e\x16\x5f\xc1\xc4\x68\x4a"
+$ECHO -ne "\xca\x20\xb1\x40\x10\x1b\x1b\x6c\xf7\x82\xf8\xd4\x35\x29\x10\x76"
+$ECHO -ne "\x7d\x3a\x4d\x4d\x49\x9b\x62\x65\x66\xd4\xda\x81\x24\xca\x4a\x48"
+$ECHO -ne "\x48\x2f\x83\x48\xd1\x09\xdf\x2f\x17\x8b\xc5\x37\x89\x94\x15\xb1"
+$ECHO -ne "\x36\x58\xcd\x80\xb4\x19\xc5\xc6\xda\xda\x16\x95\x82\x14\xc5\x19"
+$ECHO -ne "\x61\x6e\xb5\xcc\x27\xb5\xf3\xdb\xef\x6e\x44\x37\xbf\xdc\x11\xf9"
+$ECHO -ne "\xa0\xf2\x78\x30\x85\xc0\xc0\x07\x67\x02\x66\x56\x7c\x76\xee\x7a"
+$ECHO -ne "\x97\x6e\x02\x5e\x08\xc0\x35\x02\x4a\x87\x39\x4c\xd6\xc4\xe0\x99"
+$ECHO -ne "\xcd\xd9\xda\x2c\x49\x18\x5c\x22\xb6\x51\x4b\xa0\x58\x8b\x7a\x55"
+$ECHO -ne "\x61\xdc\xa5\x21\x83\x1d\x47\x9c\x0b\xf4\x74\xba\x08\x85\xe4\xc8"
+$ECHO -ne "\x80\xbe\x80\x46\xfc\x46\x85\x60\x64\xa6\xc4\xc1\xae\x69\x67\x0b"
+$ECHO -ne "\x8e\xac\xa2\xc0\xf4\x6b\x6f\x7a\x9e\x00\xdd\x4d\x59\x57\x4a\x78"
+$ECHO -ne "\x08\x64\x08\x84\x80\x50\x34\xb1\x3b\xc7\x71\x3f\x3e\x1c\x1d\x4e"
+$ECHO -ne "\x4e\xa9\xb0\x32\x02\x10\x8e\x88\x71\xed\x87\x2c\x32\x4d\x57\x05"
+$ECHO -ne "\xf1\xba\xa0\xf9\x61\x30\x4b\x18\x65\x6e\x38\xf9\x41\xdd\xf1\x48"
+$ECHO -ne "\x63\x38\x50\x10\xc1\xac\x1b\xf2\x5b\xaa\x15\xf4\x89\x0e\xe9\x77"
+$ECHO -ne "\x80\x56\x50\x18\x81\x71\xd8\xdb\x0d\x6a\xce\xd2\xb6\x76\xbd\x35"
+$ECHO -ne "\xf0\x96\xe1\x06\x8b\x09\xab\x83\x21\x10\x10\x30\x68\x30\xad\xe0"
+$ECHO -ne "\xc2\x62\xa2\x99\x0b\x92\x17\x19\xab\xe3\x7a\xd1\x90\xae\x5c\x2b"
+$ECHO -ne "\x6e\xbe\x31\xec\x72\x78\x03\x7a\x85\x70\xe0\x67\x36\xe0\xdb\x63"
+$ECHO -ne "\x6e\xed\x26\x94\xcc\x9b\x4e\xa8\x23\x57\x56\xe1\x49\x61\x31\x5e"
+$ECHO -ne "\xc8\x2b\x81\x05\x23\x18\xdb\x68\x34\x0b\x6c\xf1\xfc\xc7\xdd\xdf"
+$ECHO -ne "\x1a\x39\xf8\xf6\x72\xb9\x4d\xc9\x80\xbf\x23\x93\x24\x76\xdd\x6d"
+$ECHO -ne "\x0a\x8f\x18\xe1\x81\x8f\x48\x7b\x48\x2e\xd0\xb5\xd0\xcb\xa1\x46"
+$ECHO -ne "\xae\x1c\x26\x02\xd2\xe0\xf4\x56\x8c\x8a\x01\x97\x4e\x5f\xd1\xde"
+$ECHO -ne "\x9a\x10\x31\x0d\x4c\xbc\x40\x06\xc5\x04\x92\x91\x88\x81\x58\x5d"
+$ECHO -ne "\x55\x13\xab\x4f\xaa\xbd\xee\xa0\x6a\x80\xb2\x83\xd0\x46\x31\xa0"
+$ECHO -ne "\xbc\x2c\xf9\x0d\xad\xe2\x62\xb0\xac\xa4\x91\x84\xb8\x31\x99\xb9"
+$ECHO -ne "\x45\xb3\x47\x1e\xc2\x96\xc9\x9d\xcc\xd3\xcc\x71\xc4\xf3\x9a\x92"
+$ECHO -ne "\x2b\xac\xc3\x8c\xe1\xdc\x40\x66\x64\xe8\x24\x35\x50\x26\x68\x0b"
+$ECHO -ne "\x79\x96\x81\xb6\x36\xc7\xa4\x82\x0d\x32\x65\xc3\x4c\x61\x49\x32"
+$ECHO -ne "\x09\x14\x22\xac\x37\x69\x34\xb4\x6c\xdd\xbc\x95\x54\x6b\x59\x53"
+$ECHO -ne "\xc6\x50\x32\x09\x99\x14\x8c\x18\x74\xcc\x05\x86\x7a\x06\x48\x50"
+$ECHO -ne "\x6e\xe0\xaa\x41\xbb\xb0\xbc\x19\xaa\x2c\x12\x9c\xcd\xa5\x1c\x6d"
+$ECHO -ne "\x19\x0a\x62\x02\xfe\xd3\x4a\xcc\x7c\x6a\xa5\x72\x06\x35\xfb\x8d"
+$ECHO -ne "\xf9\xab\x1e\x0b\x29\x73\x70\xb5\xe8\xf6\x54\xb6\x4c\xc8\xea\x30"
+$ECHO -ne "\x8c\xaf\xd0\xd3\xb0\x20\x59\x80\x61\x40\xc8\x19\x99\x6d\x97\xb3"
+$ECHO -ne "\xca\x66\x1e\x16\x3d\xa7\x74\xa6\x58\xf0\xd4\x00\x67\xdc\xbb\x8a"
+$ECHO -ne "\x4a\x7b\x75\xa4\x6e\x89\xc4\x44\x44\x3d\x72\xb4\x52\x8a\xc0\xc2"
+$ECHO -ne "\x11\x40\x22\x9a\x14\x09\x66\xc2\x03\xcc\x04\x86\x02\x03\xa6\x8a"
+$ECHO -ne "\xab\x60\xe0\xe8\xdc\x2b\x5d\x0d\x73\xb5\x8f\x74\xc6\xce\xdb\xb5"
+$ECHO -ne "\xa8\xe7\x95\x3f\x8b\xaf\xb9\x87\xbc\x63\xab\x84\xea\x93\x1e\x9d"
+$ECHO -ne "\xb4\xe0\x83\xc8\x4a\xc9\xc7\xb9\xc7\xf2\xc6\x25\x10\x58\xc0\x21"
+$ECHO -ne "\x64\xa1\x08\xd3\x10\x2f\x94\x40\x5a\x56\x17\xa1\x0f\xa6\xfb\xda"
+$ECHO -ne "\xd3\x12\x42\x31\x71\x09\xa5\x2e\x8b\xd1\x69\x5c\x99\x5b\x09\x52"
+$ECHO -ne "\xc6\x9b\x5a\x18\x0c\x06\x47\x42\x8a\xc3\xad\xef\x9a\xe9\x9d\xf6"
+$ECHO -ne "\x2b\x81\x72\x48\x05\x20\x16\x10\xa3\xc3\xc5\xd2\x71\x0e\xca\x04"
+$ECHO -ne "\x17\xef\xdf\x39\x64\x26\x4c\x9f\x22\xb4\x13\x1c\x3d\xe7\x55\x40"
+$ECHO -ne "\x2e\xd1\x91\x28\xc8\x1c\x68\x69\x65\x97\x13\x75\xfe\x5b\x5c\xb1"
+$ECHO -ne "\x9b\x5a\xf7\xd2\x02\xb2\x0b\x41\x36\x67\xe7\xa9\x10\x80\xd0\x5c"
+$ECHO -ne "\x64\x08\x67\xda\x56\x36\x53\x4a\xa8\xca\x16\x88\xc5\x79\xdd\x3e"
+$ECHO -ne "\x87\x71\x13\x39\xae\xfd\x2a\x93\x6e\xbb\x96\x02\x39\xea\xda\x5a"
+$ECHO -ne "\x87\xb8\xfa\x54\x2c\x49\xa3\xa0\xbb\xa5\xc4\x10\x5c\xd2\x10\x10"
+$ECHO -ne "\x0c\x88\xb2\xd4\xf4\x67\x6a\x93\x5b\xbb\x20\x06\xdc\x75\x7f\x3a"
+$ECHO -ne "\x9b\xa3\xb0\x76\x98\xd9\x77\x32\x97\xa5\xdc\x64\xa4\x7b\xa5\xae"
+$ECHO -ne "\xaa\x15\x2d\x59\x0c\xc1\x7a\x40\xd2\xc2\xbb\x45\x10\xe1\x9a\x46"
+$ECHO -ne "\x52\x91\xe4\x24\x21\x9c\x46\xee\x05\x57\x44\x5e\x41\xad\x5a\x08"
+$ECHO -ne "\x46\x0b\xa0\xdf\xb4\x59\x7a\xe4\x41\xa3\x0a\x59\x5e\x2b\x17\x20"
+$ECHO -ne "\x19\x02\x6c\xe6\xe2\x48\x85\x99\xb3\xba\xfc\x9c\xe3\xcd\xf9\x31"
+$ECHO -ne "\x5b\xf1\x86\x64\x9d\x8f\x93\x24\xa3\x29\x38\x94\xcb\x1e\x71\x87"
+$ECHO -ne "\x54\xf2\x27\x22\x4e\x57\x26\x9a\x82\xb5\x6e\x6c\x1c\xad\x2d\x2b"
+$ECHO -ne "\x22\x62\x0a\xd0\x23\x5d\x5a\x75\x15\xae\xa0\x26\x04\x21\x6d\x2c"
+$ECHO -ne "\xfe\x06\xd9\x60\x61\x20\x8e\xea\xef\xba\x59\x03\x64\xda\xe5\xb2"
+$ECHO -ne "\x30\xc0\x9c\xdc\xcf\x11\x77\xe9\x23\x54\x33\xb8\xe9\x05\xab\x4c"
+$ECHO -ne "\x5b\xb5\x4b\x2d\x03\x0c\x51\xc5\x80\x11\x51\xac\xeb\x8d\x4c\x25"
+$ECHO -ne "\x21\x98\x79\xb0\x38\x99\x9c\xbc\xe2\x96\xe9\x4a\xd0\xad\x56\x6a"
+$ECHO -ne "\x65\xe1\xd4\x90\x12\x4a\xa5\x48\x06\xc6\x48\x31\xac\xaf\x21\x0a"
+$ECHO -ne "\x56\xa2\x90\x12\xd7\x53\xa8\x48\x03\x75\x2e\x36\x14\xf4\x50\x89"
+$ECHO -ne "\x7c\x49\x4e\x4a\x2a\xbc\x46\xc3\x2d\x16\x4e\x42\x25\x28\xd4\xf2"
+$ECHO -ne "\x01\x47\xa3\x5a\xd1\x6a\x0c\x1c\x35\x9c\x52\xc8\x2d\xeb\xab\x15"
+$ECHO -ne "\x2a\x99\x51\x45\x22\x9c\x77\xaf\x85\x77\xbc\x84\xb2\xf5\x99\xe9"
+$ECHO -ne "\xd8\xd9\xc1\x90\x83\x02\xeb\xde\x8f\x91\x82\xa3\x0c\x73\x1a\x05"
+$ECHO -ne "\x6b\x9c\x98\x28\xc5\x56\x55\xe9\xf3\x74\x24\x81\x48\xaf\x21\xb4"
+$ECHO -ne "\x84\x2d\x6b\x45\x88\xc2\x90\xb1\x12\x12\x60\xc8\x6a\xec\x61\x33"
+$ECHO -ne "\xa2\xc3\xb3\x58\xbf\x29\x1c\x48\x97\x7a\xea\x20\x65\x03\x7f\x22"
+$ECHO -ne "\x45\xa5\xdd\x03\x5c\x52\xdc\x30\x85\xde\xd9\x47\x5e\xeb\x31\x65"
+$ECHO -ne "\x0b\xf3\x13\x80\xae\x3e\x07\x52\x2a\x47\xb9\x7b\x7c\xa8\x41\x79"
+$ECHO -ne "\x95\x2e\xcf\x3d\x60\x08\xe6\x26\x00\xd1\x82\x60\x70\x45\xa1\x4a"
+$ECHO -ne "\x48\xa2\x18\x76\x35\xb5\xe8\x6c\x0d\x42\xd2\xba\x2c\x13\x5b\x25"
+$ECHO -ne "\x27\xd4\x8d\x73\x7a\xf8\xd9\xfe\xf3\xd3\x81\x73\x83\xe8\x65\x60"
+$ECHO -ne "\xf3\x5b\x18\x07\x15\x04\x60\x67\x51\xca\xab\x91\x85\xdc\x61\x3a"
+$ECHO -ne "\xe9\x72\xc2\xd1\xa4\x68\xe2\x00\xc8\x0c\x5e\x82\xa0\x0b\x82\x16"
+$ECHO -ne "\x40\x82\xb2\x98\x7b\x76\xf8\x5b\xb5\xf6\x8d\xfb\xc9\x36\x8c\x1e"
+$ECHO -ne "\xa6\xc9\xb5\x95\xd8\x36\x28\x36\xee\xa9\xa2\x72\x66\x58\xf5\x90"
+$ECHO -ne "\x02\x95\xee\xa8\xfc\x79\xfa\x6f\x66\xf6\x47\xd6\x4f\x10\x95\x86"
+$ECHO -ne "\x54\x0d\xa0\x22\x26\x01\xbe\x63\xc5\xf1\xac\x36\x4a\xe1\x0f\x6b"
+$ECHO -ne "\xe7\xba\x4f\x20\x17\xc0\xf9\x02\x5d\xc4\xc0\xaf\xf0\x1f\x88\x54"
+$ECHO -ne "\xe4\x6e\xc0\xa2\xbb\x59\x6f\x82\x21\xbb\x50\x9c\x4e\x92\x83\x24"
+$ECHO -ne "\x23\xf8\x28\x4c\x45\x79\x88\x71\x3b\x05\x79\x98\x4f\xa1\x00\x2d"
+$ECHO -ne "\x6e\x68\x08\x46\x3b\xfb\xf0\x5c\x22\xf3\x42\x40\x7d\x5e\x67\x3f"
+$ECHO -ne "\xdf\xff\x2e\x73\x0d\x31\xb5\xc0\x78\x4c\x0f\x85\x0f\xdb\xe6\x2b"
+$ECHO -ne "\x86\x0f\xb3\x8f\x9d\x1a\xe6\xe2\xdb\x32\x68\xfb\x5a\x79\x0a\xf4"
+$ECHO -ne "\x25\x28\x01\x39\xd2\x7c\x05\x7b\x0b\x18\xbb\x9c\x68\x31\x8d\xb0"
+$ECHO -ne "\xfc\x69\x2d\x17\x2c\x33\x62\xa6\x24\x6f\x0e\xcc\xdc\xff\x7b\xdf"
+$ECHO -ne "\x78\xd3\x88\x5c\x4a\xbd\xeb\x14\xda\xe0\x0e\xd3\xf3\x5b\xd2\xaa"
+$ECHO -ne "\xd1\x64\x82\x42\x0c\xfe\x54\x90\x40\xeb\x75\x13\x63\x68\xb5\x52"
+$ECHO -ne "\x0a\xd9\x3b\xc5\xd0\x14\xe1\xd2\x35\xab\x2b\x8b\xed\x21\xf3\xe1"
+$ECHO -ne "\xcb\xed\xbc\x3e\x64\x81\x63\x5f\xaa\xf3\xb8\x05\x10\x29\xe1\x67"
+$ECHO -ne "\xae\x0a\x16\xbb\x71\x05\x02\x46\xba\xef\x30\xda\xe7\x3a\x18\x4b"
+$ECHO -ne "\xcb\x0e\x97\xd1\xe9\xf5\x7a\x73\xc1\x60\x91\xaf\x63\x4a\xc8\x57"
+$ECHO -ne "\xa6\xb0\x09\xb4\x95\x98\x87\xa9\xc4\x5e\x04\xe7\xef\xbf\xe5\x8c"
+$ECHO -ne "\x39\x8e\xe2\xdd\x9a\xc0\xbf\x37\x9c\x38\xa3\xad\xc6\x14\x86\x3f"
+$ECHO -ne "\x7d\xc1\x9d\xb5\xbb\x68\x58\x4c\x14\x03\xf1\x36\xd4\xf2\xce\xb6"
+$ECHO -ne "\xbc\x9d\xb3\x31\x55\x68\x0c\x5f\xd0\x30\xe2\x05\xae\x68\x4e\x11"
+$ECHO -ne "\x5a\x28\x15\x68\x8f\xac\xa3\x1b\x89\xad\x48\x89\x08\x08\xa3\x3b"
+$ECHO -ne "\x26\x5e\x32\x1d\x6d\x73\x2b\x20\x90\x08\x4a\x12\xb0\x1f\xf1\xa3"
+$ECHO -ne "\x37\xf8\xec\x30\x21\x06\xf3\xbb\x3b\x46\xf9\xaa\xeb\x1a\x31\x33"
+$ECHO -ne "\x2b\xa5\x87\x4d\x4d\xbc\x13\xda\xa9\xa0\x4c\xca\x0b\x46\xa6\x09"
+$ECHO -ne "\x41\x73\xbb\x3f\x71\x9f\x6a\x88\x41\x02\x20\x3f\x54\x6d\x42\xc8"
+$ECHO -ne "\x70\x6e\x64\xd0\x50\x88\x83\xc4\x33\x78\x6d\x04\xb6\x43\xed\x5e"
+$ECHO -ne "\x72\x71\x6b\xd5\x65\x80\xcf\x66\x46\x29\x10\xdb\x79\xd1\xa9\x95"
+$ECHO -ne "\xb7\x9d\xf4\xa9\x93\xb4\x5a\x00\xc6\xb2\xad\xbf\x7e\xaa\xe6\x8d"
+$ECHO -ne "\x8c\xc0\x6b\xf5\xc2\xad\x00\xfb\x08\x63\xe2\xb5\xb1\xe0\x76\xac"
+$ECHO -ne "\x0a\xe4\x72\xb5\x72\xbc\x24\x6b\xef\x62\x0f\xaa\xb9\x28\xd2\x3c"
+$ECHO -ne "\xf6\x3e\x26\x20\x8b\xcc\xd2\x61\xcd\xd4\xc7\xed\x39\xa8\x39\x4e"
+$ECHO -ne "\x7e\x05\x97\xeb\x29\x24\x3a\xb2\xc9\xbd\xad\xcf\xf0\x22\xbc\xdd"
+$ECHO -ne "\xb8\x8c\x2e\x6a\xbf\x4f\x67\x2f\xfc\x07\xd0\x53\x0c\x54\x30\x35"
+$ECHO -ne "\xf8\xf1\x76\x45\x26\x5a\x86\x11\x1e\xeb\x58\xc0\x2d\x6c\x3d\x87"
+$ECHO -ne "\xa6\xca\x8e\x89\x4f\x75\x88\xf9\xb9\x9a\x99\x8b\x68\x22\xe2\x52"
+$ECHO -ne "\x4d\x46\x8d\x44\x31\x2b\xc1\xb0\x19\xa7\x90\xfb\x95\xda\x19\x2f"
+$ECHO -ne "\x6e\x0d\xe2\xc1\x85\xd0\x1f\x9b\xd3\xae\x33\xe3\x55\xa4\x77\xf2"
+$ECHO -ne "\xf1\xd7\xa8\xf0\x57\x30\xc4\x3b\xe6\x55\x97\xf9\xe3\x89\x82\xda"
+$ECHO -ne "\xae\x02\x45\xb1\x86\x8c\x84\x4c\xb2\xcf\x82\xdb\x4e\x04\x45\xcc"
+$ECHO -ne "\x19\x53\x9e\x2f\x95\xa9\xc7\xa8\x08\x17\x61\xc1\x8c\x26\x7f\x9b"
+$ECHO -ne "\x07\x8c\xe7\x77\x2d\x12\xd2\xcd\xc6\x97\xcf\x29\x3a\x1e\xac\x2b"
+$ECHO -ne "\x69\xb9\xb4\x61\xee\xeb\xb3\xae\x60\x18\xa0\x3a\xe5\xc0\xb9\x58"
+$ECHO -ne "\x38\x4d\x32\x57\x81\x89\x99\x29\x73\xdd\x47\x43\x2f\x1e\x39\xc6"
+$ECHO -ne "\x06\xbf\x7f\x64\x9e\x91\xc3\x9f\x18\x1b\xba\xf8\xb5\x29\x5d\xe3"
+$ECHO -ne "\x46\x7e\xb5\x1a\xfd\x9b\xb0\x1b\x85\x06\xc3\xc5\x09\xdb\x82\xd0"
+$ECHO -ne "\xd1\xff\xe1\x0f\xeb\x37\x1d\xce\x65\x6d\x26\x55\xe0\x20\x00\xc4"
+$ECHO -ne "\x36\x2f\xba\x86\x26\xc6\x7b\xa4\xe9\xb1\x41\x20\x04\x11\xeb\x24"
+$ECHO -ne "\x3c\x72\xbf\xd3\xc5\xb3\xbd\xce\x14\x45\x2d\x50\x01\x00\x26\x39"
+$ECHO -ne "\x3c\x85\x17\x0e\x42\x66\x8a\x1c\x94\xa8\x90\x02\xc4\x42\xd8\xd1"
+$ECHO -ne "\xcc\x94\x7a\x25\xad\xfd\x8d\xa4\x0e\xe0\xcb\x92\x5e\x6f\x14\x2b"
+$ECHO -ne "\x29\xbd\xc0\x81\x20\x3f\x0b\x2c\x7a\x2c\xe7\xba\x6d\x99\x14\xbe"
+$ECHO -ne "\xd5\x39\xc8\x6f\x2e\xbd\x79\x59\x19\x75\xb6\xf5\x4f\x12\xf6\x8e"
+$ECHO -ne "\x40\xa0\x00\x8b\x12\xe8\xfb\xb7\x27\xaa\xd3\x36\x0c\xfc\xe1\x40"
+$ECHO -ne "\x01\xff\x8b\xb9\x22\x9c\x28\x48\x5f\xa5\xca\xf3\x80"
+}
+
+prep() {
+ rm -f t*
+ hello_$ext >t1.$ext
+ hello_$ext >t2.$ext
+}
+
+check() {
+ eval $2 >t_actual 2>&1
+ if $ECHO -ne "$expected" | cmp - t_actual; then
+ echo "$1: PASS"
+ else
+ echo "$1: FAIL"
+ fi
+}
+
+mkdir testdir 2>/dev/null
+(
+cd testdir || { echo "cannot cd testdir!"; exit 1; }
+
+expected="$unpack: z: No such file or directory
+1
+HELLO
+"
+prep; check "$unpack: doesnt exist" "${bb}$unpack z t1.$ext; echo \$?; cat t1"
+
+
+expected="$unpack: t.zz: unknown suffix - ignored
+1
+HELLO
+"
+prep; >t.zz; check "$unpack: unknown suffix" "${bb}$unpack t.zz t1.$ext; echo \$?; cat t1"
+
+
+# In this case file "t1" exists, and we skip t1.gz and unpack t2.gz
+expected="$unpack: can't open 't1': File exists
+1
+HELLO
+"
+prep; >t1; check "$unpack: already exists" "${bb}$unpack t1.$ext t2.$ext; echo \$?; cat t1 t2"
+
+
+# From old testsuite
+expected="HELLO\n0\n"
+prep; check "$unpack: stream unpack" "cat t1.$ext | ${bb}$unpack; echo $?"
+
+expected="ok\n"
+prep; check "$unpack: delete src" "${bb}$unpack t2.$ext; test ! -f t2.$ext && echo ok"
+
+)
+rm -rf testdir
+
+# This test is only for bunzip2
+if test "${0##*/}" = "bunzip2.tests"; then
+ if test1_bz2 | ${bb}bunzip2 >/dev/null \
+ && test "`test1_bz2 | ${bb}bunzip2 | md5sum`" = "61bbeee4be9c6f110a71447f584fda7b -"
+ then
+ echo "$unpack: test bz2 file: PASS"
+ else
+ echo "$unpack: test bz2 file: FAIL"
+ fi
+fi
diff --git a/release/src/router/busybox/testsuite/bunzip2/bunzip2-reads-from-standard-input b/release/src/router/busybox/testsuite/bunzip2/bunzip2-reads-from-standard-input
index e212a120..e212a120 100755..100644
--- a/release/src/router/busybox/testsuite/bunzip2/bunzip2-reads-from-standard-input
+++ b/release/src/router/busybox/testsuite/bunzip2/bunzip2-reads-from-standard-input
diff --git a/release/src/router/busybox/testsuite/bunzip2/bunzip2-removes-compressed-file b/release/src/router/busybox/testsuite/bunzip2/bunzip2-removes-compressed-file
index f1d15503..f1d15503 100755..100644
--- a/release/src/router/busybox/testsuite/bunzip2/bunzip2-removes-compressed-file
+++ b/release/src/router/busybox/testsuite/bunzip2/bunzip2-removes-compressed-file
diff --git a/release/src/router/busybox/testsuite/bunzip2/bzcat-does-not-remove-compressed-file b/release/src/router/busybox/testsuite/bunzip2/bzcat-does-not-remove-compressed-file
index 7d4016ec..7d4016ec 100755..100644
--- a/release/src/router/busybox/testsuite/bunzip2/bzcat-does-not-remove-compressed-file
+++ b/release/src/router/busybox/testsuite/bunzip2/bzcat-does-not-remove-compressed-file
diff --git a/release/src/router/busybox/testsuite/busybox.tests b/release/src/router/busybox/testsuite/busybox.tests
new file mode 100755
index 00000000..26536c65
--- /dev/null
+++ b/release/src/router/busybox/testsuite/busybox.tests
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# Tests for busybox applet itself.
+# Copyright 2005 by Rob Landley <rob@landley.net>
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+HELPDUMP=`busybox`
+
+# We need to test under calling the binary under other names.
+
+
+testing "busybox --help busybox" "busybox --help busybox" "$HELPDUMP\n\n" "" ""
+
+ln -s `which busybox` busybox-suffix
+for i in busybox ./busybox-suffix
+do
+ # The gratuitous "\n"s are due to a shell idiosyncrasy:
+ # environment variables seem to strip trailing whitespace.
+
+ testing "" "$i" "$HELPDUMP\n\n" "" ""
+
+ testing "$i unknown" "$i unknown 2>&1" \
+ "unknown: applet not found\n" "" ""
+
+ testing "$i --help" "$i --help 2>&1" "$HELPDUMP\n\n" "" ""
+
+ optional CAT
+ testing "" "$i cat" "moo" "" "moo"
+ testing "$i --help cat" "$i --help cat 2>&1 | grep prints" \
+ "Concatenates FILE(s) and prints them to stdout.\n" "" ""
+ optional ""
+
+ testing "$i --help unknown" "$i --help unknown 2>&1" \
+ "unknown: applet not found\n" "" ""
+done
+rm busybox-suffix
+
+ln -s `which busybox` unknown
+
+testing "busybox as unknown name" "./unknown 2>&1" \
+ "unknown: applet not found\n" "" ""
+rm unknown
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/bzcat.tests b/release/src/router/busybox/testsuite/bzcat.tests
new file mode 100755
index 00000000..0bc74424
--- /dev/null
+++ b/release/src/router/busybox/testsuite/bzcat.tests
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+ext=bz2
+
+bb="busybox "
+
+unset LC_ALL
+unset LC_MESSAGES
+unset LANG
+unset LANGUAGE
+
+hello_gz() {
+ # Gzipped "HELLO\n"
+ #_________________________ vvv vvv vvv vvv - mtime
+ $ECHO -ne "\x1f\x8b\x08\x00\x85\x1d\xef\x45\x02\x03\xf3\x70\xf5\xf1\xf1\xe7"
+ $ECHO -ne "\x02\x00\x6e\xd7\xac\xfd\x06\x00\x00\x00"
+}
+
+hello_bz2() {
+ # Bzipped "HELLO\n"
+ $ECHO -ne "\x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\x5b\xb8\xe8\xa3\x00\x00"
+ $ECHO -ne "\x01\x44\x00\x00\x10\x02\x44\xa0\x00\x30\xcd\x00\xc3\x46\x29\x97"
+ $ECHO -ne "\x17\x72\x45\x38\x50\x90\x5b\xb8\xe8\xa3"
+}
+
+prep() {
+ rm -f t*
+ hello_$ext >t1.$ext
+ hello_$ext >t2.$ext
+}
+
+check() {
+ eval $2 >t_actual 2>&1
+ if $ECHO -ne "$expected" | cmp - t_actual; then
+ echo "$1: PASS"
+ else
+ echo "$1: FAIL"
+ fi
+}
+
+mkdir testdir 2>/dev/null
+(
+cd testdir || { echo "cannot cd testdir!"; exit 1; }
+
+expected="HELLO\nok\n"
+prep; check "bzcat: dont delete src" "${bb}bzcat t2.bz2; test -f t2.bz2 && echo ok"
+
+)
+rm -rf testdir
diff --git a/release/src/router/busybox/testsuite/cat/cat-prints-a-file b/release/src/router/busybox/testsuite/cat/cat-prints-a-file
index e3f35a86..e3f35a86 100755..100644
--- a/release/src/router/busybox/testsuite/cat/cat-prints-a-file
+++ b/release/src/router/busybox/testsuite/cat/cat-prints-a-file
diff --git a/release/src/router/busybox/testsuite/cat/cat-prints-a-file-and-standard-input b/release/src/router/busybox/testsuite/cat/cat-prints-a-file-and-standard-input
index bc923188..bc923188 100755..100644
--- a/release/src/router/busybox/testsuite/cat/cat-prints-a-file-and-standard-input
+++ b/release/src/router/busybox/testsuite/cat/cat-prints-a-file-and-standard-input
diff --git a/release/src/router/busybox/testsuite/cmp/cmp-detects-difference b/release/src/router/busybox/testsuite/cmp/cmp-detects-difference
index aa074448..b9bb628f 100755..100644
--- a/release/src/router/busybox/testsuite/cmp/cmp-detects-difference
+++ b/release/src/router/busybox/testsuite/cmp/cmp-detects-difference
@@ -1,3 +1,9 @@
echo foo >foo
echo bar >bar
-! busybox cmp -s foo bar
+set +e
+busybox cmp -s foo bar
+if [ $? != 0 ] ; then
+ exit 0;
+fi
+
+exit 1;
diff --git a/release/src/router/busybox/testsuite/comm.tests b/release/src/router/busybox/testsuite/comm.tests
new file mode 100755
index 00000000..44169f9b
--- /dev/null
+++ b/release/src/router/busybox/testsuite/comm.tests
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# Copyright 2008 by Denys Vlasenko <vda.linux@googlemail.com>
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# testing "description" "command" "result" "infile" "stdin"
+
+testing "comm test 1" "comm input -" "\t123\n""456\n""abc\n""\tdef\n" "456\nabc\n" "123\ndef\n"
+testing "comm test 2" "comm - input" "123\n""\t456\n""\tabc\n""def\n" "456\nabc\n" "123\ndef\n"
+testing "comm test 3" "comm input -" "abc\n""\tdef\n""xyz\n" "abc\nxyz\n" "def\n"
+testing "comm test 4" "comm - input" "\tabc\n""def\n""\txyz\n" "abc\nxyz\n" "def\n"
+testing "comm test 5" "comm input -" "123\n""abc\n""\tdef\n" "123\nabc\n" "def\n"
+testing "comm test 6" "comm - input" "\t123\n""\tabc\n""def\n" "123\nabc\n" "def\n"
+testing "comm unterminated line 1" "comm input -" "abc\n""\tdef\n" "abc" "def"
+testing "comm unterminated line 2" "comm - input" "\tabc\n""def\n" "abc" "def"
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/cp/cp-RHL-does_not_preserve-links b/release/src/router/busybox/testsuite/cp/cp-RHL-does_not_preserve-links
new file mode 100644
index 00000000..eed6c3ec
--- /dev/null
+++ b/release/src/router/busybox/testsuite/cp/cp-RHL-does_not_preserve-links
@@ -0,0 +1,6 @@
+mkdir a
+>a/file
+ln -s file a/link
+busybox cp -RHL a b
+test ! -L b/link
+#sh </dev/tty >/dev/tty 2>&1
diff --git a/release/src/router/busybox/testsuite/cp/cp-a-files-to-dir b/release/src/router/busybox/testsuite/cp/cp-a-files-to-dir
new file mode 100644
index 00000000..abdbdf77
--- /dev/null
+++ b/release/src/router/busybox/testsuite/cp/cp-a-files-to-dir
@@ -0,0 +1,15 @@
+echo file number one > file1
+echo file number two > file2
+ln -s file2 link1
+mkdir dir1
+# why???
+#touch --date='Sat Jan 29 21:24:08 PST 2000' dir1/file3
+mkdir there
+busybox cp -a file1 file2 link1 dir1 there
+test -f there/file1
+test -f there/file2
+test ! -s there/dir1/file3
+test -L there/link1
+test xfile2 = x`readlink there/link1`
+test ! dir1/file3 -ot there/dir1/file3
+test ! dir1/file3 -nt there/dir1/file3
diff --git a/release/src/router/busybox/testsuite/cp/cp-a-preserves-links b/release/src/router/busybox/testsuite/cp/cp-a-preserves-links
new file mode 100644
index 00000000..0c0cd965
--- /dev/null
+++ b/release/src/router/busybox/testsuite/cp/cp-a-preserves-links
@@ -0,0 +1,5 @@
+touch foo
+ln -s foo bar
+busybox cp -a bar baz
+test -L baz
+test xfoo = x`readlink baz`
diff --git a/release/src/router/busybox/testsuite/cp/cp-copies-empty-file b/release/src/router/busybox/testsuite/cp/cp-copies-empty-file
index ad25aa12..ad25aa12 100755..100644
--- a/release/src/router/busybox/testsuite/cp/cp-copies-empty-file
+++ b/release/src/router/busybox/testsuite/cp/cp-copies-empty-file
diff --git a/release/src/router/busybox/testsuite/cp/cp-copies-large-file b/release/src/router/busybox/testsuite/cp/cp-copies-large-file
index c2225c6d..c2225c6d 100755..100644
--- a/release/src/router/busybox/testsuite/cp/cp-copies-large-file
+++ b/release/src/router/busybox/testsuite/cp/cp-copies-large-file
diff --git a/release/src/router/busybox/testsuite/cp/cp-copies-small-file b/release/src/router/busybox/testsuite/cp/cp-copies-small-file
index d52a887c..d52a887c 100755..100644
--- a/release/src/router/busybox/testsuite/cp/cp-copies-small-file
+++ b/release/src/router/busybox/testsuite/cp/cp-copies-small-file
diff --git a/release/src/router/busybox/testsuite/cp/cp-d-files-to-dir b/release/src/router/busybox/testsuite/cp/cp-d-files-to-dir
new file mode 100644
index 00000000..9571a567
--- /dev/null
+++ b/release/src/router/busybox/testsuite/cp/cp-d-files-to-dir
@@ -0,0 +1,11 @@
+echo file number one > file1
+echo file number two > file2
+touch file3
+ln -s file2 link1
+mkdir there
+busybox cp -d file1 file2 file3 link1 there
+test -f there/file1
+test -f there/file2
+test ! -s there/file3
+test -L there/link1
+test xfile2 = x`readlink there/link1`
diff --git a/release/src/router/busybox/testsuite/cp/cp-dev-file b/release/src/router/busybox/testsuite/cp/cp-dev-file
new file mode 100644
index 00000000..055f0d9e
--- /dev/null
+++ b/release/src/router/busybox/testsuite/cp/cp-dev-file
@@ -0,0 +1,2 @@
+busybox cp /dev/null foo
+test -f foo
diff --git a/release/src/router/busybox/testsuite/cp/cp-dir-create-dir b/release/src/router/busybox/testsuite/cp/cp-dir-create-dir
new file mode 100644
index 00000000..a8d7b50a
--- /dev/null
+++ b/release/src/router/busybox/testsuite/cp/cp-dir-create-dir
@@ -0,0 +1,4 @@
+mkdir bar
+touch bar/baz
+busybox cp -R bar foo
+test -f foo/baz
diff --git a/release/src/router/busybox/testsuite/cp/cp-dir-existing-dir b/release/src/router/busybox/testsuite/cp/cp-dir-existing-dir
new file mode 100644
index 00000000..4c788ba7
--- /dev/null
+++ b/release/src/router/busybox/testsuite/cp/cp-dir-existing-dir
@@ -0,0 +1,5 @@
+mkdir bar
+touch bar/baz
+mkdir foo
+busybox cp -R bar foo
+test -f foo/bar/baz
diff --git a/release/src/router/busybox/testsuite/cp/cp-does-not-copy-unreadable-file b/release/src/router/busybox/testsuite/cp/cp-does-not-copy-unreadable-file
index 68c57672..e17e8e66 100755..100644
--- a/release/src/router/busybox/testsuite/cp/cp-does-not-copy-unreadable-file
+++ b/release/src/router/busybox/testsuite/cp/cp-does-not-copy-unreadable-file
@@ -1,4 +1,11 @@
touch foo
chmod a-r foo
-busybox cp foo bar
+set +e
+if test `id -u` = 0; then
+ # run as user with nonzero uid
+ setuidgid 1 busybox cp foo bar
+else
+ busybox cp foo bar
+fi
+set -e
test ! -f bar
diff --git a/release/src/router/busybox/testsuite/cp/cp-files-to-dir b/release/src/router/busybox/testsuite/cp/cp-files-to-dir
new file mode 100644
index 00000000..fdb81916
--- /dev/null
+++ b/release/src/router/busybox/testsuite/cp/cp-files-to-dir
@@ -0,0 +1,11 @@
+echo file number one > file1
+echo file number two > file2
+touch file3
+ln -s file2 link1
+mkdir there
+busybox cp file1 file2 file3 link1 there
+test -f there/file1
+test -f there/file2
+test ! -s there/file3
+test -f there/link1
+cmp there/file2 there/link1
diff --git a/release/src/router/busybox/testsuite/cp/cp-follows-links b/release/src/router/busybox/testsuite/cp/cp-follows-links
index 2d9f05e9..2d9f05e9 100755..100644
--- a/release/src/router/busybox/testsuite/cp/cp-follows-links
+++ b/release/src/router/busybox/testsuite/cp/cp-follows-links
diff --git a/release/src/router/busybox/testsuite/cp/cp-preserves-hard-links b/release/src/router/busybox/testsuite/cp/cp-preserves-hard-links
index 4de7b85d..4de7b85d 100755..100644
--- a/release/src/router/busybox/testsuite/cp/cp-preserves-hard-links
+++ b/release/src/router/busybox/testsuite/cp/cp-preserves-hard-links
diff --git a/release/src/router/busybox/testsuite/cp/cp-preserves-links b/release/src/router/busybox/testsuite/cp/cp-preserves-links
index a5269e8d..301dc5fd 100755..100644
--- a/release/src/router/busybox/testsuite/cp/cp-preserves-links
+++ b/release/src/router/busybox/testsuite/cp/cp-preserves-links
@@ -2,3 +2,4 @@ touch foo
ln -s foo bar
busybox cp -d bar baz
test -L baz
+test xfoo = x`readlink baz`
diff --git a/release/src/router/busybox/testsuite/cp/cp-preserves-source-file b/release/src/router/busybox/testsuite/cp/cp-preserves-source-file
index f0f5065f..f0f5065f 100755..100644
--- a/release/src/router/busybox/testsuite/cp/cp-preserves-source-file
+++ b/release/src/router/busybox/testsuite/cp/cp-preserves-source-file
diff --git a/release/src/router/busybox/testsuite/cpio.tests b/release/src/router/busybox/testsuite/cpio.tests
new file mode 100755
index 00000000..eb3e5764
--- /dev/null
+++ b/release/src/router/busybox/testsuite/cpio.tests
@@ -0,0 +1,83 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# ls -ln shows date. Need to remove that, it's variable.
+# sed: coalesce spaces
+# cut: remove date
+FILTER_LS="sed 's/ */ /g' | cut -d' ' -f 1-5,9-"
+
+
+# newc cpio archive of directory cpio.testdir with empty x and y hardlinks
+hexdump="\
+\x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\x64\x1e\x91\x8c\x00\x00\
+\x48\x7f\x80\x4c\x48\x08\x00\x28\x01\xff\xe0\x3f\x24\x14\x00\x0e\
+\x20\xdc\x60\x20\x00\x92\x11\xea\xa0\x1a\x00\x00\x00\x03\x20\x8a\
+\x93\xd4\x9a\x68\x1a\x0d\x1e\x91\xa1\xa0\x06\x98\xe3\x5c\x2f\xd9\
+\x26\xa1\x25\x24\x20\xed\x47\xc7\x21\x40\x2b\x6e\xf2\xe6\xfe\x98\
+\x13\x68\xa8\xbd\x82\xb2\x4f\x26\x02\x24\x16\x5b\x22\x16\x72\x74\
+\x15\xcd\xc1\xa6\x9e\xa6\x5e\x6c\x16\x37\x35\x01\x99\xc4\x81\x21\
+\x29\x28\x4b\x69\x51\xa9\x3c\x1a\x9b\x0a\xe1\xe4\xb4\xaf\x85\x73\
+\xba\x23\x10\x59\xe8\xb3\xe1\xa1\x63\x05\x8c\x4f\xc5\xdc\x91\x4e\
+\x14\x24\x19\x07\xa4\x63\x00"
+
+user=$(id -u)
+group=$(id -g)
+
+rm -rf cpio.testdir cpio.testdir2 2>/dev/null
+
+# testing "test name" "command" "expected result" "file input" "stdin"
+
+testing "cpio extracts zero-sized hardlinks" \
+"$ECHO -ne '$hexdump' | bzcat | cpio -i; echo \$?;
+ls -ln cpio.testdir | $FILTER_LS" \
+"\
+1 blocks
+0
+-rw-r--r-- 2 $user $group 0 x
+-rw-r--r-- 2 $user $group 0 y
+" \
+ "" ""
+
+# Currently fails. Numerous: "1 blocks" versus "1 block",
+# "1 block" must go to stderr, does not list cpio.testdir/x and cpio.testdir/y
+testing "cpio lists hardlinks" \
+"$ECHO -ne '$hexdump' | bzcat | cpio -t 2>&1; echo \$?" \
+"\
+1 block
+cpio.testdir
+cpio.testdir/x
+cpio.testdir/y
+0
+" \
+ "" ""
+
+# More complex case
+rm -rf cpio.testdir cpio.testdir2 2>/dev/null
+mkdir cpio.testdir
+touch cpio.testdir/solo
+touch cpio.testdir/empty
+echo x >cpio.testdir/nonempty
+ln cpio.testdir/empty cpio.testdir/empty1
+ln cpio.testdir/nonempty cpio.testdir/nonempty1
+mkdir cpio.testdir2
+
+testing "cpio extracts zero-sized hardlinks 2" \
+"find cpio.testdir | cpio -H newc --create | (cd cpio.testdir2 && cpio -i); echo \$?;
+ls -ln cpio.testdir2/cpio.testdir | $FILTER_LS" \
+"\
+0
+-rw-r--r-- 2 $user $group 0 empty
+-rw-r--r-- 2 $user $group 0 empty1
+-rw-r--r-- 2 $user $group 2 nonempty
+-rw-r--r-- 2 $user $group 2 nonempty1
+-rw-r--r-- 1 $user $group 0 solo
+" \
+ "" ""
+
+# Clean up
+rm -rf cpio.testdir cpio.testdir2 2>/dev/null
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/cut.tests b/release/src/router/busybox/testsuite/cut.tests
new file mode 100755
index 00000000..2788d1fb
--- /dev/null
+++ b/release/src/router/busybox/testsuite/cut.tests
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com>
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+# file input will be file called "input"
+# test can create a file "actual" instead of writing to stdout
+
+testing "cut '-' (stdin) and multi file handling" \
+ "cut -d' ' -f2 - input" \
+ "over\n""quick\n" \
+ "the quick brown fox\n" \
+ "jumps over the lazy dog\n" \
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/cut/cut-cuts-a-character b/release/src/router/busybox/testsuite/cut/cut-cuts-a-character
index d6c5efa3..d6c5efa3 100755..100644
--- a/release/src/router/busybox/testsuite/cut/cut-cuts-a-character
+++ b/release/src/router/busybox/testsuite/cut/cut-cuts-a-character
diff --git a/release/src/router/busybox/testsuite/cut/cut-cuts-a-closed-range b/release/src/router/busybox/testsuite/cut/cut-cuts-a-closed-range
index 9680b765..9680b765 100755..100644
--- a/release/src/router/busybox/testsuite/cut/cut-cuts-a-closed-range
+++ b/release/src/router/busybox/testsuite/cut/cut-cuts-a-closed-range
diff --git a/release/src/router/busybox/testsuite/cut/cut-cuts-a-field b/release/src/router/busybox/testsuite/cut/cut-cuts-a-field
index 4c7f4400..4c7f4400 100755..100644
--- a/release/src/router/busybox/testsuite/cut/cut-cuts-a-field
+++ b/release/src/router/busybox/testsuite/cut/cut-cuts-a-field
diff --git a/release/src/router/busybox/testsuite/cut/cut-cuts-an-open-range b/release/src/router/busybox/testsuite/cut/cut-cuts-an-open-range
index 1fbf2774..1fbf2774 100755..100644
--- a/release/src/router/busybox/testsuite/cut/cut-cuts-an-open-range
+++ b/release/src/router/busybox/testsuite/cut/cut-cuts-an-open-range
diff --git a/release/src/router/busybox/testsuite/cut/cut-cuts-an-unclosed-range b/release/src/router/busybox/testsuite/cut/cut-cuts-an-unclosed-range
index a2b0cdb0..a2b0cdb0 100755..100644
--- a/release/src/router/busybox/testsuite/cut/cut-cuts-an-unclosed-range
+++ b/release/src/router/busybox/testsuite/cut/cut-cuts-an-unclosed-range
diff --git a/release/src/router/busybox/testsuite/date/date-R-works b/release/src/router/busybox/testsuite/date/date-R-works
new file mode 100644
index 00000000..34cd735e
--- /dev/null
+++ b/release/src/router/busybox/testsuite/date/date-R-works
@@ -0,0 +1 @@
+test x"`date -R`" = x"`busybox date -R`"
diff --git a/release/src/router/busybox/testsuite/date/date-format-works b/release/src/router/busybox/testsuite/date/date-format-works
new file mode 100644
index 00000000..f2a2091c
--- /dev/null
+++ b/release/src/router/busybox/testsuite/date/date-format-works
@@ -0,0 +1,4 @@
+# TODO: gnu date doesn't accept '2000.11.22-11:22:33' format,
+# but accepts '2000-11-22 11:22:33'. We must follow.
+test x"01/01/99" = x"`busybox date -d 1999.01.01-11:22:33 '+%d/%m/%y'`"
+test x"22/11/00" = x"`busybox date -d 2000.11.22-11:22:33 '+%d/%m/%y'`"
diff --git a/release/src/router/busybox/testsuite/date/date-u-works b/release/src/router/busybox/testsuite/date/date-u-works
new file mode 100644
index 00000000..eea6e5ae
--- /dev/null
+++ b/release/src/router/busybox/testsuite/date/date-u-works
@@ -0,0 +1 @@
+test x"Sat Jan 1 11:22:33 UTC 2000" = x"`TZ=CET-1CEST-2 busybox date -u -d 2000.01.01-11:22:33`"
diff --git a/release/src/router/busybox/testsuite/date/date-works b/release/src/router/busybox/testsuite/date/date-works
new file mode 100644
index 00000000..0802e887
--- /dev/null
+++ b/release/src/router/busybox/testsuite/date/date-works
@@ -0,0 +1,44 @@
+dt=`busybox date`
+# Expected format: Fri Apr 25 03:47:55 CEST 2008
+dt=`echo "$dt" | sed 's/^[^ ][^ ][^ ] [^ ][^ ][^ ] [ 0123][0-9] [012][0-9]:[0-5][0-9]:[0-6][0-9] [A-Z][A-Z]* [012][0-9][0-9][0-9]$/OK/'`
+test x"$dt" = x"OK"
+
+dt=`busybox date -d 1:2`
+dt=`echo "$dt" | cut -b12-19`
+test x"$dt" = x"01:02:00"
+
+dt=`busybox date -d 1:2:3`
+dt=`echo "$dt" | cut -b12-19`
+test x"$dt" = x"01:02:03"
+
+dt=`busybox date -d 1.2-3:4`
+dt=`echo "$dt" | cut -b5-19`
+test x"$dt" = x"Jan 2 03:04:00"
+
+dt=`busybox date -d 1.2-3:4:5`
+dt=`echo "$dt" | cut -b5-19`
+test x"$dt" = x"Jan 2 03:04:05"
+
+dt=`busybox date -d 1999.1.2-3:4`
+dt=`echo "$dt" | cut -b1-19`
+test x"$dt" = x"Sat Jan 2 03:04:00"
+
+dt=`busybox date -d 1999.1.2-3:4:5`
+dt=`echo "$dt" | cut -b1-19`
+test x"$dt" = x"Sat Jan 2 03:04:05"
+
+dt=`busybox date -d '1999-1-2 3:4:5'`
+dt=`echo "$dt" | cut -b1-19`
+test x"$dt" = x"Sat Jan 2 03:04:05"
+
+dt=`busybox date -d 01231133`
+dt=`echo "$dt" | cut -b5-19`
+test x"$dt" = x"Jan 23 11:33:00"
+
+dt=`busybox date -d 012311332000`
+dt=`echo "$dt" | cut -b1-19`
+test x"$dt" = x"Sun Jan 23 11:33:00"
+
+dt=`busybox date -d 012311332000.30`
+dt=`echo "$dt" | cut -b1-19`
+test x"$dt" = x"Sun Jan 23 11:33:30"
diff --git a/release/src/router/busybox/testsuite/date/date-works-1 b/release/src/router/busybox/testsuite/date/date-works-1
new file mode 100644
index 00000000..e318944d
--- /dev/null
+++ b/release/src/router/busybox/testsuite/date/date-works-1
@@ -0,0 +1,129 @@
+dt=`busybox date -d 1:2 +%T`
+test x"$dt" = x"01:02:00"
+
+dt=`busybox date -d 1:2:3 +%T`
+test x"$dt" = x"01:02:03"
+
+host_date=/bin/date
+
+# date (GNU coreutils) 6.10 reports:
+# date: invalid date '1.2-3:4'
+# busybox 1.11.0.svn date reports:
+# date: invalid date '1/2 3:4'
+
+# TODO: (1) compare with strings, not "host date"
+# (2) implement d/m[/y] hh:mm[:ss] fmt in date applet
+#hdt=`$host_date -d '1/2 3:4'`
+#dt=`busybox date -d 1.2-3:4`
+#test x"$hdt" = x"$dt"
+
+#hdt=`$host_date -d '1/2 3:4:5'`
+#dt=`busybox date -d 1.2-3:4:5`
+#test x"$hdt" = x"$dt"
+
+#hdt=`$host_date -d '1/2/1999 3:4'`
+#dt=`busybox date -d 1999.1.2-3:4`
+#test x"$hdt" = x"$dt"
+
+#hdt=`$host_date -d '1/2/1999 3:4:5'`
+#dt=`busybox date -d 1999.1.2-3:4:5`
+#test x"$hdt" = x"$dt"
+
+hdt=`$host_date -d '1999-1-2 3:4:5'`
+dt=`busybox date -d '1999-1-2 3:4:5'`
+test x"$hdt" = x"$dt"
+
+# Avoiding using week day in this evaluation, as it's mostly different every year
+# date (GNU coreutils) 6.10 reports:
+# date: invalid date '01231133'
+dt=`busybox date -d 01231133 +%c`
+dt=`echo "$dt" | cut -b5-19`
+test x"$dt" = x"Jan 23 11:33:00"
+
+# date (GNU coreutils) 6.10 reports:
+# date: invalid date '012311332000'
+dt=`busybox date -d 012311332000 +%c`
+test x"$dt" = x"Sun Jan 23 11:33:00 2000"
+
+# date (GNU coreutils) 6.10 reports:
+# date: invalid date '012311332000'
+dt=`busybox date -d 012311332000.30 +%c`
+test x"$dt" = x"Sun Jan 23 11:33:30 2000"
+
+lcbbd="LC_ALL=C busybox date"
+wd=$(eval $lcbbd +%a) # weekday name
+mn=$(eval $lcbbd +%b) # month name
+dm=$(eval $lcbbd +%e) # day of month, space padded
+h=$(eval $lcbbd +%H) # hour, zero padded
+m=$(eval $lcbbd +%M) # minute, zero padded
+s=$(eval $lcbbd +%S) # second, zero padded
+z=$(eval $lcbbd -u +%Z) # time zone abbreviation
+y=$(eval $lcbbd +%Y) # year
+
+res=OK
+case $wd in
+ Sun)
+ ;;
+ Mon)
+ ;;
+ Tue)
+ ;;
+ Wed)
+ ;;
+ Thu)
+ ;;
+ Fri)
+ ;;
+ Sat)
+ ;;
+ *)
+ res=BAD
+ ;;
+esac
+
+case $mn in
+ Jan)
+ ;;
+ Feb)
+ ;;
+ Mar)
+ ;;
+ Apr)
+ ;;
+ May)
+ ;;
+ Jun)
+ ;;
+ Jul)
+ ;;
+ Aug)
+ ;;
+ Sep)
+ ;;
+ Oct)
+ ;;
+ Nov)
+ ;;
+ Dec)
+ ;;
+ *)
+ res=BAD
+ ;;
+esac
+
+dm=${dm# *}
+[ $dm -ge 1 ] && [ $dm -le 31 ] || res=BAD
+h=${h#0}
+[ $h -ge 0 ] && [ $h -le 23 ] || res=BAD
+m=${m#0}
+[ $m -ge 0 ] && [ $m -le 59 ] || res=BAD
+s=${s#0}
+[ $s -ge 0 ] && [ $s -le 59 ] || res=BAD
+[ $z = UTC ] || res=BAD
+[ $y -ge 1970 ] || res=BAD
+
+test x"$res" = xOK
+
+# This should error out (by showing usage text). Testing for that
+dt=`busybox date -d 012311332000.30 %+c 2>&1 | head -n 1`
+test x"${dt#BusyBox * multi-call binary}" = x
diff --git a/release/src/router/busybox/testsuite/dd/dd-accepts-if b/release/src/router/busybox/testsuite/dd/dd-accepts-if
index 03d1af85..03d1af85 100755..100644
--- a/release/src/router/busybox/testsuite/dd/dd-accepts-if
+++ b/release/src/router/busybox/testsuite/dd/dd-accepts-if
diff --git a/release/src/router/busybox/testsuite/dd/dd-accepts-of b/release/src/router/busybox/testsuite/dd/dd-accepts-of
index 84405e62..84405e62 100755..100644
--- a/release/src/router/busybox/testsuite/dd/dd-accepts-of
+++ b/release/src/router/busybox/testsuite/dd/dd-accepts-of
diff --git a/release/src/router/busybox/testsuite/dd/dd-copies-from-standard-input-to-standard-output b/release/src/router/busybox/testsuite/dd/dd-copies-from-standard-input-to-standard-output
index d890eb04..d890eb04 100755..100644
--- a/release/src/router/busybox/testsuite/dd/dd-copies-from-standard-input-to-standard-output
+++ b/release/src/router/busybox/testsuite/dd/dd-copies-from-standard-input-to-standard-output
diff --git a/release/src/router/busybox/testsuite/dd/dd-prints-count-to-standard-error b/release/src/router/busybox/testsuite/dd/dd-prints-count-to-standard-error
index 2187dc02..2187dc02 100755..100644
--- a/release/src/router/busybox/testsuite/dd/dd-prints-count-to-standard-error
+++ b/release/src/router/busybox/testsuite/dd/dd-prints-count-to-standard-error
diff --git a/release/src/router/busybox/testsuite/dd/dd-reports-write-errors b/release/src/router/busybox/testsuite/dd/dd-reports-write-errors
new file mode 100644
index 00000000..49206007
--- /dev/null
+++ b/release/src/router/busybox/testsuite/dd/dd-reports-write-errors
@@ -0,0 +1,2 @@
+busybox dd if="$0" of=/dev/full 2>/dev/null || status=$?
+test $status = 1
diff --git a/release/src/router/busybox/testsuite/diff.tests b/release/src/router/busybox/testsuite/diff.tests
new file mode 100755
index 00000000..ac68a089
--- /dev/null
+++ b/release/src/router/busybox/testsuite/diff.tests
@@ -0,0 +1,124 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+
+# diff outputs date/time in the header, which should not be analysed
+# NB: sed has tab character in s command!
+TRIM_TAB="sed 's/ .*//'"
+
+testing "diff of stdin" \
+ "diff -u - input | $TRIM_TAB" \
+"\
+--- -
++++ input
+@@ -1 +1,3 @@
++qwe
+ asd
++zxc
+" \
+ "qwe\nasd\nzxc\n" \
+ "asd\n"
+
+testing "diff of stdin, no newline in the file" \
+ "diff -u - input | $TRIM_TAB" \
+"\
+--- -
++++ input
+@@ -1 +1,3 @@
++qwe
+ asd
++zxc
+\\ No newline at end of file
+" \
+ "qwe\nasd\nzxc" \
+ "asd\n"
+
+# we also test that stdin is in fact NOT read
+testing "diff of stdin, twice" \
+ "diff - -; echo $?; wc -c" \
+ "0\n5\n" \
+ "" \
+ "stdin"
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+
+rm -rf diff1 diff2
+mkdir diff1 diff2 diff2/subdir
+echo qwe >diff1/-
+echo asd >diff2/subdir/-
+testing "diff diff1 diff2/subdir" \
+ "diff -ur diff1 diff2/subdir | $TRIM_TAB" \
+"\
+--- diff1/-
++++ diff2/subdir/-
+@@ -1 +1 @@
+-qwe
++asd
+" \
+ "" ""
+
+# using directory structure from prev test...
+testing "diff dir dir2/file/-" \
+ "diff -ur diff1 diff2/subdir/- | $TRIM_TAB" \
+"\
+--- diff1/-
++++ diff2/subdir/-
+@@ -1 +1 @@
+-qwe
++asd
+" \
+ "" ""
+
+# using directory structure from prev test...
+mkdir diff1/test
+mkfifo diff2/subdir/test
+testing "diff of dir and fifo" \
+ "diff -ur diff1 diff2/subdir | $TRIM_TAB" \
+"\
+--- diff1/-
++++ diff2/subdir/-
+@@ -1 +1 @@
+-qwe
++asd
+Only in diff2/subdir: test
+" \
+ "" ""
+
+# using directory structure from prev test...
+rmdir diff1/test
+echo >diff1/test
+testing "diff of file and fifo" \
+ "diff -ur diff1 diff2/subdir | $TRIM_TAB" \
+"\
+--- diff1/-
++++ diff2/subdir/-
+@@ -1 +1 @@
+-qwe
++asd
+File diff2/subdir/test is not a regular file or directory and was skipped
+" \
+ "" ""
+
+# using directory structure from prev test...
+mkfifo diff1/test2
+testing "diff -rN does not read non-regular files" \
+ "diff -urN diff1 diff2/subdir | $TRIM_TAB" \
+"\
+--- diff1/-
++++ diff2/subdir/-
+@@ -1 +1 @@
+-qwe
++asd
+File diff2/subdir/test is not a regular file or directory and was skipped
+File diff1/test2 is not a regular file or directory and was skipped
+" \
+ "" ""
+
+# clean up
+rm -rf diff1 diff2
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/dirname/dirname-handles-absolute-path b/release/src/router/busybox/testsuite/dirname/dirname-handles-absolute-path
index ca1a51b3..ca1a51b3 100755..100644
--- a/release/src/router/busybox/testsuite/dirname/dirname-handles-absolute-path
+++ b/release/src/router/busybox/testsuite/dirname/dirname-handles-absolute-path
diff --git a/release/src/router/busybox/testsuite/dirname/dirname-handles-empty-path b/release/src/router/busybox/testsuite/dirname/dirname-handles-empty-path
index 04134a58..04134a58 100755..100644
--- a/release/src/router/busybox/testsuite/dirname/dirname-handles-empty-path
+++ b/release/src/router/busybox/testsuite/dirname/dirname-handles-empty-path
diff --git a/release/src/router/busybox/testsuite/dirname/dirname-handles-multiple-slashes b/release/src/router/busybox/testsuite/dirname/dirname-handles-multiple-slashes
index 286f2536..286f2536 100755..100644
--- a/release/src/router/busybox/testsuite/dirname/dirname-handles-multiple-slashes
+++ b/release/src/router/busybox/testsuite/dirname/dirname-handles-multiple-slashes
diff --git a/release/src/router/busybox/testsuite/dirname/dirname-handles-relative-path b/release/src/router/busybox/testsuite/dirname/dirname-handles-relative-path
index ffe4ab45..ffe4ab45 100755..100644
--- a/release/src/router/busybox/testsuite/dirname/dirname-handles-relative-path
+++ b/release/src/router/busybox/testsuite/dirname/dirname-handles-relative-path
diff --git a/release/src/router/busybox/testsuite/dirname/dirname-handles-root b/release/src/router/busybox/testsuite/dirname/dirname-handles-root
index 6bd62b8a..6bd62b8a 100755..100644
--- a/release/src/router/busybox/testsuite/dirname/dirname-handles-root
+++ b/release/src/router/busybox/testsuite/dirname/dirname-handles-root
diff --git a/release/src/router/busybox/testsuite/dirname/dirname-handles-single-component b/release/src/router/busybox/testsuite/dirname/dirname-handles-single-component
index 24f9ae16..24f9ae16 100755..100644
--- a/release/src/router/busybox/testsuite/dirname/dirname-handles-single-component
+++ b/release/src/router/busybox/testsuite/dirname/dirname-handles-single-component
diff --git a/release/src/router/busybox/testsuite/dirname/dirname-works b/release/src/router/busybox/testsuite/dirname/dirname-works
new file mode 100644
index 00000000..f339c8f7
--- /dev/null
+++ b/release/src/router/busybox/testsuite/dirname/dirname-works
@@ -0,0 +1,2 @@
+test x$(dirname $(pwd)) = x$(busybox dirname $(pwd))
+
diff --git a/release/src/router/busybox/testsuite/du/du-h-works b/release/src/router/busybox/testsuite/du/du-h-works
new file mode 100644
index 00000000..3f8ff3d0
--- /dev/null
+++ b/release/src/router/busybox/testsuite/du/du-h-works
@@ -0,0 +1,4 @@
+d=/bin
+du -h "$d" > logfile.gnu
+busybox du -h "$d" > logfile.bb
+cmp logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/du/du-k-works b/release/src/router/busybox/testsuite/du/du-k-works
new file mode 100644
index 00000000..6c2c5d07
--- /dev/null
+++ b/release/src/router/busybox/testsuite/du/du-k-works
@@ -0,0 +1,4 @@
+d=/bin
+du -k "$d" > logfile.gnu
+busybox du -k "$d" > logfile.bb
+cmp logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/du/du-l-works b/release/src/router/busybox/testsuite/du/du-l-works
new file mode 100644
index 00000000..c3d2ec0c
--- /dev/null
+++ b/release/src/router/busybox/testsuite/du/du-l-works
@@ -0,0 +1,4 @@
+d=/bin
+du -l "$d" > logfile.gnu
+busybox du -l "$d" > logfile.bb
+cmp logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/du/du-m-works b/release/src/router/busybox/testsuite/du/du-m-works
new file mode 100644
index 00000000..bf0a90e1
--- /dev/null
+++ b/release/src/router/busybox/testsuite/du/du-m-works
@@ -0,0 +1,4 @@
+d=/bin
+du -m "$d" > logfile.gnu
+busybox du -m "$d" > logfile.bb
+cmp logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/du/du-s-works b/release/src/router/busybox/testsuite/du/du-s-works
new file mode 100644
index 00000000..ae970772
--- /dev/null
+++ b/release/src/router/busybox/testsuite/du/du-s-works
@@ -0,0 +1,4 @@
+d=/bin
+du -s "$d" > logfile.gnu
+busybox du -s "$d" > logfile.bb
+cmp logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/du/du-works b/release/src/router/busybox/testsuite/du/du-works
new file mode 100644
index 00000000..46a336dc
--- /dev/null
+++ b/release/src/router/busybox/testsuite/du/du-works
@@ -0,0 +1,4 @@
+d=/bin
+du "$d" > logfile.gnu
+busybox du "$d" > logfile.bb
+cmp logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/echo/echo-does-not-print-newline b/release/src/router/busybox/testsuite/echo/echo-does-not-print-newline
index 2ed03caf..2ed03caf 100755..100644
--- a/release/src/router/busybox/testsuite/echo/echo-does-not-print-newline
+++ b/release/src/router/busybox/testsuite/echo/echo-does-not-print-newline
diff --git a/release/src/router/busybox/testsuite/echo/echo-prints-argument b/release/src/router/busybox/testsuite/echo/echo-prints-argument
index 98779dbb..479dac89 100755..100644
--- a/release/src/router/busybox/testsuite/echo/echo-prints-argument
+++ b/release/src/router/busybox/testsuite/echo/echo-prints-argument
@@ -1 +1 @@
-test `busybox echo fubar` = fubar
+test xfubar = x`busybox echo fubar`
diff --git a/release/src/router/busybox/testsuite/echo/echo-prints-arguments b/release/src/router/busybox/testsuite/echo/echo-prints-arguments
index 4e4e3b43..4e4e3b43 100755..100644
--- a/release/src/router/busybox/testsuite/echo/echo-prints-arguments
+++ b/release/src/router/busybox/testsuite/echo/echo-prints-arguments
diff --git a/release/src/router/busybox/testsuite/echo/echo-prints-newline b/release/src/router/busybox/testsuite/echo/echo-prints-newline
index 838671ef..838671ef 100755..100644
--- a/release/src/router/busybox/testsuite/echo/echo-prints-newline
+++ b/release/src/router/busybox/testsuite/echo/echo-prints-newline
diff --git a/release/src/router/busybox/testsuite/echo/echo-prints-slash-zero b/release/src/router/busybox/testsuite/echo/echo-prints-slash-zero
new file mode 100644
index 00000000..d2466326
--- /dev/null
+++ b/release/src/router/busybox/testsuite/echo/echo-prints-slash-zero
@@ -0,0 +1 @@
+test "`busybox echo -e -n 'msg\n\0' | od -t x1 | head -n 1`" = "0000000 6d 73 67 0a 00"
diff --git a/release/src/router/busybox/testsuite/expand.tests b/release/src/router/busybox/testsuite/expand.tests
new file mode 100755
index 00000000..3f4cda3f
--- /dev/null
+++ b/release/src/router/busybox/testsuite/expand.tests
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+
+testing "expand" \
+ "expand" \
+ " 12345678 12345678\n" \
+ "" \
+ "\t12345678\t12345678\n" \
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/expand/expand-works-like-GNU b/release/src/router/busybox/testsuite/expand/expand-works-like-GNU
new file mode 100644
index 00000000..ee8c793e
--- /dev/null
+++ b/release/src/router/busybox/testsuite/expand/expand-works-like-GNU
@@ -0,0 +1,18 @@
+rm -f foo bar
+echo -e "\ty" | expand -t 3 ../../busybox > foo
+echo -e "\ty" | busybox unexpand -t 3 ../../busybox > bar
+set +e
+test ! -f foo -a -f bar
+if [ $? = 0 ] ; then
+ set -e
+ diff -q foo bar
+fi
+rm -f foo bar
+echo -e "\ty\tx" | expand -it 3 ../../busybox > foo
+echo -e "\ty\tx" | busybox unexpand -it 3 ../../busybox > bar
+set +e
+test ! -f foo -a -f bar
+if [ $? = 0 ] ; then
+ set -e
+ diff -q foo bar
+fi
diff --git a/release/src/router/busybox/testsuite/expr/expr-big b/release/src/router/busybox/testsuite/expr/expr-big
new file mode 100644
index 00000000..23dbbb3c
--- /dev/null
+++ b/release/src/router/busybox/testsuite/expr/expr-big
@@ -0,0 +1,16 @@
+# busybox expr
+
+# 3*1000*1000*1000 overflows 32-bit signed int
+res=`busybox expr 0 '<' 3000000000`
+[ x"$res" = x1 ] || exit 1
+
+# 9223372036854775807 = 2^31-1
+res=`busybox expr 0 '<' 9223372036854775807`
+[ x"$res" = x1 ] || exit 1
+# coreutils fails this one!
+res=`busybox expr -9223372036854775800 '<' 9223372036854775807`
+[ x"$res" = x1 ] || exit 1
+
+# This one works only by chance
+# res=`busybox expr 0 '<' 9223372036854775808`
+# [ x"$res" = x1 ] || exit 1
diff --git a/release/src/router/busybox/testsuite/expr/expr-works b/release/src/router/busybox/testsuite/expr/expr-works
new file mode 100644
index 00000000..af49ac4d
--- /dev/null
+++ b/release/src/router/busybox/testsuite/expr/expr-works
@@ -0,0 +1,59 @@
+# busybox expr
+busybox expr 1 \| 1
+busybox expr 1 \| 0
+busybox expr 0 \| 1
+busybox expr 1 \& 1
+busybox expr 0 \< 1
+busybox expr 1 \> 0
+busybox expr 0 \<= 1
+busybox expr 1 \<= 1
+busybox expr 1 \>= 0
+busybox expr 1 \>= 1
+busybox expr 1 + 2
+busybox expr 2 - 1
+busybox expr 2 \* 3
+busybox expr 12 / 2
+busybox expr 12 % 5
+
+
+set +e
+busybox expr 0 \| 0
+if [ $? != 1 ] ; then
+ exit 1;
+fi;
+
+busybox expr 1 \& 0
+if [ $? != 1 ] ; then
+ exit 1;
+fi;
+
+busybox expr 0 \& 1
+if [ $? != 1 ] ; then
+ exit 1;
+fi;
+
+busybox expr 0 \& 0
+if [ $? != 1 ] ; then
+ exit 1;
+fi;
+
+busybox expr 1 \< 0
+if [ $? != 1 ] ; then
+ exit 1;
+fi;
+
+busybox expr 0 \> 1
+if [ $? != 1 ] ; then
+ exit 1;
+fi;
+
+busybox expr 1 \<= 0
+if [ $? != 1 ] ; then
+ exit 1;
+fi;
+
+busybox expr 0 \>= 1
+if [ $? != 1 ] ; then
+ exit 1;
+fi;
+
diff --git a/release/src/router/busybox/testsuite/false/false-is-silent b/release/src/router/busybox/testsuite/false/false-is-silent
index 8a9aa0c7..8a9aa0c7 100755..100644
--- a/release/src/router/busybox/testsuite/false/false-is-silent
+++ b/release/src/router/busybox/testsuite/false/false-is-silent
diff --git a/release/src/router/busybox/testsuite/false/false-returns-failure b/release/src/router/busybox/testsuite/false/false-returns-failure
index 1a061f28..1a061f28 100755..100644
--- a/release/src/router/busybox/testsuite/false/false-returns-failure
+++ b/release/src/router/busybox/testsuite/false/false-returns-failure
diff --git a/release/src/router/busybox/testsuite/find/find-supports-minus-xdev b/release/src/router/busybox/testsuite/find/find-supports-minus-xdev
index 1c8818cd..4c559a1f 100755..100644
--- a/release/src/router/busybox/testsuite/find/find-supports-minus-xdev
+++ b/release/src/router/busybox/testsuite/find/find-supports-minus-xdev
@@ -1,2 +1 @@
-# XFAIL
busybox find . -xdev >/dev/null 2>&1
diff --git a/release/src/router/busybox/testsuite/grep.tests b/release/src/router/busybox/testsuite/grep.tests
new file mode 100755
index 00000000..8cee1b9e
--- /dev/null
+++ b/release/src/router/busybox/testsuite/grep.tests
@@ -0,0 +1,88 @@
+#!/bin/sh
+
+# Copyright 2005 by Rob Landley <rob@landley.net>
+# Licensed under GPL v2, see file LICENSE for details.
+
+# AUDIT:
+
+. testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+# file input will be file called "input"
+# test can create a file "actual" instead of writing to stdout
+
+# Test exit status
+
+testing "grep (exit with error)" "grep nonexistent 2> /dev/null ; echo \$?" \
+ "1\n" "" ""
+testing "grep (exit success)" "grep grep $0 > /dev/null 2>&1 ; echo \$?" "0\n" \
+ "" ""
+# Test various data sources and destinations
+
+testing "grep (default to stdin)" "grep two" "two\n" "" \
+ "one\ntwo\nthree\nthree\nthree\n"
+testing "grep - (specify stdin)" "grep two -" "two\n" "" \
+ "one\ntwo\nthree\nthree\nthree\n"
+testing "grep input (specify file)" "grep two input" "two\n" \
+ "one\ntwo\nthree\nthree\nthree\n" ""
+
+# GNU grep 2.5.3 outputs a new line character after the located string
+# even if there is no new line character in the input
+testing "grep (no newline at EOL)" "grep bug input" "bug\n" "bug" ""
+
+>empty
+testing "grep two files" "grep two input empty 2>/dev/null" \
+ "input:two\n" "one\ntwo\nthree\nthree\nthree\n" ""
+rm empty
+
+testing "grep - infile (specify stdin and file)" "grep two - input" \
+ "(standard input):two\ninput:two\n" "one\ntwo\nthree\n" \
+ "one\ntwo\ntoo\nthree\nthree\n"
+
+# Check if we see the correct return value if both stdin and non-existing file
+# are given.
+testing "grep - nofile (specify stdin and nonexisting file)" \
+ "grep two - nonexistent 2> /dev/null ; echo \$?" \
+ "(standard input):two\n(standard input):two\n2\n" \
+ "" "one\ntwo\ntwo\nthree\nthree\nthree\n"
+testing "grep -q - nofile (specify stdin and nonexisting file, no match)" \
+ "grep -q nomatch - nonexistent 2> /dev/null ; echo \$?" \
+ "2\n" "" "one\ntwo\ntwo\nthree\nthree\nthree\n"
+# SUSv3: If the -q option is specified, the exit status shall be zero
+# if an input line is selected, even if an error was detected.
+testing "grep -q - nofile (specify stdin and nonexisting file, match)" \
+ "grep -q two - nonexistent ; echo \$?" \
+ "0\n" "" "one\ntwo\ntwo\nthree\nthree\nthree\n"
+
+# Test various command line options
+# -s no error messages
+testing "grep -s nofile (nonexisting file, no match)" \
+ "grep -s nomatch nonexistent ; echo \$?" "2\n" "" ""
+testing "grep -s nofile - (stdin and nonexisting file, match)" \
+ "grep -s domatch nonexistent - ; echo \$?" \
+ "(standard input):domatch\n2\n" "" "nomatch\ndomatch\nend\n"
+
+testing "grep handles NUL in files" "grep -a foo input" "\0foo\n" "\0foo\n\n" ""
+testing "grep handles NUL on stdin" "grep -a foo" "\0foo\n" "" "\0foo\n\n"
+
+testing "grep matches NUL" "grep . input > /dev/null 2>&1 ; echo \$?" \
+ "0\n" "\0\n" ""
+
+# -e regex
+testing "grep handles multiple regexps" "grep -e one -e two input ; echo \$?" \
+ "one\ntwo\n0\n" "one\ntwo\n" ""
+testing "grep -F handles multiple expessions" "grep -F -e one -e two input ; echo \$?" \
+ "one\ntwo\n0\n" "one\ntwo\n" ""
+
+# -f file/-
+testing "grep can read regexps from stdin" "grep -f - input ; echo \$?" \
+ "two\nthree\n0\n" "tw\ntwo\nthree\n" "tw.\nthr\n"
+
+optional FEATURE_GREP_EGREP_ALIAS
+testing "grep -E supports extended regexps" "grep -E fo+" "foo\n" "" \
+ "b\ar\nfoo\nbaz"
+testing "grep is also egrep" "egrep foo" "foo\n" "" "foo\nbar\n"
+testing "egrep is not case insensitive" \
+ "egrep foo ; [ \$? -ne 0 ] && echo yes" "yes\n" "" "FOO\n"
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/grep/egrep-is-not-case-insensitive b/release/src/router/busybox/testsuite/grep/egrep-is-not-case-insensitive
deleted file mode 100755
index 88160739..00000000
--- a/release/src/router/busybox/testsuite/grep/egrep-is-not-case-insensitive
+++ /dev/null
@@ -1,2 +0,0 @@
-# FEATURE: CONFIG_FEATURE_GREP_EGREP_ALIAS
-test x`echo foo | busybox egrep FOO` = x
diff --git a/release/src/router/busybox/testsuite/grep/egrep-supports-extended-regexps b/release/src/router/busybox/testsuite/grep/egrep-supports-extended-regexps
deleted file mode 100755
index 6ef8b915..00000000
--- a/release/src/router/busybox/testsuite/grep/egrep-supports-extended-regexps
+++ /dev/null
@@ -1,2 +0,0 @@
-# FEATURE: CONFIG_FEATURE_GREP_EGREP_ALIAS
-echo foo | busybox egrep fo+
diff --git a/release/src/router/busybox/testsuite/grep/grep-handles-binary-files b/release/src/router/busybox/testsuite/grep/grep-handles-binary-files
deleted file mode 100755
index edb2042e..00000000
--- a/release/src/router/busybox/testsuite/grep/grep-handles-binary-files
+++ /dev/null
@@ -1 +0,0 @@
-echo -e '\0foo' | busybox grep foo
diff --git a/release/src/router/busybox/testsuite/grep/grep-handles-multiple-regexps b/release/src/router/busybox/testsuite/grep/grep-handles-multiple-regexps
deleted file mode 100755
index 5c1b8de1..00000000
--- a/release/src/router/busybox/testsuite/grep/grep-handles-multiple-regexps
+++ /dev/null
@@ -1 +0,0 @@
-echo foo | busybox grep -e foo -e bar
diff --git a/release/src/router/busybox/testsuite/grep/grep-is-also-egrep b/release/src/router/busybox/testsuite/grep/grep-is-also-egrep
deleted file mode 100755
index 2e6977c2..00000000
--- a/release/src/router/busybox/testsuite/grep/grep-is-also-egrep
+++ /dev/null
@@ -1,2 +0,0 @@
-# FEATURE: CONFIG_FEATURE_GREP_EGREP_ALIAS
-echo foo | busybox egrep foo
diff --git a/release/src/router/busybox/testsuite/grep/grep-matches-NUL b/release/src/router/busybox/testsuite/grep/grep-matches-NUL
deleted file mode 100755
index 597d22cb..00000000
--- a/release/src/router/busybox/testsuite/grep/grep-matches-NUL
+++ /dev/null
@@ -1,2 +0,0 @@
-# XFAIL
-echo -e '\0' | busybox grep .
diff --git a/release/src/router/busybox/testsuite/gunzip.tests b/release/src/router/busybox/testsuite/gunzip.tests
new file mode 100755
index 00000000..d7810044
--- /dev/null
+++ b/release/src/router/busybox/testsuite/gunzip.tests
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+. bunzip2.tests
diff --git a/release/src/router/busybox/testsuite/gunzip/gunzip-reads-from-standard-input b/release/src/router/busybox/testsuite/gunzip/gunzip-reads-from-standard-input
index 7c498c0c..7c498c0c 100755..100644
--- a/release/src/router/busybox/testsuite/gunzip/gunzip-reads-from-standard-input
+++ b/release/src/router/busybox/testsuite/gunzip/gunzip-reads-from-standard-input
diff --git a/release/src/router/busybox/testsuite/gzip/gzip-accepts-multiple-files b/release/src/router/busybox/testsuite/gzip/gzip-accepts-multiple-files
index 8f0d9c84..8f0d9c84 100755..100644
--- a/release/src/router/busybox/testsuite/gzip/gzip-accepts-multiple-files
+++ b/release/src/router/busybox/testsuite/gzip/gzip-accepts-multiple-files
diff --git a/release/src/router/busybox/testsuite/gzip/gzip-accepts-single-minus b/release/src/router/busybox/testsuite/gzip/gzip-accepts-single-minus
index 8b51fdfe..8b51fdfe 100755..100644
--- a/release/src/router/busybox/testsuite/gzip/gzip-accepts-single-minus
+++ b/release/src/router/busybox/testsuite/gzip/gzip-accepts-single-minus
diff --git a/release/src/router/busybox/testsuite/gzip/gzip-removes-original-file b/release/src/router/busybox/testsuite/gzip/gzip-removes-original-file
index b9cb995b..b9cb995b 100755..100644
--- a/release/src/router/busybox/testsuite/gzip/gzip-removes-original-file
+++ b/release/src/router/busybox/testsuite/gzip/gzip-removes-original-file
diff --git a/release/src/router/busybox/testsuite/head/head-n-works b/release/src/router/busybox/testsuite/head/head-n-works
new file mode 100644
index 00000000..db432555
--- /dev/null
+++ b/release/src/router/busybox/testsuite/head/head-n-works
@@ -0,0 +1,4 @@
+[ -n "$d" ] || d=..
+head -n 2 "$d/README" > logfile.gnu
+busybox head -n 2 "$d/README" > logfile.bb
+cmp logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/head/head-works b/release/src/router/busybox/testsuite/head/head-works
new file mode 100644
index 00000000..56ad3e36
--- /dev/null
+++ b/release/src/router/busybox/testsuite/head/head-works
@@ -0,0 +1,4 @@
+[ -n "$d" ] || d=..
+head "$d/README" > logfile.gnu
+busybox head "$d/README" > logfile.bb
+cmp logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/hostid/hostid-works b/release/src/router/busybox/testsuite/hostid/hostid-works
new file mode 100644
index 00000000..e85698e6
--- /dev/null
+++ b/release/src/router/busybox/testsuite/hostid/hostid-works
@@ -0,0 +1,2 @@
+test x$(hostid) = x$(busybox hostid)
+
diff --git a/release/src/router/busybox/testsuite/hostname/hostname-d-works b/release/src/router/busybox/testsuite/hostname/hostname-d-works
new file mode 100644
index 00000000..a9aeb92c
--- /dev/null
+++ b/release/src/router/busybox/testsuite/hostname/hostname-d-works
@@ -0,0 +1,2 @@
+test x$(hostname -d) = x$(busybox hostname -d)
+
diff --git a/release/src/router/busybox/testsuite/hostname/hostname-i-works b/release/src/router/busybox/testsuite/hostname/hostname-i-works
new file mode 100644
index 00000000..68a3e678
--- /dev/null
+++ b/release/src/router/busybox/testsuite/hostname/hostname-i-works
@@ -0,0 +1,2 @@
+test x$(hostname -i) = x$(busybox hostname -i)
+
diff --git a/release/src/router/busybox/testsuite/hostname/hostname-s-works b/release/src/router/busybox/testsuite/hostname/hostname-s-works
new file mode 100644
index 00000000..172b9440
--- /dev/null
+++ b/release/src/router/busybox/testsuite/hostname/hostname-s-works
@@ -0,0 +1 @@
+test x$(hostname -s) = x$(busybox hostname -s)
diff --git a/release/src/router/busybox/testsuite/hostname/hostname-works b/release/src/router/busybox/testsuite/hostname/hostname-works
new file mode 100644
index 00000000..f51a406e
--- /dev/null
+++ b/release/src/router/busybox/testsuite/hostname/hostname-works
@@ -0,0 +1 @@
+test x$(hostname) = x$(busybox hostname)
diff --git a/release/src/router/busybox/testsuite/id/id-g-works b/release/src/router/busybox/testsuite/id/id-g-works
new file mode 100644
index 00000000..671fc536
--- /dev/null
+++ b/release/src/router/busybox/testsuite/id/id-g-works
@@ -0,0 +1 @@
+test x$(id -g) = x$(busybox id -g)
diff --git a/release/src/router/busybox/testsuite/id/id-u-works b/release/src/router/busybox/testsuite/id/id-u-works
new file mode 100644
index 00000000..2358cb0d
--- /dev/null
+++ b/release/src/router/busybox/testsuite/id/id-u-works
@@ -0,0 +1 @@
+test x$(id -u) = x$(busybox id -u)
diff --git a/release/src/router/busybox/testsuite/id/id-un-works b/release/src/router/busybox/testsuite/id/id-un-works
new file mode 100644
index 00000000..db390e73
--- /dev/null
+++ b/release/src/router/busybox/testsuite/id/id-un-works
@@ -0,0 +1 @@
+test x$(id -un) = x$(busybox id -un)
diff --git a/release/src/router/busybox/testsuite/id/id-ur-works b/release/src/router/busybox/testsuite/id/id-ur-works
new file mode 100644
index 00000000..6b0fcb03
--- /dev/null
+++ b/release/src/router/busybox/testsuite/id/id-ur-works
@@ -0,0 +1 @@
+test x$(id -ur) = x$(busybox id -ur)
diff --git a/release/src/router/busybox/testsuite/ln/ln-creates-hard-links b/release/src/router/busybox/testsuite/ln/ln-creates-hard-links
new file mode 100644
index 00000000..2f6e23f9
--- /dev/null
+++ b/release/src/router/busybox/testsuite/ln/ln-creates-hard-links
@@ -0,0 +1,4 @@
+echo file number one > file1
+busybox ln file1 link1
+test -f file1
+test -f link1
diff --git a/release/src/router/busybox/testsuite/ln/ln-creates-soft-links b/release/src/router/busybox/testsuite/ln/ln-creates-soft-links
new file mode 100644
index 00000000..e875e4c8
--- /dev/null
+++ b/release/src/router/busybox/testsuite/ln/ln-creates-soft-links
@@ -0,0 +1,4 @@
+echo file number one > file1
+busybox ln -s file1 link1
+test -L link1
+test xfile1 = x`readlink link1`
diff --git a/release/src/router/busybox/testsuite/ln/ln-force-creates-hard-links b/release/src/router/busybox/testsuite/ln/ln-force-creates-hard-links
new file mode 100644
index 00000000..c96b7d6c
--- /dev/null
+++ b/release/src/router/busybox/testsuite/ln/ln-force-creates-hard-links
@@ -0,0 +1,5 @@
+echo file number one > file1
+echo file number two > link1
+busybox ln -f file1 link1
+test -f file1
+test -f link1
diff --git a/release/src/router/busybox/testsuite/ln/ln-force-creates-soft-links b/release/src/router/busybox/testsuite/ln/ln-force-creates-soft-links
new file mode 100644
index 00000000..cab8d1db
--- /dev/null
+++ b/release/src/router/busybox/testsuite/ln/ln-force-creates-soft-links
@@ -0,0 +1,5 @@
+echo file number one > file1
+echo file number two > link1
+busybox ln -f -s file1 link1
+test -L link1
+test xfile1 = x`readlink link1`
diff --git a/release/src/router/busybox/testsuite/ln/ln-preserves-hard-links b/release/src/router/busybox/testsuite/ln/ln-preserves-hard-links
new file mode 100644
index 00000000..47fb9896
--- /dev/null
+++ b/release/src/router/busybox/testsuite/ln/ln-preserves-hard-links
@@ -0,0 +1,8 @@
+echo file number one > file1
+echo file number two > link1
+set +e
+busybox ln file1 link1
+if [ $? != 0 ] ; then
+ exit 0;
+fi
+exit 1;
diff --git a/release/src/router/busybox/testsuite/ln/ln-preserves-soft-links b/release/src/router/busybox/testsuite/ln/ln-preserves-soft-links
new file mode 100644
index 00000000..a8123ece
--- /dev/null
+++ b/release/src/router/busybox/testsuite/ln/ln-preserves-soft-links
@@ -0,0 +1,9 @@
+echo file number one > file1
+echo file number two > link1
+set +e
+busybox ln -s file1 link1
+if [ $? != 0 ] ; then
+ exit 0;
+fi
+exit 1;
+
diff --git a/release/src/router/busybox/testsuite/ls/ls-1-works b/release/src/router/busybox/testsuite/ls/ls-1-works
new file mode 100644
index 00000000..88569492
--- /dev/null
+++ b/release/src/router/busybox/testsuite/ls/ls-1-works
@@ -0,0 +1,4 @@
+[ -n "$d" ] || d=..
+LC_ALL=C ls -1 "$d" > logfile.gnu
+LC_ALL=C busybox ls -1 "$d" > logfile.bb
+diff -ubw logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/ls/ls-h-works b/release/src/router/busybox/testsuite/ls/ls-h-works
new file mode 100644
index 00000000..0c83f7cc
--- /dev/null
+++ b/release/src/router/busybox/testsuite/ls/ls-h-works
@@ -0,0 +1,4 @@
+[ -n "$d" ] || d=..
+LC_ALL=C ls -h "$d" > logfile.gnu
+LC_ALL=C busybox ls -h "$d" > logfile.bb
+diff -ubw logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/ls/ls-l-works b/release/src/router/busybox/testsuite/ls/ls-l-works
new file mode 100644
index 00000000..1bad34bc
--- /dev/null
+++ b/release/src/router/busybox/testsuite/ls/ls-l-works
@@ -0,0 +1,4 @@
+[ -n "$d" ] || d=..
+LC_ALL=C ls -l "$d" > logfile.gnu
+LC_ALL=C busybox ls -l "$d" > logfile.bb
+diff -ubw logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/ls/ls-s-works b/release/src/router/busybox/testsuite/ls/ls-s-works
new file mode 100644
index 00000000..0a9d7526
--- /dev/null
+++ b/release/src/router/busybox/testsuite/ls/ls-s-works
@@ -0,0 +1,4 @@
+[ -n "$d" ] || d=..
+LC_ALL=C ls -1s "$d" > logfile.gnu
+LC_ALL=C busybox ls -1s "$d" > logfile.bb
+diff -ubw logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/makedevs.device_table.txt b/release/src/router/busybox/testsuite/makedevs.device_table.txt
new file mode 100644
index 00000000..4400083f
--- /dev/null
+++ b/release/src/router/busybox/testsuite/makedevs.device_table.txt
@@ -0,0 +1,172 @@
+# When building a target filesystem, it is desirable to not have to
+# become root and then run 'mknod' a thousand times. Using a device
+# table you can create device nodes and directories "on the fly".
+#
+# This is a sample device table file for use with genext2fs. You can
+# do all sorts of interesting things with a device table file. For
+# example, if you want to adjust the permissions on a particular file
+# you can just add an entry like:
+# /sbin/foobar f 2755 0 0 - - - - -
+# and (assuming the file /sbin/foobar exists) it will be made setuid
+# root (regardless of what its permissions are on the host filesystem.
+# Furthermore, you can use a single table entry to create a many device
+# minors. For example, if I wanted to create /dev/hda and /dev/hda[0-15]
+# I could just use the following two table entries:
+# /dev/hda b 640 0 0 3 0 0 0 -
+# /dev/hda b 640 0 0 3 1 1 1 15
+#
+# Device table entries take the form of:
+# <name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
+# where name is the file name, type can be one of:
+# f A regular file
+# d Directory
+# c Character special device file
+# b Block special device file
+# p Fifo (named pipe)
+# uid is the user id for the target file, gid is the group id for the
+# target file. The rest of the entries (major, minor, etc) apply only
+# to device special files.
+
+# Have fun
+# -Erik Andersen <andersen@codepoet.org>
+#
+
+#<name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
+/dev d 755 0 0 - - - - -
+/dev/pts d 755 0 0 - - - - -
+/dev/shm d 755 0 0 - - - - -
+/tmp d 1777 0 0 - - - - -
+/etc d 755 0 0 - - - - -
+/home/default d 2755 1000 1000 - - - - -
+#<name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
+###/bin/busybox f 4755 0 0 - - - - -
+###/etc/shadow f 600 0 0 - - - - -
+###/etc/passwd f 644 0 0 - - - - -
+/etc/network/if-up.d d 755 0 0 - - - - -
+/etc/network/if-pre-up.d d 755 0 0 - - - - -
+/etc/network/if-down.d d 755 0 0 - - - - -
+/etc/network/if-post-down.d d 755 0 0 - - - - -
+###/usr/share/udhcpc/default.script f 755 0 0 - - - - -
+# uncomment this to allow starting x as non-root
+#/usr/X11R6/bin/Xfbdev f 4755 0 0 - - - - -
+
+# Normal system devices
+# <name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
+/dev/mem c 640 0 0 1 1 0 0 -
+/dev/kmem c 640 0 0 1 2 0 0 -
+/dev/null c 666 0 0 1 3 0 0 -
+/dev/zero c 666 0 0 1 5 0 0 -
+/dev/random c 666 0 0 1 8 0 0 -
+/dev/urandom c 666 0 0 1 9 0 0 -
+/dev/ram b 640 0 0 1 1 0 0 -
+/dev/ram b 640 0 0 1 0 0 1 4
+/dev/loop b 640 0 0 7 0 0 1 2
+/dev/rtc c 640 0 0 10 135 - - -
+/dev/console c 666 0 0 5 1 - - -
+/dev/tty c 666 0 0 5 0 - - -
+/dev/tty c 666 0 0 4 0 0 1 8
+/dev/ttyp c 666 0 0 3 0 0 1 10
+/dev/ptyp c 666 0 0 2 0 0 1 10
+/dev/ptmx c 666 0 0 5 2 - - -
+/dev/ttyP c 666 0 0 57 0 0 1 4
+/dev/ttyS c 666 0 0 4 64 0 1 4
+/dev/fb c 640 0 5 29 0 0 32 4
+#/dev/ttySA c 666 0 0 204 5 0 1 3
+/dev/psaux c 666 0 0 10 1 0 0 -
+#/dev/ppp c 666 0 0 108 0 - - -
+
+# Input stuff
+/dev/input d 755 0 0 - - - - -
+/dev/input/mice c 640 0 0 13 63 0 0 -
+/dev/input/mouse c 660 0 0 13 32 0 1 4
+/dev/input/event c 660 0 0 13 64 0 1 4
+#/dev/input/js c 660 0 0 13 0 0 1 4
+
+
+# MTD stuff
+/dev/mtd c 640 0 0 90 0 0 2 4
+/dev/mtdblock b 640 0 0 31 0 0 1 4
+
+#Tun/tap driver
+/dev/net d 755 0 0 - - - - -
+/dev/net/tun c 660 0 0 10 200 - - -
+
+# Audio stuff
+#/dev/audio c 666 0 29 14 4 - - -
+#/dev/audio1 c 666 0 29 14 20 - - -
+#/dev/dsp c 666 0 29 14 3 - - -
+#/dev/dsp1 c 666 0 29 14 19 - - -
+#/dev/sndstat c 666 0 29 14 6 - - -
+
+# User-mode Linux stuff
+#/dev/ubda b 640 0 0 98 0 0 0 -
+#/dev/ubda b 640 0 0 98 1 1 1 15
+
+# IDE Devices
+/dev/hda b 640 0 0 3 0 0 0 -
+/dev/hda b 640 0 0 3 1 1 1 15
+/dev/hdb b 640 0 0 3 64 0 0 -
+/dev/hdb b 640 0 0 3 65 1 1 15
+#/dev/hdc b 640 0 0 22 0 0 0 -
+#/dev/hdc b 640 0 0 22 1 1 1 15
+#/dev/hdd b 640 0 0 22 64 0 0 -
+#/dev/hdd b 640 0 0 22 65 1 1 15
+#/dev/hde b 640 0 0 33 0 0 0 -
+#/dev/hde b 640 0 0 33 1 1 1 15
+#/dev/hdf b 640 0 0 33 64 0 0 -
+#/dev/hdf b 640 0 0 33 65 1 1 15
+#/dev/hdg b 640 0 0 34 0 0 0 -
+#/dev/hdg b 640 0 0 34 1 1 1 15
+#/dev/hdh b 640 0 0 34 64 0 0 -
+#/dev/hdh b 640 0 0 34 65 1 1 15
+
+# SCSI Devices
+#/dev/sda b 640 0 0 8 0 0 0 -
+#/dev/sda b 640 0 0 8 1 1 1 15
+#/dev/sdb b 640 0 0 8 16 0 0 -
+#/dev/sdb b 640 0 0 8 17 1 1 15
+#/dev/sdc b 640 0 0 8 32 0 0 -
+#/dev/sdc b 640 0 0 8 33 1 1 15
+#/dev/sdd b 640 0 0 8 48 0 0 -
+#/dev/sdd b 640 0 0 8 49 1 1 15
+#/dev/sde b 640 0 0 8 64 0 0 -
+#/dev/sde b 640 0 0 8 65 1 1 15
+#/dev/sdf b 640 0 0 8 80 0 0 -
+#/dev/sdf b 640 0 0 8 81 1 1 15
+#/dev/sdg b 640 0 0 8 96 0 0 -
+#/dev/sdg b 640 0 0 8 97 1 1 15
+#/dev/sdh b 640 0 0 8 112 0 0 -
+#/dev/sdh b 640 0 0 8 113 1 1 15
+#/dev/sg c 640 0 0 21 0 0 1 15
+#/dev/scd b 640 0 0 11 0 0 1 15
+#/dev/st c 640 0 0 9 0 0 1 8
+#/dev/nst c 640 0 0 9 128 0 1 8
+#/dev/st c 640 0 0 9 32 1 1 4
+#/dev/st c 640 0 0 9 64 1 1 4
+#/dev/st c 640 0 0 9 96 1 1 4
+
+# Floppy disk devices
+#/dev/fd b 640 0 0 2 0 0 1 2
+#/dev/fd0d360 b 640 0 0 2 4 0 0 -
+#/dev/fd1d360 b 640 0 0 2 5 0 0 -
+#/dev/fd0h1200 b 640 0 0 2 8 0 0 -
+#/dev/fd1h1200 b 640 0 0 2 9 0 0 -
+#/dev/fd0u1440 b 640 0 0 2 28 0 0 -
+#/dev/fd1u1440 b 640 0 0 2 29 0 0 -
+#/dev/fd0u2880 b 640 0 0 2 32 0 0 -
+#/dev/fd1u2880 b 640 0 0 2 33 0 0 -
+
+# All the proprietary cdrom devices in the world
+#/dev/aztcd b 640 0 0 29 0 0 0 -
+#/dev/bpcd b 640 0 0 41 0 0 0 -
+#/dev/capi20 c 640 0 0 68 0 0 1 2
+#/dev/cdu31a b 640 0 0 15 0 0 0 -
+#/dev/cdu535 b 640 0 0 24 0 0 0 -
+#/dev/cm206cd b 640 0 0 32 0 0 0 -
+#/dev/sjcd b 640 0 0 18 0 0 0 -
+#/dev/sonycd b 640 0 0 15 0 0 0 -
+#/dev/gscd b 640 0 0 16 0 0 0 -
+#/dev/sbpcd b 640 0 0 25 0 0 0 -
+#/dev/sbpcd b 640 0 0 25 0 0 1 4
+#/dev/mcd b 640 0 0 23 0 0 0 -
+#/dev/optcd b 640 0 0 17 0 0 0 -
diff --git a/release/src/router/busybox/testsuite/makedevs.tests b/release/src/router/busybox/testsuite/makedevs.tests
new file mode 100755
index 00000000..9e068bdc
--- /dev/null
+++ b/release/src/router/busybox/testsuite/makedevs.tests
@@ -0,0 +1,139 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# ls -ln is showing date. Need to remove that, it's variable
+# sed: (1) "maj, min" -> "maj,min" (2) coalesce spaces
+# cut: remove date
+FILTER_LS="sed -e 's/, */,/g' -e 's/ */ /g' | cut -d' ' -f 1-5,9-"
+# cut: remove size+date
+FILTER_LS2="sed -e 's/, */,/g' -e 's/ */ /g' | cut -d' ' -f 1-4,9-"
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+
+rm -rf makedevs.testdir
+mkdir makedevs.testdir
+
+testing "makedevs -d ../makedevs.device_table.txt ." \
+ "(cd makedevs.testdir && makedevs -d ../makedevs.device_table.txt . 2>&1);
+ find makedevs.testdir ! -type d | sort | xargs ls -lnR | $FILTER_LS" \
+"\
+rootdir=.
+table='../makedevs.device_table.txt'
+crw-rw-rw- 1 0 0 5,1 makedevs.testdir/dev/console
+crw-r----- 1 0 5 29,0 makedevs.testdir/dev/fb0
+crw-r----- 1 0 5 29,32 makedevs.testdir/dev/fb1
+crw-r----- 1 0 5 29,64 makedevs.testdir/dev/fb2
+crw-r----- 1 0 5 29,96 makedevs.testdir/dev/fb3
+brw-r----- 1 0 0 3,0 makedevs.testdir/dev/hda
+brw-r----- 1 0 0 3,1 makedevs.testdir/dev/hda1
+brw-r----- 1 0 0 3,10 makedevs.testdir/dev/hda10
+brw-r----- 1 0 0 3,11 makedevs.testdir/dev/hda11
+brw-r----- 1 0 0 3,12 makedevs.testdir/dev/hda12
+brw-r----- 1 0 0 3,13 makedevs.testdir/dev/hda13
+brw-r----- 1 0 0 3,14 makedevs.testdir/dev/hda14
+brw-r----- 1 0 0 3,15 makedevs.testdir/dev/hda15
+brw-r----- 1 0 0 3,2 makedevs.testdir/dev/hda2
+brw-r----- 1 0 0 3,3 makedevs.testdir/dev/hda3
+brw-r----- 1 0 0 3,4 makedevs.testdir/dev/hda4
+brw-r----- 1 0 0 3,5 makedevs.testdir/dev/hda5
+brw-r----- 1 0 0 3,6 makedevs.testdir/dev/hda6
+brw-r----- 1 0 0 3,7 makedevs.testdir/dev/hda7
+brw-r----- 1 0 0 3,8 makedevs.testdir/dev/hda8
+brw-r----- 1 0 0 3,9 makedevs.testdir/dev/hda9
+brw-r----- 1 0 0 3,64 makedevs.testdir/dev/hdb
+brw-r----- 1 0 0 3,65 makedevs.testdir/dev/hdb1
+brw-r----- 1 0 0 3,74 makedevs.testdir/dev/hdb10
+brw-r----- 1 0 0 3,75 makedevs.testdir/dev/hdb11
+brw-r----- 1 0 0 3,76 makedevs.testdir/dev/hdb12
+brw-r----- 1 0 0 3,77 makedevs.testdir/dev/hdb13
+brw-r----- 1 0 0 3,78 makedevs.testdir/dev/hdb14
+brw-r----- 1 0 0 3,79 makedevs.testdir/dev/hdb15
+brw-r----- 1 0 0 3,66 makedevs.testdir/dev/hdb2
+brw-r----- 1 0 0 3,67 makedevs.testdir/dev/hdb3
+brw-r----- 1 0 0 3,68 makedevs.testdir/dev/hdb4
+brw-r----- 1 0 0 3,69 makedevs.testdir/dev/hdb5
+brw-r----- 1 0 0 3,70 makedevs.testdir/dev/hdb6
+brw-r----- 1 0 0 3,71 makedevs.testdir/dev/hdb7
+brw-r----- 1 0 0 3,72 makedevs.testdir/dev/hdb8
+brw-r----- 1 0 0 3,73 makedevs.testdir/dev/hdb9
+crw-rw---- 1 0 0 13,64 makedevs.testdir/dev/input/event0
+crw-rw---- 1 0 0 13,65 makedevs.testdir/dev/input/event1
+crw-rw---- 1 0 0 13,66 makedevs.testdir/dev/input/event2
+crw-rw---- 1 0 0 13,67 makedevs.testdir/dev/input/event3
+crw-r----- 1 0 0 13,63 makedevs.testdir/dev/input/mice
+crw-rw---- 1 0 0 13,32 makedevs.testdir/dev/input/mouse0
+crw-rw---- 1 0 0 13,33 makedevs.testdir/dev/input/mouse1
+crw-rw---- 1 0 0 13,34 makedevs.testdir/dev/input/mouse2
+crw-rw---- 1 0 0 13,35 makedevs.testdir/dev/input/mouse3
+crw-r----- 1 0 0 1,2 makedevs.testdir/dev/kmem
+brw-r----- 1 0 0 7,0 makedevs.testdir/dev/loop0
+brw-r----- 1 0 0 7,1 makedevs.testdir/dev/loop1
+crw-r----- 1 0 0 1,1 makedevs.testdir/dev/mem
+crw-r----- 1 0 0 90,0 makedevs.testdir/dev/mtd0
+crw-r----- 1 0 0 90,2 makedevs.testdir/dev/mtd1
+crw-r----- 1 0 0 90,4 makedevs.testdir/dev/mtd2
+crw-r----- 1 0 0 90,6 makedevs.testdir/dev/mtd3
+brw-r----- 1 0 0 31,0 makedevs.testdir/dev/mtdblock0
+brw-r----- 1 0 0 31,1 makedevs.testdir/dev/mtdblock1
+brw-r----- 1 0 0 31,2 makedevs.testdir/dev/mtdblock2
+brw-r----- 1 0 0 31,3 makedevs.testdir/dev/mtdblock3
+crw-rw---- 1 0 0 10,200 makedevs.testdir/dev/net/tun
+crw-rw-rw- 1 0 0 1,3 makedevs.testdir/dev/null
+crw-rw-rw- 1 0 0 10,1 makedevs.testdir/dev/psaux
+crw-rw-rw- 1 0 0 5,2 makedevs.testdir/dev/ptmx
+crw-rw-rw- 1 0 0 2,0 makedevs.testdir/dev/ptyp0
+crw-rw-rw- 1 0 0 2,1 makedevs.testdir/dev/ptyp1
+crw-rw-rw- 1 0 0 2,2 makedevs.testdir/dev/ptyp2
+crw-rw-rw- 1 0 0 2,3 makedevs.testdir/dev/ptyp3
+crw-rw-rw- 1 0 0 2,4 makedevs.testdir/dev/ptyp4
+crw-rw-rw- 1 0 0 2,5 makedevs.testdir/dev/ptyp5
+crw-rw-rw- 1 0 0 2,6 makedevs.testdir/dev/ptyp6
+crw-rw-rw- 1 0 0 2,7 makedevs.testdir/dev/ptyp7
+crw-rw-rw- 1 0 0 2,8 makedevs.testdir/dev/ptyp8
+crw-rw-rw- 1 0 0 2,9 makedevs.testdir/dev/ptyp9
+brw-r----- 1 0 0 1,1 makedevs.testdir/dev/ram
+brw-r----- 1 0 0 1,0 makedevs.testdir/dev/ram0
+brw-r----- 1 0 0 1,1 makedevs.testdir/dev/ram1
+brw-r----- 1 0 0 1,2 makedevs.testdir/dev/ram2
+brw-r----- 1 0 0 1,3 makedevs.testdir/dev/ram3
+crw-rw-rw- 1 0 0 1,8 makedevs.testdir/dev/random
+crw-r----- 1 0 0 10,135 makedevs.testdir/dev/rtc
+crw-rw-rw- 1 0 0 5,0 makedevs.testdir/dev/tty
+crw-rw-rw- 1 0 0 4,0 makedevs.testdir/dev/tty0
+crw-rw-rw- 1 0 0 4,1 makedevs.testdir/dev/tty1
+crw-rw-rw- 1 0 0 4,2 makedevs.testdir/dev/tty2
+crw-rw-rw- 1 0 0 4,3 makedevs.testdir/dev/tty3
+crw-rw-rw- 1 0 0 4,4 makedevs.testdir/dev/tty4
+crw-rw-rw- 1 0 0 4,5 makedevs.testdir/dev/tty5
+crw-rw-rw- 1 0 0 4,6 makedevs.testdir/dev/tty6
+crw-rw-rw- 1 0 0 4,7 makedevs.testdir/dev/tty7
+crw-rw-rw- 1 0 0 57,0 makedevs.testdir/dev/ttyP0
+crw-rw-rw- 1 0 0 57,1 makedevs.testdir/dev/ttyP1
+crw-rw-rw- 1 0 0 57,2 makedevs.testdir/dev/ttyP2
+crw-rw-rw- 1 0 0 57,3 makedevs.testdir/dev/ttyP3
+crw-rw-rw- 1 0 0 4,64 makedevs.testdir/dev/ttyS0
+crw-rw-rw- 1 0 0 4,65 makedevs.testdir/dev/ttyS1
+crw-rw-rw- 1 0 0 4,66 makedevs.testdir/dev/ttyS2
+crw-rw-rw- 1 0 0 4,67 makedevs.testdir/dev/ttyS3
+crw-rw-rw- 1 0 0 3,0 makedevs.testdir/dev/ttyp0
+crw-rw-rw- 1 0 0 3,1 makedevs.testdir/dev/ttyp1
+crw-rw-rw- 1 0 0 3,2 makedevs.testdir/dev/ttyp2
+crw-rw-rw- 1 0 0 3,3 makedevs.testdir/dev/ttyp3
+crw-rw-rw- 1 0 0 3,4 makedevs.testdir/dev/ttyp4
+crw-rw-rw- 1 0 0 3,5 makedevs.testdir/dev/ttyp5
+crw-rw-rw- 1 0 0 3,6 makedevs.testdir/dev/ttyp6
+crw-rw-rw- 1 0 0 3,7 makedevs.testdir/dev/ttyp7
+crw-rw-rw- 1 0 0 3,8 makedevs.testdir/dev/ttyp8
+crw-rw-rw- 1 0 0 3,9 makedevs.testdir/dev/ttyp9
+crw-rw-rw- 1 0 0 1,9 makedevs.testdir/dev/urandom
+crw-rw-rw- 1 0 0 1,5 makedevs.testdir/dev/zero
+" \
+ "" ""
+
+# clean up
+rm -rf makedevs.testdir
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/md5sum/md5sum-verifies-non-binary-file b/release/src/router/busybox/testsuite/md5sum/md5sum-verifies-non-binary-file
index 8566a234..8566a234 100755..100644
--- a/release/src/router/busybox/testsuite/md5sum/md5sum-verifies-non-binary-file
+++ b/release/src/router/busybox/testsuite/md5sum/md5sum-verifies-non-binary-file
diff --git a/release/src/router/busybox/testsuite/mdev.tests b/release/src/router/busybox/testsuite/mdev.tests
new file mode 100755
index 00000000..90379e66
--- /dev/null
+++ b/release/src/router/busybox/testsuite/mdev.tests
@@ -0,0 +1,143 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# ls -ln is showing date. Need to remove that, it's variable
+# sed: (1) "maj, min" -> "maj,min" (2) coalesce spaces
+# cut: remove date
+FILTER_LS="sed -e 's/, */,/g' -e 's/ */ /g' | cut -d' ' -f 1-5,9-"
+# cut: remove size+date
+FILTER_LS2="sed -e 's/, */,/g' -e 's/ */ /g' | cut -d' ' -f 1-4,9-"
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+
+rm -rf mdev.testdir
+mkdir mdev.testdir
+# We need mdev executable to be in chroot jail!
+# (will still fail with dynamically linked one, though...)
+cp ../busybox mdev.testdir/mdev
+mkdir mdev.testdir/bin
+cp ../busybox mdev.testdir/bin/sh 2>/dev/null # for testing cmd feature
+mkdir mdev.testdir/etc
+mkdir mdev.testdir/dev
+mkdir -p mdev.testdir/sys/block/sda
+echo "8:0" >mdev.testdir/sys/block/sda/dev
+
+# env - PATH=$PATH: on some systems chroot binary won't otherwise be found
+
+testing "mdev add /block/sda" \
+ "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
+ ls -ln mdev.testdir/dev | $FILTER_LS" \
+"\
+brw-rw---- 1 0 0 8,0 sda
+" \
+ "" ""
+
+# continuing to use directory structure from prev test
+rm -rf mdev.testdir/dev/*
+echo ".* 1:1 666" >mdev.testdir/etc/mdev.conf
+echo "sda 2:2 444" >>mdev.testdir/etc/mdev.conf
+testing "mdev stops on first rule" \
+ "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
+ ls -ln mdev.testdir/dev | $FILTER_LS" \
+"\
+brw-rw-rw- 1 1 1 8,0 sda
+" \
+ "" ""
+
+# continuing to use directory structure from prev test
+rm -rf mdev.testdir/dev/*
+echo "sda 0:0 444 >disk/scsiA" >mdev.testdir/etc/mdev.conf
+testing "mdev move/symlink rule '>bar/baz'" \
+ "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
+ ls -lnR mdev.testdir/dev | $FILTER_LS2" \
+"\
+mdev.testdir/dev:
+drwxr-xr-x 2 0 0 disk
+lrwxrwxrwx 1 0 0 sda -> disk/scsiA
+
+mdev.testdir/dev/disk:
+br--r--r-- 1 0 0 scsiA
+" \
+ "" ""
+
+# continuing to use directory structure from prev test
+rm -rf mdev.testdir/dev/*
+echo "sda 0:0 444 >disk/" >mdev.testdir/etc/mdev.conf
+testing "mdev move/symlink rule '>bar/'" \
+ "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
+ ls -lnR mdev.testdir/dev | $FILTER_LS2" \
+"\
+mdev.testdir/dev:
+drwxr-xr-x 2 0 0 disk
+lrwxrwxrwx 1 0 0 sda -> disk/sda
+
+mdev.testdir/dev/disk:
+br--r--r-- 1 0 0 sda
+" \
+ "" ""
+
+# continuing to use directory structure from prev test
+rm -rf mdev.testdir/dev/*
+# here we complicate things by having non-matching group 1 and using %0
+echo "s([0-9])*d([a-z]+) 0:0 644 >sd/%2_%0" >mdev.testdir/etc/mdev.conf
+testing "mdev regexp substring match + replace" \
+ "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
+ ls -lnR mdev.testdir/dev | $FILTER_LS2" \
+"\
+mdev.testdir/dev:
+drwxr-xr-x 2 0 0 sd
+lrwxrwxrwx 1 0 0 sda -> sd/a_sda
+
+mdev.testdir/dev/sd:
+brw-r--r-- 1 0 0 a_sda
+" \
+ "" ""
+
+# continuing to use directory structure from prev test
+rm -rf mdev.testdir/dev/*
+echo "sda 0:0 644 @echo @echo TEST" >mdev.testdir/etc/mdev.conf
+testing "mdev command" \
+ "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
+ ls -lnR mdev.testdir/dev | $FILTER_LS" \
+"\
+@echo TEST
+mdev.testdir/dev:
+brw-r--r-- 1 0 0 8,0 sda
+" \
+ "" ""
+
+# continuing to use directory structure from prev test
+rm -rf mdev.testdir/dev/*
+echo "sda 0:0 644 =block/ @echo @echo TEST" >mdev.testdir/etc/mdev.conf
+testing "mdev move and command" \
+ "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
+ ls -lnR mdev.testdir/dev | $FILTER_LS2" \
+"\
+@echo TEST
+mdev.testdir/dev:
+drwxr-xr-x 2 0 0 block
+
+mdev.testdir/dev/block:
+brw-r--r-- 1 0 0 sda
+" \
+ "" ""
+
+# continuing to use directory structure from prev test
+rm -rf mdev.testdir/dev/*
+echo "@8,0 :1 644" >mdev.testdir/etc/mdev.conf
+testing "mdev #maj,min and no explicit uid" \
+ "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
+ ls -lnR mdev.testdir/dev | $FILTER_LS" \
+"\
+mdev.testdir/dev:
+brw-r--r-- 1 0 1 8,0 sda
+" \
+ "" ""
+
+# clean up
+rm -rf mdev.testdir
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/mkdir/mkdir-makes-a-directory b/release/src/router/busybox/testsuite/mkdir/mkdir-makes-a-directory
index 6ca5c4d5..6ca5c4d5 100755..100644
--- a/release/src/router/busybox/testsuite/mkdir/mkdir-makes-a-directory
+++ b/release/src/router/busybox/testsuite/mkdir/mkdir-makes-a-directory
diff --git a/release/src/router/busybox/testsuite/mkdir/mkdir-makes-parent-directories b/release/src/router/busybox/testsuite/mkdir/mkdir-makes-parent-directories
index 992facb4..992facb4 100755..100644
--- a/release/src/router/busybox/testsuite/mkdir/mkdir-makes-parent-directories
+++ b/release/src/router/busybox/testsuite/mkdir/mkdir-makes-parent-directories
diff --git a/release/src/router/busybox/testsuite/mkfs.minix.tests b/release/src/router/busybox/testsuite/mkfs.minix.tests
new file mode 100755
index 00000000..90df9316
--- /dev/null
+++ b/release/src/router/busybox/testsuite/mkfs.minix.tests
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# mkfs.minix tests.
+# Copyright 2007 by Denys Vlasenko
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+
+testing "mkfs.minix" \
+ "dd if=/dev/zero of=input bs=1k count=1024 2>/dev/null; mkfs.minix input; md5sum <input" \
+"352 inodes\n"\
+"1024 blocks\n"\
+"Firstdatazone=15 (15)\n"\
+"Zonesize=1024\n"\
+"Maxsize=268966912\n"\
+"4f35f7afeba07d56055bed1f29ae20b7 -\n" \
+ "" \
+ ""
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/mount.testroot b/release/src/router/busybox/testsuite/mount.testroot
new file mode 100755
index 00000000..e18d0461
--- /dev/null
+++ b/release/src/router/busybox/testsuite/mount.testroot
@@ -0,0 +1,183 @@
+#!/bin/sh
+
+# SUSv3 compliant mount and umount tests.
+# Copyright 2005 by Rob Landley <rob@landley.net>
+# Licensed under GPL v2, see file LICENSE for details.
+
+if [ -z "$TESTDIR" ]
+then
+ echo 'Need $TESTDIR'
+ exit 1
+fi
+
+cd "$TESTDIR"
+
+. testing.sh
+
+# If we aren't PID 1, barf.
+
+#if [ $$ -ne 1 ]
+#then
+# echo "SKIPPED: mount test requires emulation environment"
+# exit 0
+#fi
+
+# Run tests within the chroot environment.
+dochroot bash rm ls ln cat ps mknod mkdir dd grep cmp diff tail \
+ mkfs.ext2 mkfs.vfat mount umount losetup wc << EOF
+#!/bin/bash
+
+. /testing.sh
+
+mknod /dev/loop0 b 7 0
+mknod /dev/loop1 b 7 1
+
+# We need /proc to do much. Make sure we can mount it explicitly.
+
+testing "mount no proc [GNUFAIL]" "mount 2> /dev/null || echo yes" "yes\n" "" ""
+testing "mount /proc" "mount -t proc /proc /proc && ls -d /proc/1" \
+ "/proc/1\n" "" ""
+
+# Make sure the last thing in the list is /proc
+
+testing "mount list1" "mount | tail -n 1" "/proc on /proc type proc (rw)\n" \
+ "" ""
+
+
+# Create an ext2 image
+
+mkdir -p images/{ext2.dir,vfat.dir,test1,test2,test3}
+dd if=/dev/zero of=images/ext2.img bs=1M count=1 2> /dev/null
+mkfs.ext2 -F -b 1024 images/ext2.img > /dev/null 2> /dev/null
+dd if=/dev/zero of=images/vfat.img bs=1M count=1 2> /dev/null
+mkfs.vfat images/vfat.img > /dev/null
+
+# Test mount it
+
+testing "mount vfat image (explicitly autodetect type)" \
+ "mount -t auto images/vfat.img images/vfat.dir && mount | tail -n 1 | grep -o 'vfat.dir type vfat'" \
+ "vfat.dir type vfat\n" "" ""
+testing "mount ext2 image (autodetect type)" \
+ "mount images/ext2.img images/ext2.dir 2> /dev/null && mount | tail -n 1" \
+ "/dev/loop1 on /images/ext2.dir type ext2 (rw)\n" "" ""
+testing "mount remount ext2 image noatime" \
+ "mount -o remount,noatime images/ext2.dir && mount | tail -n 1" \
+ "/dev/loop1 on /images/ext2.dir type ext2 (rw,noatime)\n" "" ""
+testing "mount remount ext2 image ro remembers noatime" \
+ "mount -o remount,ro images/ext2.dir && mount | tail -n 1" \
+ "/dev/loop1 on /images/ext2.dir type ext2 (ro,noatime)\n" "" ""
+
+umount -d images/vfat.dir
+umount -d images/ext2.dir
+
+testing "mount umount freed loop device" \
+ "mount images/ext2.img images/ext2.dir && mount | tail -n 1" \
+ "/dev/loop0 on /images/ext2.dir type ext2 (rw)\n" "" ""
+
+testing "mount block device" \
+ "mount -t ext2 /dev/loop0 images/test1 && mount | tail -n 1" \
+ "/dev/loop0 on /images/test1 type ext2 (rw)\n" "" ""
+
+umount -d images/ext2.dir images/test1
+
+testing "mount remount nonexistent directory" \
+ "mount -o remount,noatime images/ext2.dir 2> /dev/null || echo yes" \
+ "yes\n" "" ""
+
+# Fun with mount -a
+
+testing "mount -a no fstab" "mount -a 2>/dev/null || echo yes" "yes\n" "" ""
+
+umount /proc
+
+# The first field is space delimited, the rest tabs.
+
+cat > /etc/fstab << FSTAB
+/proc /proc proc defaults 0 0
+# Autodetect loop, and provide flags with commas in them.
+/images/ext2.img /images/ext2.dir ext2 noatime,nodev 0 0
+# autodetect filesystem, flags without commas.
+/images/vfat.img /images/vfat.dir auto ro 0 0
+# A block device
+/dev/loop2 /images/test1 auto defaults 0 0
+# tmpfs, filesystem specific flag.
+walrus /images/test2 tmpfs size=42 0 0
+# Autodetect a bind mount.
+/images/test2 /images/test3 auto defaults 0 0
+FSTAB
+
+# Put something on loop2.
+mknod /dev/loop2 b 7 2
+cat images/ext2.img > images/ext2-2.img
+losetup /dev/loop2 images/ext2-2.img
+
+testing "mount -a" "mount -a && echo hello > /images/test2/abc && cat /images/test3/abc && (mount | wc -l)" "hello\n8\n" "" ""
+
+testing "umount -a" "umount -a && ls /proc" "" "" ""
+
+#/bin/bash < /dev/tty > /dev/tty 2> /dev/tty
+mknod /dev/console c 5 1
+/bin/bash < /dev/console > /dev/console 2> /dev/console
+EOF
+
+exit 0
+
+# Run some tests
+
+losetup nonexistent device (should return error 2)
+losetup unbound loop device (should return error 1)
+losetup bind file to loop device
+losetup bound loop device (display) (should return error 0)
+losetup filename (error)
+losetup nofile (file not found)
+losetup -d
+losetup bind with offset
+losetup -f (print first loop device)
+losetup -f filename (associate file with first loop device)
+losetup -o (past end of file) -f filename
+
+mount -a
+ with multiple entries in fstab
+ with duplicate entries in fstab
+ with relative paths in fstab
+ with user entries in fstab
+mount -o async,sync,atime,noatime,dev,nodev,exec,noexec,loop,suid,nosuid,remount,ro,rw,bind,move
+mount -r
+mount -o rw -r
+mount -w -o ro
+mount -t auto
+
+mount with relative path in fstab
+mount block device
+mount char device
+mount file (autoloop)
+mount directory (autobind)
+
+
+testing "umount with no /proc"
+testing "umount curdir"
+
+# The basic tests. These should work even with the small busybox.
+
+testing "sort" "input" "a\nb\nc\n" "c\na\nb\n" ""
+testing "sort #2" "input" "010\n1\n3\n" "3\n1\n010\n" ""
+testing "sort stdin" "" "a\nb\nc\n" "" "b\na\nc\n"
+testing "sort numeric" "-n input" "1\n3\n010\n" "3\n1\n010\n" ""
+testing "sort reverse" "-r input" "wook\nwalrus\npoint\npabst\naargh\n" \
+ "point\nwook\npabst\naargh\nwalrus\n" ""
+
+optional FEATURE_MOUNT_LOOP
+testing "umount -D"
+
+optional FEATURE_MTAB_SUPPORT
+optional FEATURE_MOUNT_NFS
+# No idea what to test here.
+
+optional UMOUNT
+optional FEATURE_UMOUNT_ALL
+testing "umount -a"
+testing "umount -r"
+testing "umount -l"
+testing "umount -f"
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/mount.tests b/release/src/router/busybox/testsuite/mount.tests
new file mode 100755
index 00000000..5374ecbd
--- /dev/null
+++ b/release/src/router/busybox/testsuite/mount.tests
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com>
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+test "`id -u`" = 0 || {
+ echo "SKIPPED: must be root to test this"
+ exit 0
+}
+
+dd if=/dev/zero of=mount.image1m count=1 bs=1M 2>/dev/null || exit 1
+mkfs.minix -v mount.image1m >/dev/null 2>&1 || exit 1
+testdir=$PWD/testdir
+mkdir $testdir 2>/dev/null
+umount -d $testdir 2>/dev/null
+
+# testing "test name" "command" "expected result" "file input" "stdin"
+# file input will be file called "input"
+# test can create a file "actual" instead of writing to stdout
+
+testing "mount -o remount,mand" \
+"mount -o loop mount.image1m $testdir "\
+"&& grep -Fc $testdir </proc/mounts "\
+"&& mount -o remount,mand $testdir "\
+"&& grep -F $testdir </proc/mounts | grep -c '[, ]mand[, ]'" \
+ "1\n""1\n" \
+ "" ""
+
+umount -d $testdir
+rmdir $testdir
+rm mount.image1m
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/msh/msh-supports-underscores-in-variable-names b/release/src/router/busybox/testsuite/msh/msh-supports-underscores-in-variable-names
index 9c7834b3..9c7834b3 100755..100644
--- a/release/src/router/busybox/testsuite/msh/msh-supports-underscores-in-variable-names
+++ b/release/src/router/busybox/testsuite/msh/msh-supports-underscores-in-variable-names
diff --git a/release/src/router/busybox/testsuite/mv/mv-files-to-dir b/release/src/router/busybox/testsuite/mv/mv-files-to-dir
new file mode 100644
index 00000000..c8eaba88
--- /dev/null
+++ b/release/src/router/busybox/testsuite/mv/mv-files-to-dir
@@ -0,0 +1,16 @@
+echo file number one > file1
+echo file number two > file2
+ln -s file2 link1
+mkdir dir1
+touch --date='Sat Jan 29 21:24:08 PST 2000' dir1/file3
+mkdir there
+busybox mv file1 file2 link1 dir1 there
+test -f there/file1
+test -f there/file2
+test -f there/dir1/file3
+test -L there/link1
+test xfile2 = x`readlink there/link1`
+test ! -e file1
+test ! -e file2
+test ! -e link1
+test ! -e dir1/file3
diff --git a/release/src/router/busybox/testsuite/mv/mv-follows-links b/release/src/router/busybox/testsuite/mv/mv-follows-links
new file mode 100644
index 00000000..1fb355b8
--- /dev/null
+++ b/release/src/router/busybox/testsuite/mv/mv-follows-links
@@ -0,0 +1,4 @@
+touch foo
+ln -s foo bar
+busybox mv bar baz
+test -f baz
diff --git a/release/src/router/busybox/testsuite/mv/mv-moves-empty-file b/release/src/router/busybox/testsuite/mv/mv-moves-empty-file
new file mode 100644
index 00000000..48afca4d
--- /dev/null
+++ b/release/src/router/busybox/testsuite/mv/mv-moves-empty-file
@@ -0,0 +1,4 @@
+touch foo
+busybox mv foo bar
+test ! -e foo
+test -f bar
diff --git a/release/src/router/busybox/testsuite/mv/mv-moves-file b/release/src/router/busybox/testsuite/mv/mv-moves-file
index edb4c375..edb4c375 100755..100644
--- a/release/src/router/busybox/testsuite/mv/mv-moves-file
+++ b/release/src/router/busybox/testsuite/mv/mv-moves-file
diff --git a/release/src/router/busybox/testsuite/mv/mv-moves-hardlinks b/release/src/router/busybox/testsuite/mv/mv-moves-hardlinks
new file mode 100644
index 00000000..eaa8215a
--- /dev/null
+++ b/release/src/router/busybox/testsuite/mv/mv-moves-hardlinks
@@ -0,0 +1,4 @@
+touch foo
+ln foo bar
+busybox mv bar baz
+test ! -f bar -a -f baz
diff --git a/release/src/router/busybox/testsuite/mv/mv-moves-large-file b/release/src/router/busybox/testsuite/mv/mv-moves-large-file
new file mode 100644
index 00000000..77d088ff
--- /dev/null
+++ b/release/src/router/busybox/testsuite/mv/mv-moves-large-file
@@ -0,0 +1,4 @@
+dd if=/dev/zero of=foo seek=10k count=1 2>/dev/null
+busybox mv foo bar
+test ! -e foo
+test -f bar
diff --git a/release/src/router/busybox/testsuite/mv/mv-moves-small-file b/release/src/router/busybox/testsuite/mv/mv-moves-small-file
new file mode 100644
index 00000000..065c7f1e
--- /dev/null
+++ b/release/src/router/busybox/testsuite/mv/mv-moves-small-file
@@ -0,0 +1,4 @@
+echo I WANT > foo
+busybox mv foo bar
+test ! -e foo
+test -f bar
diff --git a/release/src/router/busybox/testsuite/mv/mv-moves-symlinks b/release/src/router/busybox/testsuite/mv/mv-moves-symlinks
new file mode 100644
index 00000000..c413af07
--- /dev/null
+++ b/release/src/router/busybox/testsuite/mv/mv-moves-symlinks
@@ -0,0 +1,6 @@
+touch foo
+ln -s foo bar
+busybox mv bar baz
+test -f foo
+test ! -e bar
+test -L baz
diff --git a/release/src/router/busybox/testsuite/mv/mv-moves-unreadable-files b/release/src/router/busybox/testsuite/mv/mv-moves-unreadable-files
new file mode 100644
index 00000000..bc9c3133
--- /dev/null
+++ b/release/src/router/busybox/testsuite/mv/mv-moves-unreadable-files
@@ -0,0 +1,5 @@
+touch foo
+chmod a-r foo
+busybox mv foo bar
+test ! -e foo
+test -f bar
diff --git a/release/src/router/busybox/testsuite/mv/mv-preserves-hard-links b/release/src/router/busybox/testsuite/mv/mv-preserves-hard-links
new file mode 100644
index 00000000..b3ba3aa2
--- /dev/null
+++ b/release/src/router/busybox/testsuite/mv/mv-preserves-hard-links
@@ -0,0 +1,6 @@
+# FEATURE: CONFIG_FEATURE_PRESERVE_HARDLINKS
+touch foo
+ln foo bar
+mkdir baz
+busybox mv foo bar baz
+test baz/foo -ef baz/bar
diff --git a/release/src/router/busybox/testsuite/mv/mv-preserves-links b/release/src/router/busybox/testsuite/mv/mv-preserves-links
new file mode 100644
index 00000000..ea565d2f
--- /dev/null
+++ b/release/src/router/busybox/testsuite/mv/mv-preserves-links
@@ -0,0 +1,5 @@
+touch foo
+ln -s foo bar
+busybox mv bar baz
+test -L baz
+test xfoo = x`readlink baz`
diff --git a/release/src/router/busybox/testsuite/mv/mv-refuses-mv-dir-to-subdir b/release/src/router/busybox/testsuite/mv/mv-refuses-mv-dir-to-subdir
new file mode 100644
index 00000000..7c572c4f
--- /dev/null
+++ b/release/src/router/busybox/testsuite/mv/mv-refuses-mv-dir-to-subdir
@@ -0,0 +1,23 @@
+echo file number one > file1
+echo file number two > file2
+ln -s file2 link1
+mkdir dir1
+touch --date='Sat Jan 29 21:24:08 PST 2000' dir1/file3
+mkdir there
+busybox mv file1 file2 link1 dir1 there
+test -f there/file1
+test -f there/file2
+test -f there/dir1/file3
+test -L there/link1
+test xfile2 = x`readlink there/link1`
+test ! -e file1
+test ! -e file2
+test ! -e link1
+test ! -e dir1/file3
+set +e
+busybox mv there there/dir1
+if [ $? != 0 ] ; then
+ exit 0;
+fi
+
+exit 1;
diff --git a/release/src/router/busybox/testsuite/mv/mv-removes-source-file b/release/src/router/busybox/testsuite/mv/mv-removes-source-file
new file mode 100644
index 00000000..48afca4d
--- /dev/null
+++ b/release/src/router/busybox/testsuite/mv/mv-removes-source-file
@@ -0,0 +1,4 @@
+touch foo
+busybox mv foo bar
+test ! -e foo
+test -f bar
diff --git a/release/src/router/busybox/testsuite/od.tests b/release/src/router/busybox/testsuite/od.tests
new file mode 100755
index 00000000..69c29952
--- /dev/null
+++ b/release/src/router/busybox/testsuite/od.tests
@@ -0,0 +1,17 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+
+testing "od -b" \
+ "od -b" \
+"\
+0000000 110 105 114 114 117
+0000006
+" \
+ "" "HELLO"
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/parse.tests b/release/src/router/busybox/testsuite/parse.tests
new file mode 100755
index 00000000..f1ee7b83
--- /dev/null
+++ b/release/src/router/busybox/testsuite/parse.tests
@@ -0,0 +1,109 @@
+#!/bin/sh
+
+# Copyright 2008 by Denys Vlasenko <vda.linux@googlemail.com>
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+COLLAPSE=$(( 0x00010000))
+TRIM=$(( 0x00020000))
+GREEDY=$(( 0x00040000))
+MIN_DIE=$(( 0x00100000))
+KEEP_COPY=$((0x00200000))
+ESCAPE=$(( 0x00400000))
+NORMAL=$(( COLLAPSE | TRIM | GREEDY))
+
+# testing "description" "command" "result" "infile" "stdin"
+
+testing "parse mdev.conf" \
+ "parse -n 4 -m 3 -f $((NORMAL)) -" \
+ "[sda][0:0][644][@echo @echo TEST]\n" \
+ "-" \
+ " sda 0:0 644 @echo @echo TEST # echo trap\n"
+
+testing "parse notrim" \
+ "parse -n 4 -m 3 -f $((NORMAL - TRIM - COLLAPSE)) -" \
+ "[][sda][0:0][644 @echo @echo TEST ]\n" \
+ "-" \
+ " sda 0:0 644 @echo @echo TEST \n"
+
+FILE=__parse
+cat >$FILE <<EOF
+#
+# Device Point System Options
+#_______________________________________________________________
+/dev/hdb3 / ext2 defaults 1 0
+ /dev/hdb1 /dosc hpfs ro 1 0
+ /dev/fd0 /dosa vfat rw,user,noauto,nohide 0 0
+ /dev/fd1 /dosb vfat rw,user,noauto,nohide 0 0
+#
+ /dev/cdrom /cdrom iso9660 ro,user,noauto,nohide 0 0
+/dev/hdb5 /redhat ext2 rw,root,noauto,nohide 0 0 #sssd
+ /dev/hdb6 /win2home ntfs rw,root,noauto,nohide 0 0# ssdsd
+/dev/hdb7 /win2skul ntfs rw,root,noauto,nohide none 0 0
+none /dev/pts devpts gid=5,mode=620 0 0
+ none /proc proc defaults 0 0
+EOF
+
+cat >$FILE.res <<EOF
+[/dev/hdb3][/][ext2][defaults][1][0]
+[/dev/hdb1][/dosc][hpfs][ro][1][0]
+[/dev/fd0][/dosa][vfat][rw,user,noauto,nohide][0][0]
+[/dev/fd1][/dosb][vfat][rw,user,noauto,nohide][0][0]
+[/dev/cdrom][/cdrom][iso9660][ro,user,noauto,nohide][0][0]
+[/dev/hdb5][/redhat][ext2][rw,root,noauto,nohide][0][0]
+[/dev/hdb6][/win2home][ntfs][rw,root,noauto,nohide][0][0]
+[/dev/hdb7][/win2skul][ntfs][rw,root,noauto,nohide][none][0 0]
+[none][/dev/pts][devpts][gid=5,mode=620][0][0]
+[none][/proc][proc][defaults][0][0]
+EOF
+
+testing "parse polluted fstab" \
+ "parse -n 6 -m 6 $FILE" \
+ "`cat $FILE.res`\n" \
+ "" \
+ ""
+cp ../examples/inittab $FILE
+cat >$FILE.res <<EOF
+[][][sysinit][/etc/init.d/rcS]
+[][][askfirst][-/bin/sh]
+[tty2][][askfirst][-/bin/sh]
+[tty3][][askfirst][-/bin/sh]
+[tty4][][askfirst][-/bin/sh]
+[tty4][][respawn][/sbin/getty 38400 tty5]
+[tty5][][respawn][/sbin/getty 38400 tty6]
+[][][restart][/sbin/init]
+[][][ctrlaltdel][/sbin/reboot]
+[][][shutdown][/bin/umount -a -r]
+[][][shutdown][/sbin/swapoff -a]
+EOF
+
+testing "parse inittab from examples" \
+ "parse -n 4 -m 4 -f $((NORMAL - TRIM - COLLAPSE)) -d'#:' $FILE" \
+ "`cat $FILE.res`\n" \
+ "" \
+ ""
+
+cp ../examples/udhcp/udhcpd.conf $FILE
+cat >$FILE.res <<EOF
+[start][192.168.0.20]
+[end][192.168.0.254]
+[interface][eth0]
+[opt][dns][192.168.10.2][192.168.10.10]
+[option][subnet][255.255.255.0]
+[opt][router][192.168.10.2]
+[opt][wins][192.168.10.10]
+[option][dns][129.219.13.81]
+[option][domain][local]
+[option][lease][864000]
+EOF
+
+testing "parse udhcpd.conf from examples" \
+ "parse -n 127 $FILE" \
+ "`cat $FILE.res`\n" \
+ "" \
+ ""
+
+rm -f $FILE $FILE.res
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/patch.tests b/release/src/router/busybox/testsuite/patch.tests
new file mode 100755
index 00000000..cfe69b76
--- /dev/null
+++ b/release/src/router/busybox/testsuite/patch.tests
@@ -0,0 +1,65 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+
+testing "patch with old_file == new_file" \
+ "patch; echo $?; cat input" \
+"\
+patching file input
+0
+qwe
+asd
+zxc
+" \
+ "qwe\nzxc\n" \
+"\
+--- input Jan 01 01:01:01 2000
++++ input Jan 01 01:01:01 2000
+@@ -1,2 +1,3 @@
+ qwe
++asd
+ zxc
+" \
+
+testing "patch with nonexistent old_file" \
+ "patch; echo $?; cat input" \
+"\
+patching file input
+0
+qwe
+asd
+zxc
+" \
+ "qwe\nzxc\n" \
+"\
+--- input.doesnt_exist Jan 01 01:01:01 2000
++++ input Jan 01 01:01:01 2000
+@@ -1,2 +1,3 @@
+ qwe
++asd
+ zxc
+" \
+
+testing "patch -R with nonexistent old_file" \
+ "patch -R; echo $?; cat input" \
+"\
+patching file input
+0
+qwe
+zxc
+" \
+ "qwe\nasd\nzxc\n" \
+"\
+--- input.doesnt_exist Jan 01 01:01:01 2000
++++ input Jan 01 01:01:01 2000
+@@ -1,2 +1,3 @@
+ qwe
++asd
+ zxc
+" \
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/pidof.tests b/release/src/router/busybox/testsuite/pidof.tests
new file mode 100755
index 00000000..a05a3023
--- /dev/null
+++ b/release/src/router/busybox/testsuite/pidof.tests
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# pidof tests.
+# Copyright 2005 by Bernhard Reutner-Fischer
+# Licensed under GPL v2, see file LICENSE for details.
+
+# AUDIT:
+
+. testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+
+testing "pidof (exit with error)" \
+ "pidof veryunlikelyoccuringbinaryname ; echo \$?" "1\n" "" ""
+testing "pidof (exit with success)" "pidof pidof > /dev/null; echo \$?" \
+ "0\n" "" ""
+# We can get away with this because it says #!/bin/sh up top.
+
+testing "pidof this" "pidof pidof.tests | grep -o -w $$" "$$\n" "" ""
+
+optional FEATURE_PIDOF_SINGLE
+testing "pidof -s" "pidof -s init" "1\n" "" ""
+
+optional FEATURE_PIDOF_OMIT
+# This test fails now because process name matching logic has changed,
+# but new logic is not "wrong" either... see find_pid_by_name.c comments
+#testing "pidof -o %PPID" "pidof -o %PPID pidof.tests | grep -o -w $$" "" "" ""
+testing "pidof -o %PPID NOP" "pidof -o %PPID -s init" "1\n" "" ""
+testing "pidof -o init" "pidof -o 1 init | grep -o -w 1" "" "" ""
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/printf.tests b/release/src/router/busybox/testsuite/printf.tests
new file mode 100755
index 00000000..f9d1deca
--- /dev/null
+++ b/release/src/router/busybox/testsuite/printf.tests
@@ -0,0 +1,108 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# Need this in order to not execute shell builtin
+bb="busybox "
+
+# testing "test name" "command" "expected result" "file input" "stdin"
+
+testing "printf produces no further output 1" \
+ "${bb}printf '\c' foo" \
+ "" \
+ "" ""
+
+testing "printf produces no further output 2" \
+ "${bb}printf '%s\c' foo bar" \
+ "foo" \
+ "" ""
+
+testing "printf repeatedly uses pattern for each argv" \
+ "${bb}printf '%s\n' foo \$HOME" \
+ "foo\n$HOME\n" \
+ "" ""
+
+testing "printf understands %b escaped_string" \
+ "${bb}printf '%b' 'a\tb' 'c\\d\n' 2>&1; echo \$?" \
+ "a\tbc\\d\n""0\n" \
+ "" ""
+
+testing "printf understands %d '\"x' \"'y\" \"'zTAIL\"" \
+ "${bb}printf '%d\n' '\"x' \"'y\" \"'zTAIL\" 2>&1; echo \$?" \
+ "120\n""121\n""122\n""0\n" \
+ "" ""
+
+testing "printf understands %s '\"x' \"'y\" \"'zTAIL\"" \
+ "${bb}printf '%s\n' '\"x' \"'y\" \"'zTAIL\" 2>&1; echo \$?" \
+ "\"x\n""'y\n""'zTAIL\n""0\n" \
+ "" ""
+
+testing "printf understands %23.12f" \
+ "${bb}printf '|%23.12f|\n' 5.25 2>&1; echo \$?" \
+ "| 5.250000000000|\n""0\n" \
+ "" ""
+
+testing "printf understands %*.*f" \
+ "${bb}printf '|%*.*f|\n' 23 12 5.25 2>&1; echo \$?" \
+ "| 5.250000000000|\n""0\n" \
+ "" ""
+
+testing "printf understands %*f with negative width" \
+ "${bb}printf '|%*f|\n' -23 5.25 2>&1; echo \$?" \
+ "|5.250000 |\n""0\n" \
+ "" ""
+
+testing "printf understands %.*f with negative precision" \
+ "${bb}printf '|%.*f|\n' -12 5.25 2>&1; echo \$?" \
+ "|5.250000|\n""0\n" \
+ "" ""
+
+testing "printf understands %*.*f with negative width/precision" \
+ "${bb}printf '|%*.*f|\n' -23 -12 5.25 2>&1; echo \$?" \
+ "|5.250000 |\n""0\n" \
+ "" ""
+
+testing "printf understands %zd" \
+ "${bb}printf '%zd\n' -5 2>&1; echo \$?" \
+ "-5\n""0\n" \
+ "" ""
+
+testing "printf understands %ld" \
+ "${bb}printf '%ld\n' -5 2>&1; echo \$?" \
+ "-5\n""0\n" \
+ "" ""
+
+testing "printf understands %Ld" \
+ "${bb}printf '%Ld\n' -5 2>&1; echo \$?" \
+ "-5\n""0\n" \
+ "" ""
+
+# We are "more correct" here than bash/coreutils: they happily print -2
+# as if it is a huge unsigned number
+testing "printf handles %u -N" \
+ "${bb}printf '%u\n' 1 -2 3 2>&1; echo \$?" \
+ "1\n""printf: -2: invalid number\n""0\n""3\n""0\n" \
+ "" ""
+
+# Actually, we are wrong here: exit code should be 1
+testing "printf handles %d bad_input" \
+ "${bb}printf '%d\n' 1 - 2 bad 3 123bad 4 2>&1; echo \$?" \
+"1\n""printf: -: invalid number\n""0\n"\
+"2\n""printf: bad: invalid number\n""0\n"\
+"3\n""printf: 123bad: invalid number\n""0\n"\
+"4\n""0\n" \
+ "" ""
+
+testing "printf aborts on bare %" \
+ "${bb}printf '%' a b c 2>&1; echo \$?" \
+ "printf: %: invalid format\n""1\n" \
+ "" ""
+
+testing "printf aborts on %r" \
+ "${bb}printf '%r' a b c 2>&1; echo \$?" \
+ "printf: %r: invalid format\n""1\n" \
+ "" ""
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/pwd/pwd-prints-working-directory b/release/src/router/busybox/testsuite/pwd/pwd-prints-working-directory
index 7bea1074..8575347d 100755..100644
--- a/release/src/router/busybox/testsuite/pwd/pwd-prints-working-directory
+++ b/release/src/router/busybox/testsuite/pwd/pwd-prints-working-directory
@@ -1 +1 @@
-test `pwd` = `busybox pwd`
+test $(pwd) = $(busybox pwd)
diff --git a/release/src/router/busybox/testsuite/readlink.tests b/release/src/router/busybox/testsuite/readlink.tests
new file mode 100755
index 00000000..0faa6ed0
--- /dev/null
+++ b/release/src/router/busybox/testsuite/readlink.tests
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# Readlink tests.
+# Copyright 2006 by Natanael Copa <n@tanael.org>
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+TESTDIR=readlink_testdir
+TESTFILE="$TESTDIR/testfile"
+TESTLINK="testlink"
+FAILLINK="$TESTDIR/$TESTDIR/testlink"
+
+# create the dir and test files
+mkdir -p "./$TESTDIR"
+touch "./$TESTFILE"
+ln -s "./$TESTFILE" "./$TESTLINK"
+
+testing "readlink on a file" "readlink ./$TESTFILE" "" "" ""
+testing "readlink on a link" "readlink ./$TESTLINK" "./$TESTFILE\n" "" ""
+
+optional FEATURE_READLINK_FOLLOW
+
+testing "readlink -f on a file" "readlink -f ./$TESTFILE" "$PWD/$TESTFILE\n" "" ""
+testing "readlink -f on a link" "readlink -f ./$TESTLINK" "$PWD/$TESTFILE\n" "" ""
+testing "readlink -f on an invalid link" "readlink -f ./$FAILLINK" "" "" ""
+testing "readlink -f on a wierd dir" "readlink -f $TESTDIR/../$TESTFILE" "$PWD/$TESTFILE\n" "" ""
+
+
+# clean up
+rm -r "$TESTLINK" "$TESTDIR"
+
diff --git a/release/src/router/busybox/testsuite/rm/rm-removes-file b/release/src/router/busybox/testsuite/rm/rm-removes-file
index 46571a98..46571a98 100755..100644
--- a/release/src/router/busybox/testsuite/rm/rm-removes-file
+++ b/release/src/router/busybox/testsuite/rm/rm-removes-file
diff --git a/release/src/router/busybox/testsuite/rmdir/rmdir-removes-parent-directories b/release/src/router/busybox/testsuite/rmdir/rmdir-removes-parent-directories
index 222f5dec..222f5dec 100755..100644
--- a/release/src/router/busybox/testsuite/rmdir/rmdir-removes-parent-directories
+++ b/release/src/router/busybox/testsuite/rmdir/rmdir-removes-parent-directories
diff --git a/release/src/router/busybox/testsuite/runtest b/release/src/router/busybox/testsuite/runtest
index 2cf85f5d..cade871a 100755
--- a/release/src/router/busybox/testsuite/runtest
+++ b/release/src/router/busybox/testsuite/runtest
@@ -1,113 +1,164 @@
#!/bin/sh
-PATH=$(dirname $(pwd)):$PATH
-
-show_result ()
-{
- local resolution=$1
- local testcase=$2
- local status=0
-
- if [ $resolution = XPASS -o $resolution = FAIL ]; then
- status=1
- fi
-
- if [ "$verbose" -o $status -eq 1 ]; then
- echo "$resolution: $testcase"
- fi
-
- return $status
+# Usage:
+# runtest [applet1] [applet2...]
+
+# Helper for helpers. Oh my...
+test x"$ECHO" != x"" || {
+ ECHO="echo"
+ test x"`echo -ne`" = x"" || {
+ # Compile and use a replacement 'echo' which understands -e -n
+ ECHO="$PWD/echo-ne"
+ test -x "$ECHO" || {
+ gcc -Os -o "$ECHO" ../scripts/echo.c || exit 1
+ }
+ }
+ export ECHO
}
-run_applet_testcase ()
+# Run one old-style test.
+# Tests are stored in applet/testcase shell scripts.
+# They are run using "sh -x -e applet/testcase".
+# Option -e will make testcase stop on the first failed command.
+run_applet_testcase()
{
- local applet=$1
- local testcase=$2
+ local applet="$1"
+ local testcase="$2"
local status=0
- local X=
+ local uc_applet=$(echo "$applet" | tr a-z A-Z)
+ local testname="$testcase"
- local uc_applet=$(echo $applet | tr a-z A-Z)
- local testname=$(basename $testcase)
-
- if grep -q "^# CONFIG_${uc_applet} is not set$" ../.config; then
- show_result UNTESTED $testname
+ testname="${testname##*/}" # take basename
+ if grep "^# CONFIG_$uc_applet is not set$" "$bindir/.config" >/dev/null; then
+ echo "UNTESTED: $testname"
return 0
fi
- if grep -q "^# FEATURE: " $testcase; then
- local feature=`sed -ne 's/^# FEATURE: //p' $testcase`
+ if grep "^# FEATURE: " "$testcase" >/dev/null; then
+ local feature=$(sed -ne 's/^# FEATURE: //p' "$testcase")
- if grep -q "^# ${feature} is not set$" ../.config; then
- show_result UNTESTED $testname
+ if grep "^# $feature is not set$" "$bindir/.config" >/dev/null; then
+ echo "UNTESTED: $testname"
return 0
fi
fi
- if grep -q "^# XFAIL$" $testcase; then
- X=X
- fi
-
- mkdir tmp
- pushd tmp >/dev/null
-
- if . ../$testcase >/dev/null 2>&1; then
- show_result ${X}PASS $testname
- status=$?
+ rm -rf ".tmpdir.$applet"
+ mkdir -p ".tmpdir.$applet"
+ cd ".tmpdir.$applet" || return 1
+
+# echo "Running testcase $testcase"
+ d="$tsdir" \
+ sh -x -e "$testcase" >"$testname.stdout.txt" 2>&1 || status=$?
+ if [ $status -ne 0 ]; then
+ echo "FAIL: $testname"
+ if [ x"$VERBOSE" != x ]; then
+ cat "$testname.stdout.txt"
+ fi
else
- show_result ${X}FAIL $testname
- status=$?
+ echo "PASS: $testname"
fi
- popd >/dev/null
- rm -rf tmp
+ cd ..
+ rm -rf ".tmpdir.$applet"
return $status
}
-run_applet_tests ()
+# Run all old-style tests for given applet
+run_oldstyle_applet_tests()
{
- local applet=$1
-
+ local applet="$1"
local status=0
- for testcase in $applet/*; do
- if [ "$testcase" = "$applet/CVS" ]; then
- continue
- fi
-
- if run_applet_testcase $applet $testcase; then
- :
- else
- status=1
- fi
+ for testcase in "$tsdir/$applet"/*; do
+ # switch on basename of $testcase
+ case "${testcase##*/}" in
+ .*) continue ;; # .svn, .git etc
+ *~) continue ;; # backup files
+ "CVS") continue ;;
+ \#*) continue ;; # CVS merge residues
+ *.mine) continue ;; # svn-produced junk
+ *.r[0-9]*) continue ;; # svn-produced junk
+ esac
+ run_applet_testcase "$applet" "$testcase" || status=1
done
-
return $status
}
-status=0
+
+lcwd=$(pwd)
+[ x"$tsdir" != x ] || tsdir="$lcwd"
+[ x"$bindir" != x ] || bindir="${lcwd%/*}" # one directory up from $lcwd
+PATH="$bindir:$PATH"
+
+if [ x"$VERBOSE" = x ]; then
+ export VERBOSE=
+fi
if [ x"$1" = x"-v" ]; then
- verbose=1
+ export VERBOSE=1
shift
fi
+implemented=$(
+ "$bindir/busybox" 2>&1 |
+ while read line; do
+ if [ x"$line" = x"Currently defined functions:" ]; then
+ xargs | sed 's/,//g'
+ break
+ fi
+ done
+ )
+
+applets="$implemented"
if [ $# -ne 0 ]; then
applets="$@"
-else
- applets="*"
fi
+# Populate a directory with links to all busybox applets
+
+LINKSDIR="$bindir/runtest-tempdir-links"
+rm -rf "$LINKSDIR" 2>/dev/null
+mkdir "$LINKSDIR"
+for i in $implemented; do
+ ln -s "$bindir/busybox" "$LINKSDIR/$i"
+done
+
+# Set up option flags so tests can be selective.
+export OPTIONFLAGS=:$(
+ sed -nr 's/^CONFIG_//p' "$bindir/.config" |
+ sed 's/=.*//' | xargs | sed 's/ /:/g'
+ )
+
+status=0
for applet in $applets; do
- if [ "$applet" != CVS -a -d "$applet" ]; then
- if run_applet_tests $applet; then
- :
- else
- status=1
+ # Any old-style tests for this applet?
+ if [ -d "$tsdir/$applet" ]; then
+ run_oldstyle_applet_tests "$applet" || status=1
+ fi
+
+ # Is this a new-style test?
+ if [ -f "$applet.tests" ]; then
+ if [ ! -h "$LINKSDIR/$applet" ]; then
+ # (avoiding bash'ism "${applet:0:4}")
+ if ! echo "$applet" | grep "^all_" >/dev/null; then
+ echo "SKIPPED: $applet (not built)"
+ continue
+ fi
fi
+# echo "Running test $tsdir/$applet.tests"
+ PATH="$LINKSDIR:$tsdir:$bindir:$PATH" \
+ "$tsdir/$applet.tests" || status=1
fi
done
+# Leaving the dir makes it somewhat easier to run failed test by hand
+#rm -rf "$LINKSDIR"
+
+if [ $status -ne 0 ] && [ x"$VERBOSE" = x ]; then
+ echo "Failures detected, running with -v (verbose) will give more info"
+fi
exit $status
diff --git a/release/src/router/busybox/testsuite/sed.tests b/release/src/router/busybox/testsuite/sed.tests
new file mode 100755
index 00000000..9a7f886c
--- /dev/null
+++ b/release/src/router/busybox/testsuite/sed.tests
@@ -0,0 +1,210 @@
+#!/bin/sh
+
+# SUSv3 compliant sed tests.
+# Copyright 2005 by Rob Landley <rob@landley.net>
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# testing "description" "arguments" "result" "infile" "stdin"
+
+# Corner cases
+testing "sed no files (stdin)" 'sed ""' "hello\n" "" "hello\n"
+testing "sed explicit stdin" 'sed "" -' "hello\n" "" "hello\n"
+testing "sed handles empty lines" "sed -e 's/\$/@/'" "@\n" "" "\n"
+testing "sed stdin twice" 'sed "" - -' "hello" "" "hello"
+
+# Trailing EOF.
+# Match $, at end of each file or all files?
+
+# -e corner cases
+# without -e
+# multiple -e
+# interact with a
+# -eee arg1 arg2 arg3
+# -f corner cases
+# -e -f -e
+# -n corner cases
+# no newline at EOF?
+# -r corner cases
+# Just make sure it works.
+# -i corner cases:
+# sed -i -
+# permissions
+# -i on a symlink
+# on a directory
+# With $ last-line test
+# Continue with \
+# End of script with trailing \
+
+# command list
+testing "sed accepts blanks before command" "sed -e '1 d'" "" "" ""
+testing "sed accepts newlines in -e" "sed -e 'i\
+1
+a\
+3'" "1\n2\n3\n" "" "2\n"
+testing "sed accepts multiple -e" "sed -e 'i\' -e '1' -e 'a\' -e '3'" \
+ "1\n2\n3\n" "" "2\n"
+
+# substitutions
+testing "sed -n" "sed -n -e s/foo/bar/ -e s/bar/baz/" "" "" "foo\n"
+testing "sed s//p" "sed -e s/foo/bar/p -e s/bar/baz/p" "bar\nbaz\nbaz\n" \
+ "" "foo\n"
+testing "sed -n s//p" "sed -ne s/abc/def/p" "def\n" "" "abc\n"
+testing "sed s//g (exhaustive)" "sed -e 's/[[:space:]]*/,/g'" ",1,2,3,4,5,\n" \
+ "" "12345\n"
+testing "sed s arbitrary delimiter" "sed -e 's woo boing '" "boing\n" "" "woo\n"
+testing "sed s chains" "sed -e s/foo/bar/ -e s/bar/baz/" "baz\n" "" "foo\n"
+testing "sed s chains2" "sed -e s/foo/bar/ -e s/baz/nee/" "bar\n" "" "foo\n"
+testing "sed s [delimiter]" "sed -e 's@[@]@@'" "onetwo" "" "one@two"
+testing "sed s with \\t (GNU ext)" "sed 's/\t/ /'" "one two" "" "one\ttwo"
+
+# branch
+testing "sed b (branch)" "sed -e 'b one;p;: one'" "foo\n" "" "foo\n"
+testing "sed b (branch with no label jumps to end)" "sed -e 'b;p'" \
+ "foo\n" "" "foo\n"
+
+# test and branch
+testing "sed t (test/branch)" "sed -e 's/a/1/;t one;p;: one;p'" \
+ "1\n1\nb\nb\nb\nc\nc\nc\n" "" "a\nb\nc\n"
+testing "sed t (test/branch clears test bit)" "sed -e 's/a/b/;:loop;t loop'" \
+ "b\nb\nc\n" "" "a\nb\nc\n"
+testing "sed T (!test/branch)" "sed -e 's/a/1/;T notone;p;: notone;p'" \
+ "1\n1\n1\nb\nb\nc\nc\n" "" "a\nb\nc\n"
+
+# Normal sed end-of-script doesn't print "c" because n flushed the pattern
+# space. If n hits EOF, pattern space is empty when script ends.
+# Query: how does this interact with no newline at EOF?
+testing "sed n (flushes pattern space, terminates early)" "sed -e 'n;p'" \
+ "a\nb\nb\nc\n" "" "a\nb\nc\n"
+# N does _not_ flush pattern space, therefore c is still in there @ script end.
+testing "sed N (doesn't flush pattern space when terminating)" "sed -e 'N;p'" \
+ "a\nb\na\nb\nc\n" "" "a\nb\nc\n"
+testing "sed address match newline" 'sed "/b/N;/b\\nc/i woo"' \
+ "a\nwoo\nb\nc\nd\n" "" "a\nb\nc\nd\n"
+
+# Multiple lines in pattern space
+testing "sed N (stops at end of input) and P (prints to first newline only)" \
+ "sed -n 'N;P;p'" "a\na\nb\n" "" "a\nb\nc\n"
+
+# Hold space
+testing "sed G (append hold space to pattern space)" 'sed G' "a\n\nb\n\nc\n\n" \
+ "" "a\nb\nc\n"
+#testing "sed g/G (swap/append hold and patter space)"
+#testing "sed g (swap hold/pattern space)"
+
+testing "sed d ends script iteration" \
+ "sed -e '/ook/d;s/ook/ping/p;i woot'" "" "" "ook\n"
+testing "sed d ends script iteration (2)" \
+ "sed -e '/ook/d;a\' -e 'bang'" "woot\nbang\n" "" "ook\nwoot\n"
+
+# Multiple files, with varying newlines and NUL bytes
+testing "sed embedded NUL" "sed -e 's/woo/bang/'" "\0bang\0woo\0" "" \
+ "\0woo\0woo\0"
+testing "sed embedded NUL g" "sed -e 's/woo/bang/g'" "bang\0bang\0" "" \
+ "woo\0woo\0"
+echo -e "/woo/a he\0llo" > sed.commands
+testing "sed NUL in command" "sed -f sed.commands" "woo\nhe\0llo\n" "" "woo"
+rm sed.commands
+
+# sed has funky behavior with newlines at the end of file. Test lots of
+# corner cases with the optional newline appending behavior.
+
+testing "sed normal newlines" "sed -e 's/woo/bang/' input -" "bang\nbang\n" \
+ "woo\n" "woo\n"
+testing "sed leave off trailing newline" "sed -e 's/woo/bang/' input -" \
+ "bang\nbang" "woo\n" "woo"
+testing "sed autoinsert newline" "sed -e 's/woo/bang/' input -" "bang\nbang" \
+ "woo" "woo"
+testing "sed empty file plus cat" "sed -e 's/nohit//' input -" "one\ntwo" \
+ "" "one\ntwo"
+testing "sed cat plus empty file" "sed -e 's/nohit//' input -" "one\ntwo" \
+ "one\ntwo" ""
+testing "sed append autoinserts newline" "sed -e '/woot/a woo' -" \
+ "woot\nwoo\n" "" "woot"
+testing "sed insert doesn't autoinsert newline" "sed -e '/woot/i woo' -" \
+ "woo\nwoot" "" "woot"
+testing "sed print autoinsert newlines" "sed -e 'p' -" "one\none" "" "one"
+testing "sed print autoinsert newlines two files" "sed -e 'p' input -" \
+ "one\none\ntwo\ntwo" "one" "two"
+testing "sed noprint, no match, no newline" "sed -ne 's/woo/bang/' input" \
+ "" "no\n" ""
+testing "sed selective matches with one nl" "sed -ne 's/woo/bang/p' input -" \
+ "a bang\nc bang\n" "a woo\nb no" "c woo\nd no"
+testing "sed selective matches insert newline" \
+ "sed -ne 's/woo/bang/p' input -" "a bang\nb bang\nd bang" \
+ "a woo\nb woo" "c no\nd woo"
+testing "sed selective matches noinsert newline" \
+ "sed -ne 's/woo/bang/p' input -" "a bang\nb bang" "a woo\nb woo" \
+ "c no\nd no"
+testing "sed clusternewline" \
+ "sed -e '/one/a 111' -e '/two/i 222' -e p input -" \
+ "one\none\n111\n222\ntwo\ntwo" "one" "two"
+testing "sed subst+write" \
+ "sed -e 's/i/z/' -e 'woutputw' input -; echo -n X; cat outputw" \
+ "thzngy\nagaznXthzngy\nagazn" "thingy" "again"
+rm outputw
+testing "sed trailing NUL" \
+ "sed 's/i/z/' input -" \
+ "a\0b\0\nc" "a\0b\0" "c"
+testing "sed escaped newline in command" \
+ "sed 's/a/z\\
+z/' input" \
+ "z\nz" "a" ""
+
+# Test end-of-file matching behavior
+
+testing "sed match EOF" "sed -e '"'$p'"'" "hello\nthere\nthere" "" \
+ "hello\nthere"
+testing "sed match EOF two files" "sed -e '"'$p'"' input -" \
+ "one\ntwo\nthree\nfour\nfour" "one\ntwo" "three\nfour"
+# sed match EOF inline: gnu sed 4.1.5 outputs this:
+#00000000 6f 6e 65 0a 6f 6f 6b 0a 6f 6f 6b 0a 74 77 6f 0a |one.ook.ook.two.|
+#00000010 0a 74 68 72 65 65 0a 6f 6f 6b 0a 6f 6f 6b 0a 66 |.three.ook.ook.f|
+#00000020 6f 75 72 |our|
+# which looks buggy to me.
+$ECHO -ne "three\nfour" > input2
+testing "sed match EOF inline" \
+ "sed -e '"'$i ook'"' -i input input2 && cat input input2" \
+ "one\nook\ntwothree\nook\nfour" "one\ntwo" ""
+rm input2
+
+# Test lie-to-autoconf
+
+testing "sed lie-to-autoconf" "sed --version | grep -o 'GNU sed version '" \
+ "GNU sed version \n" "" ""
+
+# Jump to nonexistent label
+testing "sed nonexistent label" "sed -e 'b walrus' 2> /dev/null || echo yes" \
+ "yes\n" "" ""
+
+testing "sed backref from empty s uses range regex" \
+ "sed -e '/woot/s//eep \0 eep/'" "eep woot eep" "" "woot"
+
+testing "sed backref from empty s uses range regex with newline" \
+ "sed -e '/woot/s//eep \0 eep/'" "eep woot eep\n" "" "woot\n"
+
+# -i with no filename
+
+touch ./- # Detect gnu failure mode here.
+testing "sed -i with no arg [GNUFAIL]" "sed -e '' -i 2> /dev/null || echo yes" \
+ "yes\n" "" ""
+rm ./- # Clean up
+
+testing "sed s/xxx/[/" "sed -e 's/xxx/[/'" "[\n" "" "xxx\n"
+
+# Ponder this a bit more, why "woo not found" from gnu version?
+#testing "sed doesn't substitute in deleted line" \
+# "sed -e '/ook/d;s/ook//;t woo;a bang;'" "bang" "" "ook\n"
+
+# This makes both seds very unhappy. Why?
+#testing "sed -g (exhaustive)" "sed -e 's/[[:space:]]*/,/g'" ",1,2,3,4,5," \
+# "" "12345"
+
+# testing "description" "arguments" "result" "infile" "stdin"
+
+testing "sed n command must reset 'substituted' bit" \
+ "sed 's/1/x/;T;n;: next;s/3/y/;t quit;n;b next;: quit;q'" \
+ "0\nx\n2\ny\n" "" "0\n1\n2\n3\n"
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/sed/sed-accepts-blanks-before-command b/release/src/router/busybox/testsuite/sed/sed-accepts-blanks-before-command
deleted file mode 100755
index 9597c2f8..00000000
--- a/release/src/router/busybox/testsuite/sed/sed-accepts-blanks-before-command
+++ /dev/null
@@ -1 +0,0 @@
-busybox sed -e '1 d' </dev/null
diff --git a/release/src/router/busybox/testsuite/sed/sed-aic-commands b/release/src/router/busybox/testsuite/sed/sed-aic-commands
deleted file mode 100755
index b41c14ab..00000000
--- a/release/src/router/busybox/testsuite/sed/sed-aic-commands
+++ /dev/null
@@ -1,134 +0,0 @@
-cat - >input <<EOF
-2i\\
-before 2
-5c\\
-Change 5
-10a\\
-After 10
-22i\\
-before 22\\
-Continued
-25c\\
-Change 25\\
-Continued
-20a\\
-After 20\\
-Continued
- 32i\\
-before 32\\
-Continued 1\\
-Continued 2\\
-Continued 3
- 35c\\
-Change 35\\
-Continued 1\\
-Continued 2\\
-Continued 3
- 30a\\
-After 30\\
-Continued 1\\
-Continued 2\\
-Continued 3
-EOF
-busybox sed -f input >output <<EOF
- 1 y
- 2 y
- 3 y
- 4 y
- 5 y
- 6 y
- 7 y
- 8 y
- 9 y
- 10 y
- 11 y
- 12 y
- 13 y
- 14 y
- 15 y
- 16 y
- 17 y
- 18 y
- 19 y
- 20 y
- 21 y
- 22 y
- 23 y
- 24 y
- 25 y
- 26 y
- 27 y
- 28 y
- 29 y
- 30 y
- 31 y
- 32 y
- 33 y
- 34 y
- 35 y
- 36 y
- 37 y
- 38 y
- 39 y
- 40 y
-EOF
-cmp -s output - <<EOF
- 1 y
-before 2
- 2 y
- 3 y
- 4 y
-Change 5
- 6 y
- 7 y
- 8 y
- 9 y
- 10 y
-After 10
- 11 y
- 12 y
- 13 y
- 14 y
- 15 y
- 16 y
- 17 y
- 18 y
- 19 y
- 20 y
-After 20
-Continued
- 21 y
-before 22
-Continued
- 22 y
- 23 y
- 24 y
-Change 25
-Continued
- 26 y
- 27 y
- 28 y
- 29 y
- 30 y
-After 30
-Continued 1
-Continued 2
-Continued 3
- 31 y
-before 32
-Continued 1
-Continued 2
-Continued 3
- 32 y
- 33 y
- 34 y
-Change 35
-Continued 1
-Continued 2
-Continued 3
- 36 y
- 37 y
- 38 y
- 39 y
- 40 y
-EOF
diff --git a/release/src/router/busybox/testsuite/sed/sed-chains-substs b/release/src/router/busybox/testsuite/sed/sed-chains-substs
deleted file mode 100755
index 266936ac..00000000
--- a/release/src/router/busybox/testsuite/sed/sed-chains-substs
+++ /dev/null
@@ -1 +0,0 @@
-test "$(echo foo | busybox sed -e s/foo/bar/ -e s/bar/baz/)" = baz
diff --git a/release/src/router/busybox/testsuite/sed/sed-does-not-substitute-in-deleted-line b/release/src/router/busybox/testsuite/sed/sed-does-not-substitute-in-deleted-line
deleted file mode 100755
index 6f106e10..00000000
--- a/release/src/router/busybox/testsuite/sed/sed-does-not-substitute-in-deleted-line
+++ /dev/null
@@ -1,2 +0,0 @@
-echo foo | busybox sed -e /foo/d -e s/foo/bar/ >foo
-cmp foo /dev/null
diff --git a/release/src/router/busybox/testsuite/sed/sed-handles-embedded-slashes b/release/src/router/busybox/testsuite/sed/sed-handles-embedded-slashes
deleted file mode 100755
index cc287613..00000000
--- a/release/src/router/busybox/testsuite/sed/sed-handles-embedded-slashes
+++ /dev/null
@@ -1 +0,0 @@
-test "$(echo fu/bar | busybox sed -e 's/[/]//')" = fubar
diff --git a/release/src/router/busybox/testsuite/sed/sed-handles-empty-lines b/release/src/router/busybox/testsuite/sed/sed-handles-empty-lines
deleted file mode 100755
index 2bb8f045..00000000
--- a/release/src/router/busybox/testsuite/sed/sed-handles-empty-lines
+++ /dev/null
@@ -1 +0,0 @@
-test `echo | busybox sed -e 's/$/@/'` = @
diff --git a/release/src/router/busybox/testsuite/sed/sed-handles-unsatisfied-backrefs b/release/src/router/busybox/testsuite/sed/sed-handles-unsatisfied-backrefs
deleted file mode 100755
index 61bff883..00000000
--- a/release/src/router/busybox/testsuite/sed/sed-handles-unsatisfied-backrefs
+++ /dev/null
@@ -1,6 +0,0 @@
-busybox sed -e 's/.*root=/\1/' >output <<EOF
-BOOT_IMAGE=vmlinuz root=/dev/hda5 initrd=init1
-EOF
-cmp -s output - <<EOF
-/dev/hda5 initrd=init1
-EOF
diff --git a/release/src/router/busybox/testsuite/sed/sed-prints-line-once-for-multiple-substs b/release/src/router/busybox/testsuite/sed/sed-prints-line-once-for-multiple-substs
deleted file mode 100755
index ba8955d6..00000000
--- a/release/src/router/busybox/testsuite/sed/sed-prints-line-once-for-multiple-substs
+++ /dev/null
@@ -1,4 +0,0 @@
-busybox sed -e s/1/2/g -e s/3/4/g >output <<EOF
-1
-EOF
-echo 2 | cmp -s output -
diff --git a/release/src/router/busybox/testsuite/sed/sed-recurses-properly b/release/src/router/busybox/testsuite/sed/sed-recurses-properly
deleted file mode 100755
index bb70f4f9..00000000
--- a/release/src/router/busybox/testsuite/sed/sed-recurses-properly
+++ /dev/null
@@ -1,2 +0,0 @@
-# XFAIL
-test "`echo '12345' | busybox sed -e 's/[[:space:]]*/,/g')` = ',1,2,3,4,5,'"
diff --git a/release/src/router/busybox/testsuite/sed/sed-requires-newline-after-edit-command b/release/src/router/busybox/testsuite/sed/sed-requires-newline-after-edit-command
deleted file mode 100755
index 37ebc660..00000000
--- a/release/src/router/busybox/testsuite/sed/sed-requires-newline-after-edit-command
+++ /dev/null
@@ -1 +0,0 @@
-! busybox sed -e 'i\foo' </dev/null
diff --git a/release/src/router/busybox/testsuite/sed/sed-splits-edit-commands-on-command-line b/release/src/router/busybox/testsuite/sed/sed-splits-edit-commands-on-command-line
deleted file mode 100755
index 6421fa55..00000000
--- a/release/src/router/busybox/testsuite/sed/sed-splits-edit-commands-on-command-line
+++ /dev/null
@@ -1,9 +0,0 @@
-echo 2 | busybox sed -e 'i\
-1
-a\
-3' > output
-cmp output - <<EOF
-1
-2
-3
-EOF
diff --git a/release/src/router/busybox/testsuite/seq.tests b/release/src/router/busybox/testsuite/seq.tests
new file mode 100755
index 00000000..cea4eefb
--- /dev/null
+++ b/release/src/router/busybox/testsuite/seq.tests
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# SUSv3 compliant seq tests.
+# Copyright 2006 by Rob Landley <rob@landley.net>
+# Licensed under GPL v2, see file LICENSE for details.
+
+# AUDIT: Full SUSv3 coverage (except internationalization).
+
+. testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+# file input will be file called "input"
+# test can create a file "actual" instead of writing to stdout
+
+# Test exit status
+
+testing "seq (exit with error)" "seq 2> /dev/null || echo yes" "yes\n" "" ""
+testing "seq (exit with error)" "seq 1 2 3 4 2> /dev/null || echo yes" \
+ "yes\n" "" ""
+testing "seq one argument" "seq 3" "1\n2\n3\n" "" ""
+testing "seq two arguments" "seq 5 7" "5\n6\n7\n" "" ""
+testing "seq two arguments reversed" "seq 7 5" "" "" ""
+testing "seq two arguments equal" "seq 3 3" "3\n" "" ""
+testing "seq two arguments equal, arbitrary negative step" "seq 1 -15 1" \
+ "1\n" "" ""
+testing "seq two arguments equal, arbitrary positive step" "seq 1 +15 1" \
+ "1\n" "" ""
+testing "seq count up by 2" "seq 4 2 8" "4\n6\n8\n" "" ""
+testing "seq count down by 2" "seq 8 -2 4" "8\n6\n4\n" "" ""
+testing "seq count wrong way #1" "seq 4 -2 8" "" "" ""
+testing "seq count wrong way #2" "seq 8 2 4" "" "" ""
+testing "seq count by .3" "seq 3 .3 4" "3.0\n3.3\n3.6\n3.9\n" "" ""
+testing "seq count by -.9" "seq .7 -.9 -2.2" "0.7\n-0.2\n-1.1\n-2\n" "" ""
+testing "seq count by zero" "seq 4 0 8 | head -n 10" "" "" ""
+
+testing "seq one argument with padding" "seq -w 003" "001\n002\n003\n" "" ""
+testing "seq two arguments with padding" "seq -w 005 7" "005\n006\n007\n" "" ""
+testing "seq count down by 3 with padding" "seq -w 8 -3 04" "08\n05\n" "" ""
+testing "seq count by .3 with padding" "seq -w 03 .3 0004" "003.0\n003.3\n003.6\n003.9\n" "" ""
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/sort.tests b/release/src/router/busybox/testsuite/sort.tests
new file mode 100755
index 00000000..f700dc0c
--- /dev/null
+++ b/release/src/router/busybox/testsuite/sort.tests
@@ -0,0 +1,119 @@
+#!/bin/bash
+
+# SUSv3 compliant sort tests.
+# Copyright 2005 by Rob Landley <rob@landley.net>
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# The basic tests. These should work even with the small busybox.
+
+testing "sort" "sort input" "a\nb\nc\n" "c\na\nb\n" ""
+testing "sort #2" "sort input" "010\n1\n3\n" "3\n1\n010\n" ""
+testing "sort stdin" "sort" "a\nb\nc\n" "" "b\na\nc\n"
+testing "sort numeric" "sort -n input" "1\n3\n010\n" "3\n1\n010\n" ""
+testing "sort reverse" "sort -r input" "wook\nwalrus\npoint\npabst\naargh\n" \
+ "point\nwook\npabst\naargh\nwalrus\n" ""
+
+# These tests require the full option set.
+
+optional FEATURE_SORT_BIG
+# Longish chunk of data re-used by the next few tests
+
+data="42 1 3 woot
+42 1 010 zoology
+egg 1 2 papyrus
+7 3 42 soup
+999 3 0 algebra
+"
+
+# Sorting with keys
+
+testing "sort one key" "sort -k4,4 input" \
+"999 3 0 algebra
+egg 1 2 papyrus
+7 3 42 soup
+42 1 3 woot
+42 1 010 zoology
+" "$data" ""
+
+testing "sort key range with numeric option" "sort -k2,3n input" \
+"42 1 010 zoology
+42 1 3 woot
+egg 1 2 papyrus
+7 3 42 soup
+999 3 0 algebra
+" "$data" ""
+
+# Busybox is definitely doing this one wrong just now. FIXME
+
+testing "sort key range with numeric option and global reverse" \
+"sort -k2,3n -r input" \
+"egg 1 2 papyrus
+42 1 3 woot
+42 1 010 zoology
+999 3 0 algebra
+7 3 42 soup
+" "$data" ""
+
+#
+
+testing "sort key range with multiple options" "sort -k2,3rn input" \
+"7 3 42 soup
+999 3 0 algebra
+42 1 010 zoology
+42 1 3 woot
+egg 1 2 papyrus
+" "$data" ""
+
+testing "sort key range with two -k options" "sort -k 2,2n -k 1,1r input" "\
+d 2
+b 2
+c 3
+" "\
+c 3
+b 2
+d 2
+" ""
+
+testing "sort with non-default leading delim 1" "sort -n -k2 -t/ input" "\
+/a/2
+/b/1
+" "\
+/a/2
+/b/1
+" ""
+
+testing "sort with non-default leading delim 2" "sort -n -k3 -t/ input" "\
+/b/1
+/a/2
+" "\
+/b/1
+/a/2
+" ""
+
+testing "sort with non-default leading delim 3" "sort -n -k3 -t/ input" "\
+//a/2
+//b/1
+" "\
+//a/2
+//b/1
+" ""
+
+testing "sort -u should consider field only when discarding" "sort -u -k2 input" "\
+a c
+" "\
+a c
+b c
+" ""
+
+testing "sort -z outputs NUL terminated lines" "sort -z input" "\
+one\0three\0two\0\
+" "\
+one\0two\0three\0\
+" ""
+
+testing "sort key doesn't strip leading blanks, disables fallback global sort" \
+"sort -n -k2 -t ' '" " a \n 1 \n 2 \n" "" " 2 \n 1 \n a \n"
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/start-stop-daemon.tests b/release/src/router/busybox/testsuite/start-stop-daemon.tests
new file mode 100755
index 00000000..ba77cde6
--- /dev/null
+++ b/release/src/router/busybox/testsuite/start-stop-daemon.tests
@@ -0,0 +1,19 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# testing "test name" "cmd" "expected result" "file input" "stdin"
+
+testing "start-stop-daemon -x without -a" \
+ 'start-stop-daemon -S -x true 2>&1; echo $?' \
+ "0\n" \
+ "" ""
+
+testing "start-stop-daemon -a without -x" \
+ 'start-stop-daemon -S -a false 2>&1; echo $?' \
+ "1\n" \
+ "" ""
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/strings/strings-works-like-GNU b/release/src/router/busybox/testsuite/strings/strings-works-like-GNU
index 02e42313..2d647103 100755..100644
--- a/release/src/router/busybox/testsuite/strings/strings-works-like-GNU
+++ b/release/src/router/busybox/testsuite/strings/strings-works-like-GNU
@@ -1,8 +1,9 @@
rm -f foo bar
strings -af ../../busybox > foo
busybox strings -af ../../busybox > bar
+set +e
test ! -f foo -a -f bar
if [ $? = 0 ] ; then
- diff -q foo bar
-fi;
-
+ set -e
+ diff -q foo bar
+fi
diff --git a/release/src/router/busybox/testsuite/sum.tests b/release/src/router/busybox/testsuite/sum.tests
new file mode 100755
index 00000000..e537cf60
--- /dev/null
+++ b/release/src/router/busybox/testsuite/sum.tests
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# unit test for sum.
+# Copyright 2007 by Bernhard Reutner-Fischer
+# Licensed under GPL v2 or later, see file LICENSE for details.
+
+# AUDIT: Unit tests for sum
+
+. testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+# file input will be file called "input"
+# test can create a file "actual" instead of writing to stdout
+
+testing "sum -r file doesn't print file's name" \
+ "sum -r $0 | grep -c $0 && echo wrongly_printed_filename || echo yes" \
+ "0\nyes\n" "" ""
+testing "sum -r file file does print both names" \
+ "sum -r $0 $0 | grep -c $0 && echo yes || echo wrongly_omitted_filename" \
+ "2\nyes\n" "" ""
+testing "sum -s file does print file's name" \
+ "sum -s $0 | grep -c $0 && echo yes || echo wrongly_omitted_filename" \
+ "1\nyes\n" "" ""
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/tail/tail-n-works b/release/src/router/busybox/testsuite/tail/tail-n-works
new file mode 100644
index 00000000..0e1319fa
--- /dev/null
+++ b/release/src/router/busybox/testsuite/tail/tail-n-works
@@ -0,0 +1,4 @@
+$ECHO -ne "abc\ndef\n123\n" >input
+$ECHO -ne "def\n123\n" >logfile.ok
+busybox tail -n 2 input > logfile.bb
+cmp logfile.ok logfile.bb
diff --git a/release/src/router/busybox/testsuite/tail/tail-works b/release/src/router/busybox/testsuite/tail/tail-works
new file mode 100644
index 00000000..f3434d1a
--- /dev/null
+++ b/release/src/router/busybox/testsuite/tail/tail-works
@@ -0,0 +1,4 @@
+$ECHO -ne "abc\ndef\n123\n" >input
+$ECHO -ne "def\n123\n" >logfile.ok
+busybox tail -2 input > logfile.bb
+cmp logfile.ok logfile.bb
diff --git a/release/src/router/busybox/testsuite/tar/tar-archives-multiple-files b/release/src/router/busybox/testsuite/tar/tar-archives-multiple-files
index 245d9e98..245d9e98 100755..100644
--- a/release/src/router/busybox/testsuite/tar/tar-archives-multiple-files
+++ b/release/src/router/busybox/testsuite/tar/tar-archives-multiple-files
diff --git a/release/src/router/busybox/testsuite/tar/tar-complains-about-missing-file b/release/src/router/busybox/testsuite/tar/tar-complains-about-missing-file
index dd1f2fa8..26e8cbb3 100755..100644
--- a/release/src/router/busybox/testsuite/tar/tar-complains-about-missing-file
+++ b/release/src/router/busybox/testsuite/tar/tar-complains-about-missing-file
@@ -1,4 +1,3 @@
-# XFAIL
touch foo
tar cf foo.tar foo
! busybox tar xf foo.tar bar
diff --git a/release/src/router/busybox/testsuite/tar/tar-demands-at-least-one-ctx b/release/src/router/busybox/testsuite/tar/tar-demands-at-least-one-ctx
index 85e7f605..85e7f605 100755..100644
--- a/release/src/router/busybox/testsuite/tar/tar-demands-at-least-one-ctx
+++ b/release/src/router/busybox/testsuite/tar/tar-demands-at-least-one-ctx
diff --git a/release/src/router/busybox/testsuite/tar/tar-demands-at-most-one-ctx b/release/src/router/busybox/testsuite/tar/tar-demands-at-most-one-ctx
index 130d0e7f..130d0e7f 100755..100644
--- a/release/src/router/busybox/testsuite/tar/tar-demands-at-most-one-ctx
+++ b/release/src/router/busybox/testsuite/tar/tar-demands-at-most-one-ctx
diff --git a/release/src/router/busybox/testsuite/tar/tar-extracts-all-subdirs b/release/src/router/busybox/testsuite/tar/tar-extracts-all-subdirs
new file mode 100644
index 00000000..886c37ce
--- /dev/null
+++ b/release/src/router/busybox/testsuite/tar/tar-extracts-all-subdirs
@@ -0,0 +1,12 @@
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
+mkdir -p foo/{1,2,3}
+mkdir -p foo/1/{10,11}
+mkdir -p foo/1/10/{100,101,102}
+tar cf foo.tar -C foo .
+rm -rf foo/*
+busybox tar xf foo.tar -C foo ./1/10
+find foo | sort >logfile.bb
+rm -rf foo/*
+tar xf foo.tar -C foo ./1/10
+find foo | sort >logfile.gnu
+cmp logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/tar/tar-extracts-file b/release/src/router/busybox/testsuite/tar/tar-extracts-file
index ca72f248..ca72f248 100755..100644
--- a/release/src/router/busybox/testsuite/tar/tar-extracts-file
+++ b/release/src/router/busybox/testsuite/tar/tar-extracts-file
diff --git a/release/src/router/busybox/testsuite/tar/tar-extracts-from-standard-input b/release/src/router/busybox/testsuite/tar/tar-extracts-from-standard-input
index a30e9f0b..a30e9f0b 100755..100644
--- a/release/src/router/busybox/testsuite/tar/tar-extracts-from-standard-input
+++ b/release/src/router/busybox/testsuite/tar/tar-extracts-from-standard-input
diff --git a/release/src/router/busybox/testsuite/tar/tar-extracts-multiple-files b/release/src/router/busybox/testsuite/tar/tar-extracts-multiple-files
index e26901e8..7897d81d 100755..100644
--- a/release/src/router/busybox/testsuite/tar/tar-extracts-multiple-files
+++ b/release/src/router/busybox/testsuite/tar/tar-extracts-multiple-files
@@ -1,5 +1,6 @@
touch foo bar
tar cf foo.tar foo bar
rm foo bar
-busybox tar xf foo.tar
-test -f foo -a -f bar
+busybox tar -xf foo.tar
+test -f foo
+test -f bar
diff --git a/release/src/router/busybox/testsuite/tar/tar-extracts-to-standard-output b/release/src/router/busybox/testsuite/tar/tar-extracts-to-standard-output
index ca48e364..ca48e364 100755..100644
--- a/release/src/router/busybox/testsuite/tar/tar-extracts-to-standard-output
+++ b/release/src/router/busybox/testsuite/tar/tar-extracts-to-standard-output
diff --git a/release/src/router/busybox/testsuite/tar/tar-handles-cz-options b/release/src/router/busybox/testsuite/tar/tar-handles-cz-options
index b2806bbe..5b55e46d 100755..100644
--- a/release/src/router/busybox/testsuite/tar/tar-handles-cz-options
+++ b/release/src/router/busybox/testsuite/tar/tar-handles-cz-options
@@ -1,4 +1,5 @@
-# XFAIL
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
+# FEATURE: CONFIG_FEATURE_TAR_GZIP
touch foo
busybox tar czf foo.tar.gz foo
gzip -d foo.tar.gz
diff --git a/release/src/router/busybox/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list b/release/src/router/busybox/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list
index b76f0230..50336423 100755..100644
--- a/release/src/router/busybox/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list
+++ b/release/src/router/busybox/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list
@@ -1,4 +1,5 @@
-# FEATURE: CONFIG_FEATURE_TAR_EXCLUDE
+# FEATURE: CONFIG_FEATURE_TAR_FROM
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
touch foo
tar cf foo.tar foo
echo foo >foo.exclude
diff --git a/release/src/router/busybox/testsuite/tar/tar-handles-exclude-and-extract-lists b/release/src/router/busybox/testsuite/tar/tar-handles-exclude-and-extract-lists
index e715a477..2de0f0e9 100755..100644
--- a/release/src/router/busybox/testsuite/tar/tar-handles-exclude-and-extract-lists
+++ b/release/src/router/busybox/testsuite/tar/tar-handles-exclude-and-extract-lists
@@ -1,4 +1,5 @@
-# FEATURE: CONFIG_FEATURE_TAR_EXCLUDE
+# FEATURE: CONFIG_FEATURE_TAR_FROM
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
touch foo bar baz
tar cf foo.tar foo bar baz
echo foo >foo.exclude
diff --git a/release/src/router/busybox/testsuite/tar/tar-handles-multiple-X-options b/release/src/router/busybox/testsuite/tar/tar-handles-multiple-X-options
index 8321af85..155b27e6 100755..100644
--- a/release/src/router/busybox/testsuite/tar/tar-handles-multiple-X-options
+++ b/release/src/router/busybox/testsuite/tar/tar-handles-multiple-X-options
@@ -1,3 +1,5 @@
+# FEATURE: CONFIG_FEATURE_TAR_FROM
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
touch foo
touch bar
tar cf foo.tar foo bar
diff --git a/release/src/router/busybox/testsuite/tar/tar-handles-nested-exclude b/release/src/router/busybox/testsuite/tar/tar-handles-nested-exclude
index ad39506c..39013a10 100755..100644
--- a/release/src/router/busybox/testsuite/tar/tar-handles-nested-exclude
+++ b/release/src/router/busybox/testsuite/tar/tar-handles-nested-exclude
@@ -1,4 +1,5 @@
-# FEATURE: CONFIG_FEATURE_TAR_EXCLUDE
+# FEATURE: CONFIG_FEATURE_TAR_FROM
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
mkdir foo
touch foo/bar
tar cf foo.tar foo
diff --git a/release/src/router/busybox/testsuite/tar/tar_with_link_with_size b/release/src/router/busybox/testsuite/tar/tar_with_link_with_size
new file mode 100644
index 00000000..5b61cc70
--- /dev/null
+++ b/release/src/router/busybox/testsuite/tar/tar_with_link_with_size
@@ -0,0 +1,29 @@
+# This tarball contains a softlink with size field != 0.
+# If not ignored, it makes hext header to be skipped
+# and data to be read as a header.
+# GNU tar 1.15.1 has a bug here: tf won't work, but xf will.
+tar1_bz2()
+{
+ $ECHO -ne "\x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\x14\x44\xe3\xdd\x00\x00"
+ $ECHO -ne "\x9a\xfb\x90\xca\x18\x00\xc0\x40\x03\xff\x80\x08\x00\x7b\xe3\xff"
+ $ECHO -ne "\x80\x04\x00\x00\x08\x30\x00\xd6\xb3\x09\x45\x19\x0d\x0d\x41\x84"
+ $ECHO -ne "\x1a\x68\xd0\x7a\x99\x90\x4a\x0a\x6d\x4c\xa3\x20\x7a\x41\xa0\x00"
+ $ECHO -ne "\x00\x55\x25\x34\x1a\x34\xd0\x00\x64\x64\x1a\x32\x3f\x76\x3c\x1c"
+ $ECHO -ne "\xd3\x3c\xa0\x84\x9b\x88\x05\x70\x90\xbb\x18\x28\x39\x29\xb3\x30"
+ $ECHO -ne "\xa8\x0a\x21\x70\x0c\x01\x32\x3b\xbe\xde\xd7\x13\x2e\xbd\x2a\x9c"
+ $ECHO -ne "\xa8\x42\x2a\x91\x15\xe2\xa1\xcd\x24\x37\x9c\x91\xaa\xc7\x14\xdb"
+ $ECHO -ne "\x4c\x08\xaa\xaf\x12\xeb\x6c\x37\x96\xb0\xa4\x25\x0c\xb4\x4b\xc5"
+ $ECHO -ne "\x52\x70\x3b\x25\x4c\x0e\x46\x67\x51\x54\x89\x13\x13\xf0\xa8\xe9"
+ $ECHO -ne "\x68\x4e\x8c\x81\xfc\x79\xe0\xb0\xd8\x79\x34\x94\x71\xa2\x0c\xbe"
+ $ECHO -ne "\x93\x61\x82\x95\x10\x88\xd1\xa6\x69\xaa\x38\x9c\xb6\xc2\xb2\x94"
+ $ECHO -ne "\x90\xc3\x82\x29\xe8\x8c\xb8\x95\x83\x32\x40\x61\x11\x11\xd3\xaa"
+ $ECHO -ne "\x3f\x8b\xb9\x22\x9c\x28\x48\x0a\x22\x71\xee\x80"
+}
+res1="\
+lrwxrwxrwx user/group 0 2008-07-19 15:02:37 firmware-372/sources/native/bin/chroot-setup.sh -> qemu-setup.sh
+-rwxr-xr-x user/group 512 2008-07-19 15:02:37 firmware-372/sources/native/bin/qemu-setup.sh"
+
+export TZ=UTC-2
+
+t=`tar1_bz2 | bunzip2 | busybox tar tvf -`
+test x"$res1" = x"$t"
diff --git a/release/src/router/busybox/testsuite/tar/tar_with_prefix_fields b/release/src/router/busybox/testsuite/tar/tar_with_prefix_fields
new file mode 100644
index 00000000..1c7124d5
--- /dev/null
+++ b/release/src/router/busybox/testsuite/tar/tar_with_prefix_fields
@@ -0,0 +1,261 @@
+tar1_bz2()
+{
+ $ECHO -ne "\x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\x12\xd1\x86\x30\x00\x0c"
+ $ECHO -ne "\xb8\x7f\x80\xff\x50\x08\xa0\x5e\xff\xff\xfd\x7f\xff\xff\xee\xff"
+ $ECHO -ne "\xff\xff\xfa\x00\x08\x60\x0f\xc5\x3e\xf4\xdc\x00\x00\x59\x25\xbd"
+ $ECHO -ne "\xb8\x7a\x02\xb5\x82\x78\x25\xb0\x89\x54\x10\x11\x44\x8b\x36\x36"
+ $ECHO -ne "\xc8\x97\x0d\x34\x9a\x21\xa9\x36\xa9\xed\x32\x02\x8d\xa6\x81\x8a"
+ $ECHO -ne "\x79\x13\x4d\x1a\x03\x10\x69\xa0\xd3\x40\x64\x0f\x44\x68\x3d\x41"
+ $ECHO -ne "\x2a\x7a\x20\x09\xa1\x34\x9a\x09\xa4\xc8\xf5\x4f\x46\xa6\x86\x32"
+ $ECHO -ne "\x4c\x08\x00\x00\xd0\x06\x9a\x00\xd3\xd4\x11\x49\xa7\xb5\x20\x1a"
+ $ECHO -ne "\x7a\x80\x00\x00\x00\x00\xd0\x68\x00\x00\x00\x00\x00\x49\xa8\x89"
+ $ECHO -ne "\xa9\x31\x4f\x22\xa7\xea\x9b\x61\x53\xf4\x93\xf2\xa3\x47\xa4\xd3"
+ $ECHO -ne "\x41\xea\x06\x41\xa0\x0d\x00\x00\x00\x1e\xa0\x70\x34\xd3\x4d\x06"
+ $ECHO -ne "\x86\x86\x86\x46\x80\x64\x01\xa1\xa0\x34\xd1\x90\x00\x03\x09\x88"
+ $ECHO -ne "\x0d\x04\x89\x08\x00\x82\x7a\x4c\x42\x64\xc9\x3d\x1a\x29\xe9\xa2"
+ $ECHO -ne "\x3d\x46\x9e\x46\x9a\x13\x26\x9e\x53\x10\x01\x91\xea\x68\x19\xf0"
+ $ECHO -ne "\x73\xf2\xe0\xd1\x3c\x80\x01\xb1\x48\x44\x08\x9a\xba\xf3\x9e\x87"
+ $ECHO -ne "\xec\xc4\x4b\x02\x92\x80\x75\x00\x56\x42\x88\x10\x68\xcc\x06\x22"
+ $ECHO -ne "\x7c\x2b\xa7\xc8\x21\x91\x13\xe5\x72\xc0\xe6\x0c\x03\x10\xf2\x89"
+ $ECHO -ne "\x9c\x67\x6b\xc3\xe6\xae\x98\x85\x0a\x7f\x25\x2e\x3d\x84\x5b\xeb"
+ $ECHO -ne "\xf3\xff\xb3\x52\xf7\x6e\xf6\x92\xd6\x33\x5f\x4f\xd1\x3d\xb7\xc4"
+ $ECHO -ne "\x0d\x50\x02\x49\x01\xaf\xd0\x69\xbb\xd3\xe9\x63\x0a\x68\x36\x92"
+ $ECHO -ne "\xf2\x03\x1d\xf2\xe2\x35\xbc\x73\xd4\x44\xf6\xa0\xe0\x31\xd7\x7d"
+ $ECHO -ne "\x56\x96\xcb\x52\xfc\x79\xe0\xeb\xf7\x34\xd8\xda\x18\x72\x30\x94"
+ $ECHO -ne "\x53\x45\xf5\x54\x56\x6c\x0b\x50\xa0\xbc\xbd\xcc\xd8\x21\xab\x7b"
+ $ECHO -ne "\xa8\xa4\xe4\x78\x25\x73\xbf\x4b\x30\x38\x71\xe9\x3c\x14\x5d\xa3"
+ $ECHO -ne "\x12\x04\x6b\x37\x9d\xe5\xce\xa5\xd9\xd1\xa5\x69\x09\x08\xc4\x48"
+ $ECHO -ne "\x4b\x34\x58\x81\x15\x18\x88\xac\x11\x51\x88\x35\x0d\xd3\x13\x18"
+ $ECHO -ne "\x67\x73\x20\x5c\x28\x03\x26\xcd\x6d\x20\x90\xba\xa4\x12\xb3\x08"
+ $ECHO -ne "\x27\x74\x6a\x99\xdf\xb1\x20\x3d\x85\xe7\x5f\xab\x0e\x2e\xdc\x23"
+ $ECHO -ne "\x99\xe1\xef\x34\x68\xcd\xa9\xb0\xbf\xda\xec\x81\xdd\x66\xca\x21"
+ $ECHO -ne "\x13\x47\xd7\xca\x48\xcf\xeb\x25\xbb\x79\x6d\x40\xd0\xe4\x69\x3c"
+ $ECHO -ne "\x8f\x09\x1e\x7b\xaa\x4b\x91\x39\xac\xd6\xd2\x0c\x85\x1d\xf7\x70"
+ $ECHO -ne "\x1f\x1e\x58\xbb\x22\x11\x29\x39\x14\x4d\x58\x81\x9f\xd7\x1e\x22"
+ $ECHO -ne "\x21\x91\x0a\x40\xd1\x87\x29\x99\x93\xf4\xf3\x25\x48\xbb\xb4\x24"
+ $ECHO -ne "\x2a\x1c\xa7\x28\xc1\x68\x08\x25\x00\xaa\x3d\xee\xae\xc1\xe1\x4f"
+ $ECHO -ne "\xe6\x9a\x26\x6b\xcf\xb1\x3e\xb9\x85\x04\xf4\xef\xff\x7a\x2f\x2a"
+ $ECHO -ne "\x04\x08\xe0\x4c\xb8\xbd\x8b\x81\xbf\xa2\xbe\x82\x52\x9b\x40\x63"
+ $ECHO -ne "\xe6\xf3\xb3\xe4\xe6\xe5\x94\x4a\xdd\xc3\x1b\xaf\x61\xf3\xbf\x5b"
+ $ECHO -ne "\x6d\xaa\xaa\x27\xe8\x50\x8d\x23\x97\xa4\xbd\xc3\xd2\xe6\xb5\x66"
+ $ECHO -ne "\x9a\x1a\x8e\x45\x2a\xed\x0b\x79\xb8\x89\x38\x4a\x04\x85\x0d\x1e"
+ $ECHO -ne "\x2b\x77\x51\x91\x5f\x9f\xe0\x2a\x49\x56\xd3\xa1\xde\xf6\xd7\x88"
+ $ECHO -ne "\x5a\x61\xe5\x04\x54\xdf\xa3\x92\xeb\xbf\x75\x39\xce\xfa\xf5\xde"
+ $ECHO -ne "\x30\xd7\x56\xd1\x7d\x2c\xdf\xda\x3e\x1c\xc8\xc2\x93\x61\x21\x20"
+ $ECHO -ne "\xb2\x22\x6d\xbe\x39\x52\x64\xf6\xb3\x91\x21\x86\xdb\x67\x72\x8f"
+ $ECHO -ne "\x49\xad\xe4\x93\x39\x5c\x34\x8f\x58\xdb\x58\xd3\x3c\x1e\x4c\x6c"
+ $ECHO -ne "\xbb\x70\x6f\x42\xcf\x9e\xbf\xb1\xcb\xa9\x8d\x05\xe7\xea\xea\xd7"
+ $ECHO -ne "\x3c\x67\x31\x69\x44\x33\xa4\x92\x9c\x65\xa4\x89\x5a\xae\xcf\xc9"
+ $ECHO -ne "\x55\x43\x62\x6d\xbf\x05\x3c\xd1\x0f\x01\x4a\xb5\x1d\xbb\x2c\xfb"
+ $ECHO -ne "\xa6\xb7\xb3\xb1\x1d\x66\xd3\xeb\x22\xd0\xb5\x5a\x4b\xc4\x47\x47"
+ $ECHO -ne "\x5a\x49\x85\x18\xbc\x15\x39\x3b\x92\xee\x51\x98\x33\x34\x5d\xb5"
+ $ECHO -ne "\xbb\x8b\x94\x8c\xde\x8e\x3f\x3d\x09\x4f\xba\xd3\xf6\x79\x74\x8e"
+ $ECHO -ne "\x82\x0d\x56\x85\xa2\xc7\xc6\xa6\x89\x29\x26\xa3\x53\x5e\x52\xf5"
+ $ECHO -ne "\x56\x74\x8b\x17\x82\xed\x7a\x8b\x68\x61\xa5\xc9\x7c\xde\x9f\x68"
+ $ECHO -ne "\x27\x4d\xea\x65\x68\x6f\x7d\x5e\x88\x73\x87\x6c\x92\xf2\xa9\x15"
+ $ECHO -ne "\x4e\xee\x4d\x41\xbb\x98\x5d\x8a\xaf\xcb\x11\x7b\x2a\xce\xf4\x1e"
+ $ECHO -ne "\x3a\x28\x48\x14\xfe\x7f\x09\x45\x48\xf1\x5b\xc1\xcb\xcd\x91\xba"
+ $ECHO -ne "\x3b\xe2\x7d\x57\x85\x66\x68\xec\x51\x82\x97\x88\xeb\x94\x3b\x78"
+ $ECHO -ne "\x6c\xf4\xf1\x3e\x38\x8d\x22\x16\xab\x3b\x13\xb3\x1b\x39\x94\x0e"
+ $ECHO -ne "\xa8\x26\xb7\x8d\xe9\x7d\x66\x23\x4b\x65\x07\xb7\x2b\xc9\x96\xb6"
+ $ECHO -ne "\x99\x12\x22\xbc\x90\xda\x51\xbc\xfd\x97\xa5\x7d\xbc\x12\xa6\x72"
+ $ECHO -ne "\xd3\xe3\x8c\xc7\x58\xe1\xf8\x28\xf4\x46\x49\x14\xd0\x9d\xb6\xed"
+ $ECHO -ne "\xce\x99\xc6\xbc\xed\xa3\xab\xa0\x8c\x9d\xce\x1a\x1a\xc2\xe6\x77"
+ $ECHO -ne "\xba\xae\xba\xd6\xc9\xb2\xd1\x65\x24\x7b\x0d\xd4\xf2\xac\x28\xc3"
+ $ECHO -ne "\x1c\xbe\x4a\x54\xe3\x0f\x8d\xad\xb2\x37\x9e\x1f\x81\x72\x2d\xab"
+ $ECHO -ne "\x8f\xb1\xcd\xf7\xb4\x51\x2f\x1d\xf8\xad\x77\x14\x37\xd2\x1a\x9a"
+ $ECHO -ne "\xc0\xf2\x48\xc6\x4c\x8d\xd3\x8d\xf1\xd9\x2e\x2c\xdd\x7a\x98\x3c"
+ $ECHO -ne "\x24\x76\xb9\x9d\x27\xcd\x71\x7d\x6c\xc7\x1f\x0a\x74\x8a\x6e\x54"
+ $ECHO -ne "\xec\x5a\xa1\x77\x60\x80\xef\x00\xa4\x5f\x9e\x8b\x2f\x02\x72\x9c"
+ $ECHO -ne "\x46\xd8\x79\x92\x4c\x8f\x4e\x37\xed\x0c\x58\xab\x44\xee\x1d\xd1"
+ $ECHO -ne "\xa1\xb0\xa5\x1f\xaf\xb0\x39\x01\x26\xb2\x4a\x20\x68\x4a\x18\x23"
+ $ECHO -ne "\xc3\x03\x84\x22\x18\xdb\x6d\x83\x60\xc1\x12\x09\x21\x84\x22\x48"
+ $ECHO -ne "\x7f\x1e\x17\xf5\xbe\xce\x4c\x4f\x9f\x9f\xee\xf4\xfe\xef\x9a\x34"
+ $ECHO -ne "\x91\x8f\x36\x1d\xbc\x73\xd7\xeb\xc8\x2e\x81\x25\xfa\x18\x76\x35"
+ $ECHO -ne "\x1f\x16\xdb\x20\x4b\x74\x6d\x94\x4e\xe5\x36\xed\xf5\x5d\x59\xaf"
+ $ECHO -ne "\x46\x70\xea\x03\xac\x50\xbb\x26\xab\x39\x9a\x4b\x6b\x09\x8c\x6d"
+ $ECHO -ne "\x34\xcf\xed\xaa\xf7\x56\x40\xf2\xab\x07\xca\x22\x71\x97\xc7\x35"
+ $ECHO -ne "\xe8\x06\x90\x7b\xec\xc3\x9f\xa4\xde\xd9\xdb\x43\xf1\xd5\x06\x58"
+ $ECHO -ne "\x72\x9e\x1f\x08\xb6\xc2\x05\x0d\x25\xfe\x7a\x85\xe5\x10\x12\x68"
+ $ECHO -ne "\x18\x7e\x8c\xa0\xfa\xb4\xc4\xc7\x4e\xa9\xf2\x13\xd7\xc2\x52\xb5"
+ $ECHO -ne "\xe3\x72\x37\x31\x1e\x4f\x99\xfd\xac\x97\x08\x88\x71\x88\xeb\x1a"
+ $ECHO -ne "\xf9\xa1\x10\x9c\x44\x08\x56\x4a\x77\xaa\x0f\x19\x5f\x5f\xb3\x95"
+ $ECHO -ne "\xee\x9b\x9f\x5b\xb5\xc9\x0a\xf4\x28\x16\x25\x34\x6c\x72\xda\x92"
+ $ECHO -ne "\xb4\x2c\xbd\x5e\xb1\xe8\xe5\x0f\x68\xf3\x44\x8a\xd5\xfa\x73\x5c"
+ $ECHO -ne "\x89\x2e\x99\x7d\xed\xe3\x5b\x3f\x48\x97\xeb\xb6\x76\x5c\xa5\x9d"
+ $ECHO -ne "\xef\x12\x1e\x42\x89\x52\xad\x28\x90\xe5\x2b\x88\xa0\x4f\x11\x92"
+ $ECHO -ne "\xcd\xcc\x63\x40\x1a\xc7\x10\x0c\x2f\xcd\x01\xf2\x07\x38\xac\x14"
+ $ECHO -ne "\xe5\x90\xc0\x30\x21\xe2\xe3\x72\x0e\x3e\x04\xc8\x9e\xa7\x00\xdb"
+ $ECHO -ne "\x91\xdd\x9d\x80\xa4\x69\x2a\x48\x37\x97\xa4\x26\x5d\xae\x84\x1e"
+ $ECHO -ne "\x88\xf4\x83\x04\x24\xc9\x1f\x94\x61\x25\xf9\x82\xdd\xed\x2d\x96"
+ $ECHO -ne "\xad\x06\x45\xdd\x88\xd7\x50\x40\x14\xdc\x7c\xdb\x0f\x53\x96\x27"
+ $ECHO -ne "\xcb\x67\xac\xa6\xc1\x15\x2f\xc3\xdb\x2c\xca\x94\xb3\xf3\xd1\x6a"
+ $ECHO -ne "\xba\x34\x83\xd1\xcc\x40\x3e\x76\xa1\x69\x7f\x49\x33\xdc\xa7\x3c"
+ $ECHO -ne "\x6a\x67\x15\xab\xdb\x52\xa0\xb8\xa6\x1e\xce\xe3\xaf\xf4\xa2\x62"
+ $ECHO -ne "\x35\x0f\x03\x40\x8e\x20\x12\x9c\xb6\x34\x71\x3a\x15\x5d\xe5\x34"
+ $ECHO -ne "\xa8\xd4\x05\x99\x6b\x9a\xb6\x41\x0b\x78\xc4\xd8\xd9\x7a\x65\xdc"
+ $ECHO -ne "\xdb\xe3\x42\xd5\x66\xf9\xb4\x83\x7e\xc0\xf4\x01\xc4\xcc\x3b\x0e"
+ $ECHO -ne "\x15\xdc\x15\xc2\x3e\x04\x2f\xfc\x6b\x72\xeb\xf6\xaa\x16\x20\xde"
+ $ECHO -ne "\xd3\x3a\xb1\x10\xc6\x3c\xe8\x2b\xb8\xea\xda\x19\x6e\x36\xaa\xa4"
+ $ECHO -ne "\x23\x6d\xa0\x40\xd1\x5a\x0b\x7e\xa4\xd5\x2d\xcb\xa9\x15\x35\xba"
+ $ECHO -ne "\x93\x92\x45\x41\xb0\x1a\xd1\x13\x31\xb6\x44\x98\x78\x28\x15\xe4"
+ $ECHO -ne "\xae\xba\x58\xd1\x75\x36\x34\x1a\xd8\x28\xf1\x4a\x4c\xbc\x1b\xa8"
+ $ECHO -ne "\xf7\x57\x92\xbc\xe2\xb5\xda\xb6\xa6\x1d\x83\x37\x96\x43\x20\x84"
+ $ECHO -ne "\xcb\xb6\xd9\x3f\xeb\xfa\xa0\xfe\x9a\x7d\xee\x47\x98\xc4\xe7\xc4"
+ $ECHO -ne "\xbd\xc6\xf0\x6d\xb2\x26\x10\x1e\x78\xef\xf3\x28\x3e\x35\xe6\xe4"
+ $ECHO -ne "\xe6\xf3\x0f\x26\x34\x13\x85\xd0\xcf\x55\x0f\x8b\xd7\xe9\xf4\xdf"
+ $ECHO -ne "\x70\x68\xc0\xb5\x30\x3c\xb1\x01\xe8\x28\xae\x80\x26\x01\x8b\x15"
+ $ECHO -ne "\x0f\x80\x48\x18\x4b\xe2\xed\x59\x92\x31\xcf\xd2\x8f\x42\xbf\xee"
+ $ECHO -ne "\xbd\x07\x91\x24\xc6\x66\x5e\x8c\x9a\x48\x63\xe7\xac\x8a\x1e\xc5"
+ $ECHO -ne "\x69\x16\x8d\xac\x67\xdc\x75\x75\x82\xca\x19\x28\x36\x4d\x10\xf9"
+ $ECHO -ne "\x41\xcb\x15\x05\x64\xc7\xb0\xc3\x64\xf3\x48\x71\x60\xf2\xbd\xcc"
+ $ECHO -ne "\x37\xb1\x36\xbc\xa7\x2e\x6b\x20\x11\x51\x42\xe1\x8a\x29\xac\x44"
+ $ECHO -ne "\x8f\x63\x56\x23\xd4\xd4\x07\xb4\x60\xa4\xb8\xcd\xee\x49\xa5\x42"
+ $ECHO -ne "\xcc\x52\x00\x6f\xdc\x44\x20\x57\x7d\x36\xd7\x48\x1a\x22\x2c\xd0"
+ $ECHO -ne "\x19\x43\x51\x5e\x1c\x8c\x5f\x70\xc2\x6b\xcf\xea\xd4\x97\x61\x72"
+ $ECHO -ne "\x33\xc3\x9a\xd4\x06\xf1\x8a\x9a\xfe\x21\x83\x0b\xea\xf1\xfa\x2c"
+ $ECHO -ne "\x52\x23\x2c\xb8\xc1\xe6\xc8\x9d\x9c\x5f\x8f\xf2\x4a\x86\x76\x92"
+ $ECHO -ne "\x78\x0f\x7d\x9d\x09\x38\xce\xe1\x9a\xf3\x60\xed\x65\x0b\x1a\x68"
+ $ECHO -ne "\xa6\x52\x39\x18\x1e\x45\xe3\x5d\xe0\x7d\xfb\xc6\xcc\x44\x18\x93"
+ $ECHO -ne "\xe9\x71\xa8\x18\x0d\x74\x48\x8a\x18\x0b\x61\xbf\xe1\xa9\x0e\x4c"
+ $ECHO -ne "\xad\x1b\xaf\x1a\x37\x39\x92\x4d\xcc\x96\x87\x46\x0d\x83\x06\x33"
+ $ECHO -ne "\x53\x35\xd9\x2c\x36\x98\x28\x1c\x52\xb1\x89\x55\x56\xcc\x37\x20"
+ $ECHO -ne "\x89\x84\x0e\x3d\x27\x2f\xc6\xfa\x78\x04\xe1\xd5\xc6\x90\x49\x16"
+ $ECHO -ne "\xfe\x0a\x16\x6f\x11\x54\x42\x22\xa1\x90\x2d\x19\x91\x28\x05\xf2"
+ $ECHO -ne "\x30\x6c\x14\x16\xd6\x8a\xce\xf6\xcd\x7c\x64\x76\x42\xe9\x28\xe9"
+ $ECHO -ne "\x1c\xd1\xb8\x9e\xcd\x53\xb2\x6b\x8d\x57\x57\x2a\xb8\x59\x58\x8c"
+ $ECHO -ne "\xd3\x12\x57\xa6\xe3\x48\x70\xf5\x55\x0f\x76\xb5\x27\x08\xd1\xa0"
+ $ECHO -ne "\xf8\x60\x09\xa1\xf2\x30\x43\x4a\x30\x46\xf7\x96\x19\xe9\x3a\x44"
+ $ECHO -ne "\xc0\xd8\xa8\x51\xae\x50\x92\x81\x81\xda\x10\xd3\x18\x62\x94\xd0"
+ $ECHO -ne "\x9e\x54\x0b\x22\xcc\xd0\xfe\x0c\x36\x44\x4d\x4d\x40\x5c\xa8\x35"
+ $ECHO -ne "\xb6\x53\x9c\x36\x9c\x5a\x0e\x0e\xb0\x5c\x29\x2a\x35\x66\xaa\x3a"
+ $ECHO -ne "\xcb\x23\x7b\xbb\xc8\x60\xbc\xb4\x28\xf4\x6e\xfe\x86\xfc\x16\x85"
+ $ECHO -ne "\x0c\xe0\x1d\xcf\xfd\x12\x28\xc6\x60\xd0\xe6\x2f\x76\xf0\x1a\x5b"
+ $ECHO -ne "\xfa\xa6\xc6\xea\x58\xbb\x26\x37\x84\xdd\x85\xd5\x37\x82\x76\xd9"
+ $ECHO -ne "\x14\x7a\xca\xed\x13\x72\xc3\xe1\xb9\x69\x45\xd4\xec\x44\x94\x26"
+ $ECHO -ne "\x8e\x0b\x90\xb6\x8b\x1f\x1e\x01\x96\x5a\xb9\x51\xa6\x27\xa2\x9b"
+ $ECHO -ne "\x38\xd9\x25\x32\x9b\x54\xfc\x45\xd1\xa8\x59\x35\x1a\xb0\xb2\x1a"
+ $ECHO -ne "\xc8\x88\x15\x42\x98\x50\x99\x12\x9e\xf5\x59\xb2\x5c\xc5\xa7\x34"
+ $ECHO -ne "\x35\xca\xb3\xed\xdc\xc9\x9f\x3e\x77\x8f\x6c\xde\xc8\x41\x6a\xc5"
+ $ECHO -ne "\x24\x85\x04\xa1\x2f\xe3\x47\x8c\x47\xd4\xdb\x74\x8c\xb6\x4c\xef"
+ $ECHO -ne "\xed\xad\x9f\x86\x31\xd8\xc8\x07\xc5\x11\x1c\x39\x3a\xf8\x75\x73"
+ $ECHO -ne "\xae\x78\x7d\x1d\x36\x5b\xd1\x23\x5d\x84\x17\x5d\x4b\xac\xd3\x70"
+ $ECHO -ne "\x8a\x83\x48\x48\x83\x7b\x5c\x99\x9e\x56\xbb\xfc\x0c\x4b\x04\xcf"
+ $ECHO -ne "\x83\x5d\xf8\x31\x2c\xc4\x5c\xa1\x68\x6a\x56\xe1\x7f\xbe\xd6\x59"
+ $ECHO -ne "\x6c\x55\xb0\x63\x41\xeb\x88\x69\xb6\x9b\x50\xc4\x31\xea\xb0\xd7"
+ $ECHO -ne "\xe2\xfb\x7b\xeb\xbb\x52\xc4\x97\x23\xe9\x16\x29\x18\x50\x4d\x0e"
+ $ECHO -ne "\x68\x62\xfb\x3f\xd9\x07\xb9\x89\x4d\x58\x7c\x32\x6d\x12\x3e\x9b"
+ $ECHO -ne "\x3a\x14\xee\xac\x3c\x8d\x09\x62\x30\x8e\xe0\x86\x84\xb9\xf3\x0d"
+ $ECHO -ne "\xf8\xad\x42\xa6\xbb\x7d\xd1\xf2\xf3\xc0\xe2\x32\xc4\x40\xaa\x8a"
+ $ECHO -ne "\x2a\xe9\xa9\x45\x83\x23\xf6\x90\x05\x24\x59\x22\x84\x50\x82\xc0"
+ $ECHO -ne "\x58\x41\x42\x18\x91\x3d\xd8\x80\xb1\x26\x68\xb2\xa8\xc0\x21\x14"
+ $ECHO -ne "\x18\xdf\x3a\x86\x25\x85\x56\xab\x20\x38\xcd\xdc\x98\x6e\x07\xc4"
+ $ECHO -ne "\x6b\x16\x55\xe0\x41\xe0\x41\xda\x29\x62\x8d\xba\xce\xa2\xcb\xfc"
+ $ECHO -ne "\x70\x78\x99\xf9\x16\x0b\x5a\x0c\xc5\xad\x18\xeb\xf0\xb5\xc9\x25"
+ $ECHO -ne "\x82\x16\xe0\x5d\xc1\xc4\xc6\xf0\x84\x6a\x45\x7d\xdb\x28\x46\xab"
+ $ECHO -ne "\xef\x32\xc9\x49\x50\x51\x60\x77\x1c\xfd\x58\x9c\x01\x3b\x7a\xfa"
+ $ECHO -ne "\x49\x47\x3e\x87\x1c\x39\xa6\x6a\xa4\xb7\x39\x93\xac\xac\xb0\x39"
+ $ECHO -ne "\x2f\xbc\xab\x9b\x52\x96\x24\x46\xc1\x95\xe4\x31\x89\x37\x18\xc8"
+ $ECHO -ne "\x2c\x22\x32\x2a\x8f\xb6\x58\x77\x57\x77\x2f\x09\xd0\x7c\xed\x74"
+ $ECHO -ne "\xaa\x7c\x86\x25\x45\x0c\x43\x4d\x31\xb0\x63\x40\xcf\x86\xfe\x75"
+ $ECHO -ne "\x76\xe0\xee\x99\xb5\x71\xe2\x4e\xe5\xc1\xf9\x2e\x48\xe2\xa6\x1b"
+ $ECHO -ne "\x28\xa5\xa3\xbe\xff\x37\xd1\xdd\x66\xa2\xe8\xd3\x88\x4d\x13\xd5"
+ $ECHO -ne "\x68\x51\x27\x41\xc3\x6c\x1b\x48\x67\x6a\xdf\x25\x2a\x40\xa1\x87"
+ $ECHO -ne "\x1d\x54\xb7\xe3\x91\xc2\x6b\x5b\xb9\x8c\xd5\x10\x11\x10\x16\xab"
+ $ECHO -ne "\x6b\xbe\x65\x6b\x73\xa7\x35\xa1\x09\x60\x60\xed\x96\x39\xc9\x40"
+ $ECHO -ne "\x5d\xdc\xee\x60\x49\x0c\x68\x18\x34\xb2\x6f\x2a\x95\x14\x29\x95"
+ $ECHO -ne "\x5b\x59\xd2\x1f\x63\x2a\xbe\xfd\xae\x09\x5c\xee\x11\xb5\x29\x36"
+ $ECHO -ne "\xca\xdf\x28\x8c\x65\x42\x46\x74\x0c\x39\x68\x30\xac\x2c\x2f\xd0"
+ $ECHO -ne "\x9b\xb3\x92\x19\x90\xa1\x07\xcc\xf6\xde\x64\x5f\x6f\xd7\xb6\xcc"
+ $ECHO -ne "\xe0\x70\x0f\x0b\xd2\x0e\x77\xa1\x70\xe3\x56\x90\x4b\x28\x58\xd0"
+ $ECHO -ne "\xd1\xe1\x9d\x18\x98\xba\x6b\x36\x54\xa9\x54\x09\x63\x49\x18\x55"
+ $ECHO -ne "\x60\xba\x11\xb1\x0a\x14\x45\x1f\xae\x08\x50\x09\x33\x00\xa2\xb2"
+ $ECHO -ne "\x71\x81\x75\x89\xb7\xb9\x0c\x73\xc0\x4c\x32\x89\x72\xac\xa9\xa3"
+ $ECHO -ne "\x47\x5f\x7d\x4e\x1b\x4d\xb9\xea\x84\x45\x00\x37\x3c\xb3\x7b\xf8"
+ $ECHO -ne "\xe7\x0f\xaa\x33\x1a\x9b\xc2\x0c\x35\x8a\xd4\x04\x46\x42\xcb\xab"
+ $ECHO -ne "\xaa\xc7\xe5\xc9\x20\x6e\x21\xa6\x8c\xed\x61\x86\x42\x87\x03\x25"
+ $ECHO -ne "\xde\x2c\x4a\x85\xcb\xb4\x36\xc9\xd4\x72\x60\x62\xc2\x19\xd0\x30"
+ $ECHO -ne "\x16\x6d\x58\x61\x62\x16\xe8\xd2\x0e\xd0\xf3\xdb\x53\x37\x07\x37"
+ $ECHO -ne "\x40\xc3\xe5\x5b\x9d\x16\x45\x60\x8e\xfb\x12\xc4\x5f\x9f\xdd\xe1"
+ $ECHO -ne "\x45\x5d\x45\x36\x21\xa0\xc0\xb8\x11\x98\x0f\x64\x98\x67\x1c\x11"
+ $ECHO -ne "\xa9\xa1\x65\x10\xb9\x22\x12\x91\x10\x9b\x10\x6f\x95\x2e\x34\x91"
+ $ECHO -ne "\x64\x82\xa4\x05\x02\xfc\x4a\x9f\x9c\x4d\x6c\x8d\x67\x26\x90\x63"
+ $ECHO -ne "\x04\x12\x6f\x0e\x55\x3c\x8e\xf2\x8d\xb4\x6b\x3d\xac\xcf\x84\x2e"
+ $ECHO -ne "\x60\x0f\x40\x62\x88\x3a\xcf\xbd\xea\xad\x40\x4c\x29\xe1\xb5\xb6"
+ $ECHO -ne "\x3e\x15\x86\xd5\xbe\xad\x27\xde\x2b\x32\xef\xcf\x97\x88\x8b\x17"
+ $ECHO -ne "\x80\x43\x0e\x20\x79\x3b\x36\x73\xb8\xad\x12\x0e\x87\x59\x5f\xd3"
+ $ECHO -ne "\x3c\x8c\x84\xc8\x54\x2b\x94\xc9\x2e\x36\x8b\x32\x48\xf1\xe3\x08"
+ $ECHO -ne "\xf0\x36\xc0\xb8\xc2\xa2\xa9\xe2\x52\x02\xf1\x9b\xcb\xde\xcc\xb5"
+ $ECHO -ne "\x5a\x6c\x05\x06\x31\x44\x41\x88\xa3\x05\x04\x16\x0d\x4a\x85\x20"
+ $ECHO -ne "\x79\xda\x89\x82\x1d\x5f\x5a\x11\x88\x89\x06\x05\xf5\xf4\xed\x75"
+ $ECHO -ne "\x62\x39\x37\x69\x11\x32\x3e\x8d\xe4\x60\x62\x52\xc9\xad\x82\x9a"
+ $ECHO -ne "\x9a\x2f\x06\x41\x26\xb4\x48\x70\x39\x2b\x8a\xb1\x5a\x53\xc6\x48"
+ $ECHO -ne "\x57\x17\xf5\xd8\x5a\xc6\x19\x83\x06\x0b\x9b\x04\xb8\xf5\xaf\x23"
+ $ECHO -ne "\x45\x87\x48\x50\x6d\x16\xea\xb4\x20\xb8\x49\x92\x6b\x0c\x76\x14"
+ $ECHO -ne "\x48\x53\xa1\x29\x74\xf6\xd7\x49\x44\x39\xba\xbd\x63\xa6\xf2\x81"
+ $ECHO -ne "\x8f\x5b\x5e\x46\x0a\x34\x95\x31\xc0\xdd\x60\x50\xd6\x0a\xa6\x29"
+ $ECHO -ne "\x3d\x36\x3a\xc7\xb8\xcf\x25\x5e\xf7\x82\x55\x88\xc2\x8b\x30\xd2"
+ $ECHO -ne "\x97\x90\x49\x94\xde\xe5\xaa\xeb\x42\x8c\x94\x2a\xa0\x0d\x9b\xb5"
+ $ECHO -ne "\x59\xbe\xcb\x35\xa3\x37\x54\x76\x35\x98\xcb\x1f\x13\x3f\x4a\xd1"
+ $ECHO -ne "\x45\x87\x67\xed\x66\x02\x06\x49\x1c\x59\x51\x1f\x4d\x85\x03\x46"
+ $ECHO -ne "\x65\x86\x4e\x4c\x6a\xd2\x24\x31\x5b\x6a\x3b\x19\x49\xe1\x83\x14"
+ $ECHO -ne "\xc1\xf0\x56\x61\x93\x8b\x33\x13\x54\x6f\x78\x4c\xa0\x85\xf0\xb3"
+ $ECHO -ne "\x17\xaa\xf2\x67\x02\x0c\x31\xed\x5e\x98\x02\x28\xc4\xe5\x87\xa2"
+ $ECHO -ne "\x70\xd1\xd5\x9c\xf8\xec\x19\x88\xa9\x0d\x0e\x4a\xe3\x47\x83\x6e"
+ $ECHO -ne "\xf7\x70\x3e\xa4\xa9\xc0\x4c\xfa\x2b\x3b\xd7\x6f\x96\xc3\x6d\x6d"
+ $ECHO -ne "\x71\x2a\x8d\x62\xf1\xd3\xdd\xb0\x33\xd4\x67\x19\x0d\x30\x85\x3a"
+ $ECHO -ne "\x06\x04\x85\x00\x48\x5d\x53\x35\xa0\x31\x56\x84\x82\xa5\xac\x22"
+ $ECHO -ne "\x02\x44\xaf\x6d\xc0\x61\x59\x23\x96\x72\x5a\x81\x9e\x0c\xe5\x79"
+ $ECHO -ne "\xda\xd0\x42\x5c\x89\xa5\x00\xec\x56\x41\x64\x8a\x11\x60\x79\xb1"
+ $ECHO -ne "\xed\x55\x16\x54\xe6\x51\x03\x34\x14\x60\x31\xd2\xf0\x0b\xce\xf2"
+ $ECHO -ne "\x4e\x4c\x45\x8c\xeb\x2a\x82\x3a\xa8\x52\xce\x8f\x4e\xf1\x89\xea"
+ $ECHO -ne "\x44\x91\x66\xdd\x6b\x49\xa3\x83\x0b\x19\x0e\x66\x5f\x02\x22\x58"
+ $ECHO -ne "\xe7\xc0\xa8\xce\x55\x48\xa6\x04\xf3\x03\xac\x62\xb2\xc0\xaa\xa0"
+ $ECHO -ne "\x09\xae\x5b\x96\xd0\xdd\xa9\x1f\xfb\x2d\x3d\xf5\x02\xe1\x86\x02"
+ $ECHO -ne "\x3e\xda\xd0\x5d\xba\x16\x39\xcd\x75\xa2\x47\x26\x74\x25\xa8\x5e"
+ $ECHO -ne "\xf3\x36\x0c\x37\x19\x17\x06\x66\xd0\x0b\x42\x41\x0a\xa0\xde\x93"
+ $ECHO -ne "\xd7\xb4\x9f\xfb\xc7\x4f\x65\x54\xda\xb8\x8b\x23\xde\x9c\x57\xcf"
+ $ECHO -ne "\x2d\x2a\x12\xda\xcc\xf6\x73\x83\x02\x4c\x0e\x42\x88\xda\x27\xb9"
+ $ECHO -ne "\xcb\x04\xb6\x07\x26\x78\xa1\xa1\x09\xa3\x6a\x86\xbd\x9d\xd4\xf9"
+ $ECHO -ne "\xc0\x81\xa6\x49\xa9\x72\xeb\x56\xbd\xf9\xea\x89\x4f\xae\x72\x28"
+ $ECHO -ne "\xb6\x57\x35\xbe\x94\xad\xc0\xff\x1e\xf2\x35\x24\xa0\x45\xd5\x09"
+ $ECHO -ne "\xc0\xe0\x10\xd0\x17\x90\xe2\xff\x8b\xb9\x22\x9c\x28\x48\x09\x68"
+ $ECHO -ne "\xc3\x18\x00"
+}
+
+tar2_bz2()
+{
+ $ECHO -ne "\x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\x16\x08\xfd\x60\x00\x00"
+ $ECHO -ne "\x01\xff\x80\x48\x80\x00\xa0\x40\x03\xff\xc0\x72\x00\x89\x40\xff"
+ $ECHO -ne "\xe7\xdf\xc0\x20\x00\x92\x11\x53\xf5\x13\xd3\x53\x7a\x41\xa8\xf2"
+ $ECHO -ne "\x9a\x60\x21\x9a\x40\xf4\x9b\xd2\x0d\x09\xa5\x3c\xa6\x4f\x44\xf5"
+ $ECHO -ne "\x34\x34\xd1\xb5\x01\xa0\x3d\x41\xa4\xe1\xeb\x4c\x5a\x01\x47\x3b"
+ $ECHO -ne "\xd1\x67\x1a\x4c\x3b\x21\x84\x23\x2c\x5c\xf7\xe0\xbd\x2a\xa4\xea"
+ $ECHO -ne "\xdc\xdb\x71\x80\x26\x98\x21\x0e\x76\x21\x30\xce\xe4\xad\x8c\xb5"
+ $ECHO -ne "\x68\x62\x35\xa1\xfd\x8e\x7b\x51\x70\x96\xb1\x2c\xa2\x99\x6c\xa1"
+ $ECHO -ne "\xc2\xcd\xea\xa7\x5e\x6b\x91\x4f\x73\x96\xe4\x48\x3c\xe7\x8c\x0f"
+ $ECHO -ne "\x03\x64\x5b\x7a\x43\xc1\x68\x86\x41\x83\x46\x0b\xba\xaa\x6a\x9b"
+ $ECHO -ne "\x59\x34\xf1\x1c\x08\x69\x1d\x41\xfb\x4a\x96\x1b\x14\x9e\x32\x89"
+ $ECHO -ne "\x69\x5f\x63\x9a\x22\xe4\x96\x34\xff\x12\x20\xd0\x25\x70\xdc\x5d"
+ $ECHO -ne "\xc9\x14\xe1\x42\x40\x58\x23\xf5\x80"
+}
+
+# NB: tar emits "tar: short read" on stderr because these test tars are
+# also lacking proper terminating zeroed blocks. But exitcode is 0.
+# This is intended.
+
+export TZ=UTC-1
+
+# Case 1: long name, with path in prefix field
+res1='-rw-r--r-- fm3/users 9869 2007-03-12 10:44:54 VirtualBox-1.5.6_OSE/src/libs/xpcom18a4/ipc/ipcd/extensions/transmngr/public/ipcITransactionService.idl'
+t=`tar1_bz2 | bunzip2 | busybox tar tvf -`
+test x"$res1" = x"$t"
+t=`tar1_bz2 | bunzip2 | busybox tar tv`
+test x"$res1" = x"$t"
+
+# Case 2: long dir name, with ENTIRE path in prefix field (name = "")
+res2='drwxr-xr-x fm3/users 0 2008-02-19 16:33:20 VirtualBox-1.5.6_OSE/src/VBox/Additions/linux/x11include/4.3/programs/Xserver/hw/xfree86/xf24_32bpp/'
+t=`tar2_bz2 | bunzip2 | busybox tar tvf -`
+test x"$res2" = x"$t"
+t=`tar2_bz2 | bunzip2 | busybox tar tv`
+test x"$res2" = x"$t"
diff --git a/release/src/router/busybox/testsuite/taskset.tests b/release/src/router/busybox/testsuite/taskset.tests
new file mode 100755
index 00000000..45993648
--- /dev/null
+++ b/release/src/router/busybox/testsuite/taskset.tests
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Copyright 2006 Bernhard Reutner-Fischer
+# Licensed under GPL v2 or later, see file LICENSE for details.
+
+. testing.sh
+a="taskset"
+
+# testing "test name" "opts" "expected result" "file inp" "stdin"
+testing "taskset (get from pid 1)" "$a -p 1 >/dev/null;echo \$?" "0\n" "" ""
+testing "taskset (invalid pid)" "$a -p 0 >/dev/null 2>&1;echo \$?" "1\n" "" ""
+testing "taskset (set_aff, needs CAP_SYS_NICE)" \
+ "$a 0x1 $SHELL -c $a\ -p\ \$$\|grep\ \"current\ affinity\ mask:\ 1\" >/dev/null;echo \$?" \
+ "0\n" "" ""
+
+unset a
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/tee/tee-appends-input b/release/src/router/busybox/testsuite/tee/tee-appends-input
index cff20bf7..cff20bf7 100755..100644
--- a/release/src/router/busybox/testsuite/tee/tee-appends-input
+++ b/release/src/router/busybox/testsuite/tee/tee-appends-input
diff --git a/release/src/router/busybox/testsuite/tee/tee-tees-input b/release/src/router/busybox/testsuite/tee/tee-tees-input
index 26e21738..26e21738 100755..100644
--- a/release/src/router/busybox/testsuite/tee/tee-tees-input
+++ b/release/src/router/busybox/testsuite/tee/tee-tees-input
diff --git a/release/src/router/busybox/testsuite/test.tests b/release/src/router/busybox/testsuite/test.tests
new file mode 100755
index 00000000..b7c84d9b
--- /dev/null
+++ b/release/src/router/busybox/testsuite/test.tests
@@ -0,0 +1,79 @@
+#!/bin/sh
+
+# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com>
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# testing "test name" "command" "expected result" "file input" "stdin"
+# file input will be file called "input"
+# test can create a file "actual" instead of writing to stdout
+
+# Need to call 'busybox test', otherwise shell builtin is used
+
+testing "test: should be false (1)" \
+ "busybox test; echo \$?" \
+ "1\n" \
+ "" ""
+
+testing "test '': should be false (1)" \
+ "busybox test ''; echo \$?" \
+ "1\n" \
+ "" ""
+
+testing "test !: should be true (0)" \
+ "busybox test !; echo \$?" \
+ "0\n" \
+ "" ""
+
+testing "test a: should be true (0)" \
+ "busybox test a; echo \$?" \
+ "0\n" \
+ "" ""
+
+testing "test --help: should be true (0)" \
+ "busybox test --help; echo \$?" \
+ "0\n" \
+ "" ""
+
+testing "test -f: should be true (0)" \
+ "busybox test -f; echo \$?" \
+ "0\n" \
+ "" ""
+
+testing "test ! -f: should be false (1)" \
+ "busybox test ! -f; echo \$?" \
+ "1\n" \
+ "" ""
+
+testing "test a = a: should be true (0)" \
+ "busybox test a = a; echo \$?" \
+ "0\n" \
+ "" ""
+
+testing "test -lt = -gt: should be false (1)" \
+ "busybox test -lt = -gt; echo \$?" \
+ "1\n" \
+ "" ""
+
+testing "test a -a !: should be true (0)" \
+ "busybox test a -a !; echo \$?" \
+ "0\n" \
+ "" ""
+
+testing "test -f = a -o b: should be true (0)" \
+ "busybox test -f = a -o b; echo \$?" \
+ "0\n" \
+ "" ""
+
+testing "test ! a = b -a ! c = c: should be false (1)" \
+ "busybox test ! a = b -a ! c = c; echo \$?" \
+ "1\n" \
+ "" ""
+
+testing "test ! a = b -a ! c = d: should be true (0)" \
+ "busybox test ! a = b -a ! c = d; echo \$?" \
+ "0\n" \
+ "" ""
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/testing.sh b/release/src/router/busybox/testsuite/testing.sh
new file mode 100755
index 00000000..a57c4d68
--- /dev/null
+++ b/release/src/router/busybox/testsuite/testing.sh
@@ -0,0 +1,154 @@
+# Simple test harness infrastructurei for BusyBox
+#
+# Copyright 2005 by Rob Landley
+#
+# License is GPLv2, see LICENSE in the busybox tarball for full license text.
+
+# This file defines two functions, "testing" and "optional"
+# and a couple more...
+
+# The following environment variables may be set to enable optional behavior
+# in "testing":
+# VERBOSE - Print the diff -u of each failed test case.
+# DEBUG - Enable command tracing.
+# SKIP - do not perform this test (this is set by "optional")
+#
+# The "testing" function takes five arguments:
+# $1) Test description
+# $2) Command(s) to run. May have pipes, redirects, etc
+# $3) Expected result on stdout
+# $4) Data to be written to file "input"
+# $5) Data to be written to stdin
+#
+# The exit value of testing is the exit value of $2 it ran.
+#
+# The environment variable "FAILCOUNT" contains a cumulative total of the
+# number of failed tests.
+
+# The "optional" function is used to skip certain tests, ala:
+# optional CONFIG_FEATURE_THINGY
+#
+# The "optional" function checks the environment variable "OPTIONFLAGS",
+# which is either empty (in which case it always clears SKIP) or
+# else contains a colon-separated list of features (in which case the function
+# clears SKIP if the flag was found, or sets it to 1 if the flag was not found).
+
+export FAILCOUNT=0
+export SKIP=
+
+# Helper functions
+
+optional()
+{
+ option=`echo ":$OPTIONFLAGS:" | grep ":$1:"`
+ # Not set?
+ if [ -z "$1" ] || [ -z "$OPTIONFLAGS" ] || [ ${#option} -ne 0 ]
+ then
+ SKIP=
+ return
+ fi
+ SKIP=1
+}
+
+# The testing function
+
+testing()
+{
+ NAME="$1"
+ [ -n "$1" ] || NAME="$2"
+
+ if [ $# -ne 5 ]
+ then
+ echo "Test $NAME has wrong number of arguments (must be 5) ($# $*)" >&2
+ exit 1
+ fi
+
+ [ -z "$DEBUG" ] || set -x
+
+ if [ -n "$SKIP" ]
+ then
+ echo "SKIPPED: $NAME"
+ return 0
+ fi
+
+ $ECHO -ne "$3" > expected
+ $ECHO -ne "$4" > input
+ [ -z "$VERBOSE" ] || echo "echo '$5' | $2"
+ $ECHO -ne "$5" | eval "$2" > actual
+ RETVAL=$?
+
+ if cmp expected actual >/dev/null 2>/dev/null
+ then
+ echo "PASS: $NAME"
+ else
+ FAILCOUNT=$(($FAILCOUNT + 1))
+ echo "FAIL: $NAME"
+ [ -z "$VERBOSE" ] || diff -u expected actual
+ fi
+ rm -f input expected actual
+
+ [ -z "$DEBUG" ] || set +x
+
+ return $RETVAL
+}
+
+# Recursively grab an executable and all the libraries needed to run it.
+# Source paths beginning with / will be copied into destpath, otherwise
+# the file is assumed to already be there and only its library dependencies
+# are copied.
+
+mkchroot()
+{
+ [ $# -lt 2 ] && return
+
+ $ECHO -n .
+
+ dest=$1
+ shift
+ for i in "$@"
+ do
+ #bashism: [ "${i:0:1}" == "/" ] || i=$(which $i)
+ i=$(which $i) # no-op for /bin/prog
+ [ -f "$dest/$i" ] && continue
+ if [ -e "$i" ]
+ then
+ d=`echo "$i" | grep -o '.*/'` &&
+ mkdir -p "$dest/$d" &&
+ cat "$i" > "$dest/$i" &&
+ chmod +x "$dest/$i"
+ else
+ echo "Not found: $i"
+ fi
+ mkchroot "$dest" $(ldd "$i" | egrep -o '/.* ')
+ done
+}
+
+# Set up a chroot environment and run commands within it.
+# Needed commands listed on command line
+# Script fed to stdin.
+
+dochroot()
+{
+ mkdir tmpdir4chroot
+ mount -t ramfs tmpdir4chroot tmpdir4chroot
+ mkdir -p tmpdir4chroot/{etc,sys,proc,tmp,dev}
+ cp -L testing.sh tmpdir4chroot
+
+ # Copy utilities from command line arguments
+
+ $ECHO -n "Setup chroot"
+ mkchroot tmpdir4chroot $*
+ echo
+
+ mknod tmpdir4chroot/dev/tty c 5 0
+ mknod tmpdir4chroot/dev/null c 1 3
+ mknod tmpdir4chroot/dev/zero c 1 5
+
+ # Copy script from stdin
+
+ cat > tmpdir4chroot/test.sh
+ chmod +x tmpdir4chroot/test.sh
+ chroot tmpdir4chroot /test.sh
+ umount -l tmpdir4chroot
+ rmdir tmpdir4chroot
+}
diff --git a/release/src/router/busybox/testsuite/touch/touch-creates-file b/release/src/router/busybox/testsuite/touch/touch-creates-file
index 4b493542..4b493542 100755..100644
--- a/release/src/router/busybox/testsuite/touch/touch-creates-file
+++ b/release/src/router/busybox/testsuite/touch/touch-creates-file
diff --git a/release/src/router/busybox/testsuite/touch/touch-does-not-create-file b/release/src/router/busybox/testsuite/touch/touch-does-not-create-file
index 88525928..88525928 100755..100644
--- a/release/src/router/busybox/testsuite/touch/touch-does-not-create-file
+++ b/release/src/router/busybox/testsuite/touch/touch-does-not-create-file
diff --git a/release/src/router/busybox/testsuite/touch/touch-touches-files-after-non-existent-file b/release/src/router/busybox/testsuite/touch/touch-touches-files-after-non-existent-file
index a869ec26..a869ec26 100755..100644
--- a/release/src/router/busybox/testsuite/touch/touch-touches-files-after-non-existent-file
+++ b/release/src/router/busybox/testsuite/touch/touch-touches-files-after-non-existent-file
diff --git a/release/src/router/busybox/testsuite/tr.tests b/release/src/router/busybox/testsuite/tr.tests
new file mode 100644
index 00000000..f91cc1f6
--- /dev/null
+++ b/release/src/router/busybox/testsuite/tr.tests
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# Copyright 2009 by Denys Vlasenko <vda.linux@googlemail.com>
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# testing "description" "arguments" "result" "infile" "stdin"
+
+testing "tr does not treat [] in [a-z] as special" \
+ "tr '[q-z]' '_Q-Z+'" \
+ "_QWe+" "" "[qwe]"
+
+testing "tr understands 0-9A-F" \
+ "tr -cd '[0-9A-F]'" \
+ "19AF" "" "19AFH\n"
+
+testing "tr understands [:xdigit:]" \
+ "tr -cd '[:xdigit:]'" \
+ "19AF" "" "19AFH\n"
+
+testing "tr does not stop after [:digit:]" \
+ "tr '[:digit:]y-z' 111111111123" \
+ "111abcx23\n" "" "789abcxyz\n"
+
+testing "tr has correct xdigit sequence" \
+ "tr '[:xdigit:]Gg' 1111111151242222333330xX" \
+ "#1111111151242222x333330X\n" "" \
+ "#0123456789ABCDEFGabcdefg\n"
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/tr/tr-d-alnum-works b/release/src/router/busybox/testsuite/tr/tr-d-alnum-works
new file mode 100644
index 00000000..d440f8f3
--- /dev/null
+++ b/release/src/router/busybox/testsuite/tr/tr-d-alnum-works
@@ -0,0 +1,4 @@
+echo testing | tr -d '[[:alnum:]]' > logfile.gnu
+echo testing | busybox tr -d '[[:alnum:]]' > logfile.bb
+
+diff -u logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/tr/tr-d-works b/release/src/router/busybox/testsuite/tr/tr-d-works
new file mode 100644
index 00000000..a86bfbdf
--- /dev/null
+++ b/release/src/router/busybox/testsuite/tr/tr-d-works
@@ -0,0 +1,4 @@
+echo testing | tr -d aeiou > logfile.gnu
+echo testing | busybox tr -d aeiou > logfile.bb
+
+diff -u logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/tr/tr-non-gnu b/release/src/router/busybox/testsuite/tr/tr-non-gnu
new file mode 100644
index 00000000..ffa6951a
--- /dev/null
+++ b/release/src/router/busybox/testsuite/tr/tr-non-gnu
@@ -0,0 +1 @@
+echo fdhrnzvfu bffvsentr | busybox tr '[a-z]' '[n-z][a-m]'
diff --git a/release/src/router/busybox/testsuite/tr/tr-rejects-wrong-class b/release/src/router/busybox/testsuite/tr/tr-rejects-wrong-class
new file mode 100644
index 00000000..97539360
--- /dev/null
+++ b/release/src/router/busybox/testsuite/tr/tr-rejects-wrong-class
@@ -0,0 +1,19 @@
+echo t12esting | tr -d '[[:alpha:]]' > logfile.gnu
+echo t12esting | tr -d '[:alpha:]' >> logfile.gnu
+echo t12esting | tr -d '[[:alpha:]' >> logfile.gnu
+echo t12esting | tr -d '[[:alpha:' >> logfile.gnu
+echo t12esting | tr -d '[[:alpha' >> logfile.gnu
+echo t12esting | tr -d '[:alpha:]' >> logfile.gnu
+echo t12esting | tr -d '[:alpha:' >> logfile.gnu
+echo t12esting | tr -d '[:alpha' >> logfile.gnu
+
+echo t12esting | busybox tr -d '[[:alpha:]]' > logfile.bb
+echo t12esting | busybox tr -d '[:alpha:]' >> logfile.bb
+echo t12esting | busybox tr -d '[[:alpha:]' >> logfile.bb
+echo t12esting | busybox tr -d '[[:alpha:' >> logfile.bb
+echo t12esting | busybox tr -d '[[:alpha' >> logfile.bb
+echo t12esting | busybox tr -d '[:alpha:]' >> logfile.bb
+echo t12esting | busybox tr -d '[:alpha:' >> logfile.bb
+echo t12esting | busybox tr -d '[:alpha' >> logfile.bb
+
+diff -u logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/tr/tr-works b/release/src/router/busybox/testsuite/tr/tr-works
new file mode 100644
index 00000000..2c0a9d19
--- /dev/null
+++ b/release/src/router/busybox/testsuite/tr/tr-works
@@ -0,0 +1,26 @@
+run_tr ()
+{
+ echo -n "echo '$1' | tr '$2' '$3': "
+ echo "$1" | $bb tr "$2" "$3"
+ echo
+}
+tr_test ()
+{
+ run_tr "cbaab" abc zyx
+ run_tr "TESTING A B C" '[A-Z]' '[a-z]'
+ run_tr "abc[]" "a[b" AXB
+ run_tr abc '[:alpha:]' A-ZA-Z
+ run_tr abc56 '[:alnum:]' A-ZA-Zxxxxxxxxxx
+ run_tr 012 '[:digit:]' abcdefghi
+ run_tr abc56 '[:lower:]' '[:upper:]'
+ run_tr " " '[:space:]' 12345
+ run_tr " " '[:blank:]' 12
+ run_tr 'a b' '[= =]' X
+ run_tr "[:" '[:' ab
+ run_tr " .,:" '[:punct:]' 12
+ run_tr " .,:" '[:cntrl:]' 12
+}
+
+bb= tr_test > logfile.gnu
+bb=busybox tr_test > logfile.bb
+diff -u logfile.gnu logfile.bb
diff --git a/release/src/router/busybox/testsuite/true/true-is-silent b/release/src/router/busybox/testsuite/true/true-is-silent
index 1d1bdb22..1d1bdb22 100755..100644
--- a/release/src/router/busybox/testsuite/true/true-is-silent
+++ b/release/src/router/busybox/testsuite/true/true-is-silent
diff --git a/release/src/router/busybox/testsuite/true/true-returns-success b/release/src/router/busybox/testsuite/true/true-returns-success
index cdf2d55e..cdf2d55e 100755..100644
--- a/release/src/router/busybox/testsuite/true/true-returns-success
+++ b/release/src/router/busybox/testsuite/true/true-returns-success
diff --git a/release/src/router/busybox/testsuite/umlwrapper.sh b/release/src/router/busybox/testsuite/umlwrapper.sh
new file mode 100755
index 00000000..e55e4dbd
--- /dev/null
+++ b/release/src/router/busybox/testsuite/umlwrapper.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# Wrapper for User Mode Linux emulation environment
+
+RUNFILE="$(pwd)/${1}.testroot"
+if [ -z "$RUNFILE" ] || [ ! -x "$RUNFILE" ]
+then
+ echo "Can't run '$RUNFILE'"
+ exit 1
+fi
+
+shift
+
+if [ -z $(which linux) ]
+then
+ echo "No User Mode Linux."
+ exit 1;
+fi
+
+linux rootfstype=hostfs rw init="$RUNFILE" TESTDIR=`pwd` PATH="$PATH" $* quiet
diff --git a/release/src/router/busybox/testsuite/unexpand.tests b/release/src/router/busybox/testsuite/unexpand.tests
new file mode 100755
index 00000000..e7f42c5f
--- /dev/null
+++ b/release/src/router/busybox/testsuite/unexpand.tests
@@ -0,0 +1,30 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+
+testing "unexpand case 1" "unexpand" \
+ "\t12345678\n" "" " 12345678\n" \
+
+testing "unexpand case 2" "unexpand" \
+ "\t 12345678\n" "" " 12345678\n" \
+
+testing "unexpand case 3" "unexpand" \
+ "\t 12345678\n" "" " 12345678\n" \
+
+testing "unexpand case 4" "unexpand" \
+ "\t12345678\n" "" " \t12345678\n" \
+
+testing "unexpand case 5" "unexpand" \
+ "\t12345678\n" "" " \t12345678\n" \
+
+testing "unexpand case 6" "unexpand" \
+ "\t12345678\n" "" " \t12345678\n" \
+
+testing "unexpand case 7" "unexpand" \
+ "123\t 45678\n" "" "123 \t 45678\n" \
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/unexpand/unexpand-works-like-GNU b/release/src/router/busybox/testsuite/unexpand/unexpand-works-like-GNU
new file mode 100644
index 00000000..a5258363
--- /dev/null
+++ b/release/src/router/busybox/testsuite/unexpand/unexpand-works-like-GNU
@@ -0,0 +1,52 @@
+rm -f foo bar
+echo " y" | unexpand ../../busybox > foo
+echo " y" | busybox unexpand ../../busybox > bar
+set +e
+test ! -f foo -a -f bar
+if [ $? = 0 ] ; then
+ set -e
+ diff -q foo bar
+fi
+rm -f foo bar
+echo " y" | unexpand ../../busybox > foo
+echo " y" | busybox unexpand ../../busybox > bar
+set +e
+test ! -f foo -a -f bar
+if [ $? = 0 ] ; then
+ set -e
+ diff -q foo bar
+fi
+echo " y y" | unexpand ../../busybox > foo
+echo " y y" | busybox unexpand ../../busybox > bar
+set +e
+test ! -f foo -a -f bar
+if [ $? = 0 ] ; then
+ set -e
+ diff -q foo bar
+fi
+rm -f foo bar
+echo " y y" | unexpand ../../busybox > foo
+echo " y y" | busybox unexpand ../../busybox > bar
+set +e
+test ! -f foo -a -f bar
+if [ $? = 0 ] ; then
+ set -e
+ diff -q foo bar
+fi
+echo " y y" | unexpand -a ../../busybox > foo
+echo " y y" | busybox unexpand -a ../../busybox > bar
+set +e
+test ! -f foo -a -f bar
+if [ $? = 0 ] ; then
+ set -e
+ diff -q foo bar
+fi
+rm -f foo bar
+echo " y y" | unexpand -a ../../busybox > foo
+echo " y y" | busybox unexpand -a ../../busybox > bar
+set +e
+test ! -f foo -a -f bar
+if [ $? = 0 ] ; then
+ set -e
+ diff -q foo bar
+fi
diff --git a/release/src/router/busybox/testsuite/uniq.tests b/release/src/router/busybox/testsuite/uniq.tests
new file mode 100755
index 00000000..8961d669
--- /dev/null
+++ b/release/src/router/busybox/testsuite/uniq.tests
@@ -0,0 +1,87 @@
+#!/bin/sh
+
+# SUSv3 compliant uniq tests.
+# Copyright 2005 by Rob Landley <rob@landley.net>
+# Licensed under GPL v2, see file LICENSE for details.
+
+# AUDIT: Full SUSv3 coverage (except internationalization).
+
+. testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+# file input will be file called "input"
+# test can create a file "actual" instead of writing to stdout
+
+# Test exit status
+
+testing "uniq (exit with error)" "uniq nonexistent 2> /dev/null || echo yes" \
+ "yes\n" "" ""
+testing "uniq (exit success)" "uniq /dev/null && echo yes" "yes\n" "" ""
+
+# Test various data sources and destinations
+
+testing "uniq (default to stdin)" "uniq" "one\ntwo\nthree\n" "" \
+ "one\ntwo\ntwo\nthree\nthree\nthree\n"
+testing "uniq - (specify stdin)" "uniq -" "one\ntwo\nthree\n" "" \
+ "one\ntwo\ntwo\nthree\nthree\nthree\n"
+testing "uniq input (specify file)" "uniq input" "one\ntwo\nthree\n" \
+ "one\ntwo\ntwo\nthree\nthree\nthree\n" ""
+
+testing "uniq input outfile (two files)" "uniq input actual > /dev/null" \
+ "one\ntwo\nthree\n" "one\ntwo\ntwo\nthree\nthree\nthree\n" ""
+testing "uniq (stdin) outfile" "uniq - actual" \
+ "one\ntwo\nthree\n" "" "one\ntwo\ntwo\nthree\nthree\nthree\n"
+# Note: SUSv3 doesn't seem to require support for "-" output, but we do anyway.
+testing "uniq input - (specify stdout)" "uniq input -" \
+ "one\ntwo\nthree\n" "one\ntwo\ntwo\nthree\nthree\nthree\n" ""
+
+
+#-f skip fields
+#-s skip chars
+#-c occurrences
+#-d dups only
+#-u
+#-w max chars
+
+# Test various command line options
+
+# Leading whitespace is a minor technical violation of the spec,
+# but since gnu does it...
+testing "uniq -c (occurrence count)" "uniq -c | sed 's/^[ \t]*//'" \
+ "1 one\n2 two\n3 three\n" "" \
+ "one\ntwo\ntwo\nthree\nthree\nthree\n"
+testing "uniq -d (dups only) " "uniq -d" "two\nthree\n" "" \
+ "one\ntwo\ntwo\nthree\nthree\nthree\n"
+
+testing "uniq -f -s (skip fields and chars)" "uniq -f2 -s 3" \
+"cc dd ee8
+aa bb cc9
+" "" \
+"cc dd ee8
+bb cc dd8
+aa bb cc9
+"
+testing "uniq -w (compare max characters)" "uniq -w 2" \
+"cc1
+" "" \
+"cc1
+cc2
+cc3
+"
+
+testing "uniq -s -w (skip fields and compare max chars)" \
+"uniq -s 2 -w 2" \
+"aaccaa
+" "" \
+"aaccaa
+aaccbb
+bbccaa
+"
+
+# -d is "Suppress the writing fo lines that are not repeated in the input."
+# -u is "Suppress the writing of lines that are repeated in the input."
+# Therefore, together this means they should produce no output.
+testing "uniq -u and -d produce no output" "uniq -d -u" "" "" \
+ "one\ntwo\ntwo\nthree\nthree\nthree\n"
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/unzip.tests b/release/src/router/busybox/testsuite/unzip.tests
new file mode 100755
index 00000000..975079db
--- /dev/null
+++ b/release/src/router/busybox/testsuite/unzip.tests
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# Tests for unzip.
+# Copyright 2006 Rob Landley <rob@landley.net>
+# Copyright 2006 Glenn McGrath
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+# file input will be file called "input"
+# test can create a file "actual" instead of writing to stdout
+
+# Create a scratch directory
+
+mkdir temp
+cd temp
+
+# Create test file to work with.
+
+mkdir foo
+touch foo/bar
+zip foo.zip foo foo/bar > /dev/null
+rm -f foo/bar
+rmdir foo
+
+# Test that unzipping just foo doesn't create bar.
+testing "unzip (subdir only)" "unzip -q foo.zip foo/ && test -d foo && test ! -f foo/bar && echo yes" "yes\n" "" ""
+
+rmdir foo
+rm foo.zip
+
+# Clean up scratch directory.
+
+cd ..
+rm -rf temp
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/uptime/uptime-works b/release/src/router/busybox/testsuite/uptime/uptime-works
new file mode 100644
index 00000000..80e57877
--- /dev/null
+++ b/release/src/router/busybox/testsuite/uptime/uptime-works
@@ -0,0 +1,2 @@
+busybox uptime
+
diff --git a/release/src/router/busybox/testsuite/uuencode.tests b/release/src/router/busybox/testsuite/uuencode.tests
new file mode 100755
index 00000000..cb658db3
--- /dev/null
+++ b/release/src/router/busybox/testsuite/uuencode.tests
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# unit test for uuencode to test functionality.
+# Copyright 2006 by Erik Hovland <erik@hovland.org>
+# Licensed under GPL v2, see file LICENSE for details.
+
+# AUDIT: Unit tests for uuencode
+
+. testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+# file input will be file called "input"
+# test can create a file "actual" instead of writing to stdout
+
+# Test setup of standard input
+saved_umask=$(umask)
+umask 0
+testing "uuencode sets standard input mode correctly" \
+ "uuencode foo </dev/null | head -n 1 | grep -q 666 && echo yes" "yes\n" "" ""
+umask $saved_umask
+
+testing "uuencode correct encoding" "uuencode bb_uuenc_test.out" \
+"begin 644 bb_uuenc_test.out\nM5&AE(&9A<W0@9W)E>2!F;W@@:G5M<&5D(&]V97(@=&AE(&QA>GD@8G)O=VX@\n%9&]G+@H\`\n\`\nend\n" \
+ "" "The fast grey fox jumped over the lazy brown dog.\n"
+testing "uuencode correct base64 encoding" "uuencode -m bb_uuenc_test.out" \
+"begin-base64 644 bb_uuenc_test.out\nVGhlIGZhc3QgZ3JleSBmb3gganVtcGVkIG92ZXIgdGhlIGxhenkgYnJvd24g\nZG9nLgo=\n====\n" \
+ "" "The fast grey fox jumped over the lazy brown dog.\n"
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/uuencode/uuencode-sets-standard-input-mode-correctly b/release/src/router/busybox/testsuite/uuencode/uuencode-sets-standard-input-mode-correctly
deleted file mode 100755
index 0ccf23b5..00000000
--- a/release/src/router/busybox/testsuite/uuencode/uuencode-sets-standard-input-mode-correctly
+++ /dev/null
@@ -1,6 +0,0 @@
-saved_umask=$(umask)
-umask 0
-busybox uuencode foo </dev/null | head -n 1 | grep -q 666
-status=$?
-umask $saved_umask
-return $status
diff --git a/release/src/router/busybox/testsuite/wc/wc-counts-all b/release/src/router/busybox/testsuite/wc/wc-counts-all
index 5e2cb6e4..70836456 100755..100644
--- a/release/src/router/busybox/testsuite/wc/wc-counts-all
+++ b/release/src/router/busybox/testsuite/wc/wc-counts-all
@@ -1 +1,2 @@
-test "`echo i\'m a little teapot | busybox wc`" = ' 1 4 20'
+# 1 line, 4 words, 20 chars.
+test "`echo i\'m a little teapot | busybox wc | sed 's/ */ /g' | sed 's/^ //'`" = '1 4 20'
diff --git a/release/src/router/busybox/testsuite/wc/wc-counts-characters b/release/src/router/busybox/testsuite/wc/wc-counts-characters
index 75586468..75586468 100755..100644
--- a/release/src/router/busybox/testsuite/wc/wc-counts-characters
+++ b/release/src/router/busybox/testsuite/wc/wc-counts-characters
diff --git a/release/src/router/busybox/testsuite/wc/wc-counts-lines b/release/src/router/busybox/testsuite/wc/wc-counts-lines
index 5be6ed08..5be6ed08 100755..100644
--- a/release/src/router/busybox/testsuite/wc/wc-counts-lines
+++ b/release/src/router/busybox/testsuite/wc/wc-counts-lines
diff --git a/release/src/router/busybox/testsuite/wc/wc-counts-words b/release/src/router/busybox/testsuite/wc/wc-counts-words
index 331650e9..331650e9 100755..100644
--- a/release/src/router/busybox/testsuite/wc/wc-counts-words
+++ b/release/src/router/busybox/testsuite/wc/wc-counts-words
diff --git a/release/src/router/busybox/testsuite/wc/wc-prints-longest-line-length b/release/src/router/busybox/testsuite/wc/wc-prints-longest-line-length
index 78831fc1..78831fc1 100755..100644
--- a/release/src/router/busybox/testsuite/wc/wc-prints-longest-line-length
+++ b/release/src/router/busybox/testsuite/wc/wc-prints-longest-line-length
diff --git a/release/src/router/busybox/testsuite/wget/wget--O-overrides--P b/release/src/router/busybox/testsuite/wget/wget--O-overrides--P
index fdb5d47c..fdb5d47c 100755..100644
--- a/release/src/router/busybox/testsuite/wget/wget--O-overrides--P
+++ b/release/src/router/busybox/testsuite/wget/wget--O-overrides--P
diff --git a/release/src/router/busybox/testsuite/wget/wget-handles-empty-path b/release/src/router/busybox/testsuite/wget/wget-handles-empty-path
index 5b591837..5b591837 100755..100644
--- a/release/src/router/busybox/testsuite/wget/wget-handles-empty-path
+++ b/release/src/router/busybox/testsuite/wget/wget-handles-empty-path
diff --git a/release/src/router/busybox/testsuite/wget/wget-retrieves-google-index b/release/src/router/busybox/testsuite/wget/wget-retrieves-google-index
index 7be9a808..7be9a808 100755..100644
--- a/release/src/router/busybox/testsuite/wget/wget-retrieves-google-index
+++ b/release/src/router/busybox/testsuite/wget/wget-retrieves-google-index
diff --git a/release/src/router/busybox/testsuite/wget/wget-supports--P b/release/src/router/busybox/testsuite/wget/wget-supports--P
index 9b4d095e..9b4d095e 100755..100644
--- a/release/src/router/busybox/testsuite/wget/wget-supports--P
+++ b/release/src/router/busybox/testsuite/wget/wget-supports--P
diff --git a/release/src/router/busybox/testsuite/which/which-uses-default-path b/release/src/router/busybox/testsuite/which/which-uses-default-path
index f612aeb5..63ceb9f8 100755..100644
--- a/release/src/router/busybox/testsuite/which/which-uses-default-path
+++ b/release/src/router/busybox/testsuite/which/which-uses-default-path
@@ -2,6 +2,3 @@ BUSYBOX=$(type -p busybox)
SAVED_PATH=$PATH
unset PATH
$BUSYBOX which ls
-STATUS=$?
-export PATH=$SAVED_PATH
-return $STATUS
diff --git a/release/src/router/busybox/testsuite/xargs.tests b/release/src/router/busybox/testsuite/xargs.tests
new file mode 100755
index 00000000..36524499
--- /dev/null
+++ b/release/src/router/busybox/testsuite/xargs.tests
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# testing "test name" "command" "expected result" "file input" "stdin"
+
+testing "xargs -E _ stops on underscore" \
+ "xargs -E _" \
+ "a\n" \
+ "" "a\n_\nb\n"
+
+testing "xargs -E ''" \
+ "xargs -E ''" \
+ "a _ b\n" \
+ "" "a\n_\nb\n"
+
+testing "xargs -e without param" \
+ "xargs -e" \
+ "a _ b\n" \
+ "" "a\n_\nb\n"
+
+testing "xargs does not stop on underscore ('new' GNU behavior)" \
+ "xargs" \
+ "a _ b\n" \
+ "" "a\n_\nb\n"
+
+exit $FAILCOUNT
diff --git a/release/src/router/busybox/testsuite/xargs/xargs-works b/release/src/router/busybox/testsuite/xargs/xargs-works
new file mode 100644
index 00000000..c95869e8
--- /dev/null
+++ b/release/src/router/busybox/testsuite/xargs/xargs-works
@@ -0,0 +1,4 @@
+[ -n "$d" ] || d=..
+find "$d" -name \*works -type f | xargs md5sum > logfile.gnu
+find "$d" -name \*works -type f | busybox xargs md5sum > logfile.bb
+diff -u logfile.gnu logfile.bb