[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/app/busybox/src/testsuite/README b/ap/app/busybox/src/testsuite/README
new file mode 100644
index 0000000..b943a12
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/README
@@ -0,0 +1,52 @@
+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:
+
+./runtest <applet1> <applet2>...
+
+Set SKIP_KNOWN_BUGS environment variable to any non-empty value
+to exclude tests which are known to fail.
+
+Set SKIP_INTERNET_TESTS to exclude tests which require working
+internet connection.
+
+
+Common causes of false positives:
+
+For busybox built against uclibc, /etc/TZ does not exist or does not match
+host system timezone setting. For glibc based host systems, timezone settings
+are in /etc/localtime.
+
+LANG and LC_xxx environment variables set to non-C locale.
+
+
+Developer's notes:
+
+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 should be a shell fragment that returns successfully
+if the test case passes, and unsuccessfully otherwise.
+
+If the test case relies on a certain feature, it should include the string
+"FEATURE: " followed by the name of the feature in a comment.  If it is always
+expected to fail, it should include the string "XFAIL" in a comment.
+
+
+For the entire testsuite, the copyright is as follows:
+
+Copyright (C) 2001, 2002  Matt Kraai
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
diff --git a/ap/app/busybox/src/testsuite/TODO b/ap/app/busybox/src/testsuite/TODO
new file mode 100644
index 0000000..b8957f4
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/TODO
@@ -0,0 +1,26 @@
+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:
+
+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.
diff --git a/ap/app/busybox/src/testsuite/all_sourcecode.tests b/ap/app/busybox/src/testsuite/all_sourcecode.tests
new file mode 100755
index 0000000..7dcbbe8
--- /dev/null
+++ b/ap/app/busybox/src/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 GPLv2, see file LICENSE in this source tree.
+
+[ -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 's:^//::' -e '/^IF_[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|utime|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/ap/app/busybox/src/testsuite/ar.tests b/ap/app/busybox/src/testsuite/ar.tests
new file mode 100755
index 0000000..0a8eb9b
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/ar.tests
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Copyright 2010 Nokia Corporation
+# Written by Alexander Shishkin
+# Licensed under GPLv2 or later, see file LICENSE in this source tree.
+
+. ./testing.sh
+
+# testing "test name" "command(s)" "expected result" "file input" "stdin"
+
+optional FEATURE_AR_CREATE
+
+rm test.a 2>/dev/null
+testing "ar creates archives" \
+       "ar rc test.a README && ar p test.a README | md5sum" \
+       "$(md5sum <README)\n" \
+       "" \
+       ""
+rm test.a
+
+testing "ar replaces things in archives" \
+       "echo 'blah!' >file1 && echo 'blast!' >file2 && ar cr test.a README file1 file2 && mv file2 file1 && ar cr test.a file1 && ar p test.a file1" \
+       "blast!\n" \
+       "" \
+       ""
+rm test.a file1 file1 2>/dev/null
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/ash.tests b/ap/app/busybox/src/testsuite/ash.tests
new file mode 100755
index 0000000..2a99245
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/ash.tests
@@ -0,0 +1,83 @@
+#!/bin/sh
+#
+# These are not ash tests, we use ash as a way to test lineedit!
+#
+# Copyright 2010 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+test -f "$bindir/.config" && . "$bindir/.config"
+
+test x"CONFIG_SCRIPT" = x"y" || exit 0
+test x"CONFIG_HEXDUMP" = x"y" || exit 0
+test x"CONFIG_FEATURE_DEVPTS" = x"y" || exit 0
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+
+if test x"$CONFIG_UNICODE_PRESERVE_BROKEN" = x"y"; then
+testing "One byte which is not valid unicode char followed by valid input" \
+	"script -q -c 'ash' /dev/null >/dev/null; cat ash.output" \
+	"\
+00000000  ff 2d 0a                                          |.-.|
+00000003
+" \
+	"" \
+	"echo \xff- | hexdump -C >ash.output; exit; exit; exit; exit\n"
+
+testing "30 bytes which are not valid unicode chars followed by valid input" \
+	"script -q -c 'ash' /dev/null >/dev/null; cat ash.output" \
+	"\
+00000000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
+00000010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff 2d 0a  |..............-.|
+00000020
+" \
+	"" \
+	"echo \xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff- | hexdump -C >ash.output; exit; exit; exit; exit\n"
+else
+testing "One byte which is not valid unicode char followed by valid input" \
+	"script -q -c 'ash' /dev/null >/dev/null; cat ash.output" \
+	"\
+00000000  3f 2d 0a                                          |?-.|
+00000003
+" \
+	"" \
+	"echo \xff- | hexdump -C >ash.output; exit; exit; exit; exit\n"
+
+testing "30 bytes which are not valid unicode chars followed by valid input" \
+	"script -q -c 'ash' /dev/null >/dev/null; cat ash.output" \
+	"\
+00000000  3f 3f 3f 3f 3f 3f 3f 3f  3f 3f 3f 3f 3f 3f 3f 3f  |????????????????|
+00000010  3f 3f 3f 3f 3f 3f 3f 3f  3f 3f 3f 3f 3f 3f 2d 0a  |??????????????-.|
+00000020
+" \
+	"" \
+	"echo \xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff- | hexdump -C >ash.output; exit; exit; exit; exit\n"
+fi
+
+
+# Not sure this behavior is perfect: we lose all invalid input which precedes
+# arrow keys and such. In this example, \xff\xff are lost
+testing "2 bytes which are not valid unicode chars followed by left arrow key" \
+	"script -q -c 'ash' /dev/null >/dev/null; cat ash.output" \
+	"\
+00000000  3d 2d 0a                                          |=-.|
+00000003
+" \
+	"" \
+	"echo =+\xff\xff\x1b\x5b\x44- | hexdump -C >ash.output; exit; exit; exit; exit\n"
+
+# ash should see "echo \xff\n",pause -> execute it as "echo ?" (which is
+# not checked by the test), then read and execute the rest: "echo A | ..."
+# The bug was that ash was eating the beginning of "echo A" despite the pause.
+testing "Invalid unicode chars followed by a pause do not eat next chars" \
+	"{ $ECHO -ne 'echo \xff\n'; sleep 1; $ECHO -ne 'echo A | hexdump -C >ash.output; exit; exit; exit; exit\n'; } \
+         | script -q -c 'ash' /dev/null >/dev/null; cat ash.output" \
+	"\
+00000000  41 0a                                             |A.|
+00000002
+" \
+	"" ""
+
+rm ash.output
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/awk.tests b/ap/app/busybox/src/testsuite/awk.tests
new file mode 100755
index 0000000..f9c3b6b
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/awk.tests
@@ -0,0 +1,227 @@
+#!/bin/sh
+
+# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com>
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./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"
+
+# conditions and operators
+testing "awk if operator == "  "awk 'BEGIN{if(23==23) print \"foo\"}'" "foo\n" "" ""
+testing "awk if operator != "  "awk 'BEGIN{if(23!=23) print \"bar\"}'" ""      "" ""
+testing "awk if operator >= "  "awk 'BEGIN{if(23>=23) print \"foo\"}'" "foo\n" "" ""
+testing "awk if operator < "   "awk 'BEGIN{if(2 < 13) print \"foo\"}'" "foo\n" "" ""
+testing "awk if string == "    "awk 'BEGIN{if(\"a\"==\"ab\") print \"bar\"}'" "" "" ""
+
+# 4294967295 = 0xffffffff
+testing "awk bitwise op"  "awk '{ print or(4294967295,1) }'" "4.29497e+09\n" "" "\n"
+optional DESKTOP
+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"
+SKIP=
+
+# check that "hex/oct integer" heuristic doesn't kick in on 00NN.NNN
+testing "awk floating const with leading zeroes" \
+	"awk '{ printf \"%f %f\n\", \"000.123\", \"009.123\" }'" \
+	"0.123000 9.123000\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--"
+
+testing "awk -F handles escapes" "awk -F'\\x21' '{print \$1}'" \
+	"a\n" \
+	"" \
+	"a!b\n"
+
+# '@(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"
+
+optional TAR BUNZIP2 FEATURE_SEAMLESS_BZ2
+test x"$SKIP" != x"1" && 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_* 2>/dev/null
+SKIP=
+
+Q='":"'
+
+testing "awk NF in BEGIN" \
+	"awk 'BEGIN { print ${Q} NF ${Q} \$0 ${Q} \$1 ${Q} \$2 ${Q} }'" \
+	":0::::\n" \
+	"" ""
+
+prg='
+function b(tmp) {
+	tmp = 0;
+	print "" tmp; #this line causes the bug
+	return tmp;
+}
+function c(tmpc) {
+	tmpc = b(); return tmpc;
+}
+BEGIN {
+	print (c() ? "string" : "number");
+}'
+testing "awk string cast (bug 725)" \
+	"awk '$prg'" \
+	"0\nnumber\n" \
+	"" ""
+
+testing "awk handles whitespace before array subscript" \
+	"awk 'BEGIN { arr [3] = 1; print arr [3] }'" "1\n" "" ""
+
+# GNU awk 3.1.5's "print ERRNO" prints "No such file or directory" instead of "2",
+# do we need to emulate that as well?
+testing "awk handles non-existing file correctly" \
+	"awk 'BEGIN { getline line <\"doesnt_exist\"; print ERRNO; ERRNO=0; close(\"doesnt_exist\"); print ERRNO; print \"Ok\" }'" \
+	"2\n0\nOk\n" "" ""
+
+prg='
+BEGIN {
+  u["a"]=1
+  u["b"]=1
+  u["c"]=1
+  v["d"]=1
+  v["e"]=1
+  v["f"]=1
+  for (l in u) {
+    print "outer1", l;
+    for (l in v) {
+      print " inner", l;
+    }
+    print "outer2", l;
+  }
+  print "end", l;
+  l="a"
+  exit;
+}'
+testing "awk nested loops with the same variable" \
+	"awk '$prg'" \
+	"\
+outer1 a
+ inner d
+ inner e
+ inner f
+outer2 f
+outer1 b
+ inner d
+ inner e
+ inner f
+outer2 f
+outer1 c
+ inner d
+ inner e
+ inner f
+outer2 f
+end f
+" \
+	"" ""
+
+prg='
+BEGIN {
+  u["a"]=1
+  u["b"]=1
+  u["c"]=1
+  v["d"]=1
+  v["e"]=1
+  v["f"]=1
+  for (l in u) {
+    print "outer1", l;
+    for (l in v) {
+      print " inner", l;
+      break;
+    }
+    print "outer2", l;
+  }
+  print "end", l;
+  l="a"
+  exit;
+}'
+# It's not just buggy, it enters infinite loop. Thus disabled
+false && test x"$SKIP_KNOWN_BUGS" = x"" && testing "awk nested loops with the same variable and break" \
+	"awk '$prg'" \
+	"\
+outer1 a
+ inner d
+outer2 d
+outer1 b
+ inner d
+outer2 d
+outer1 c
+ inner d
+outer2 d
+end d
+" \
+	"" ""
+
+prg='
+function f() {
+  for (l in v) {
+    print " inner", l;
+    return;
+  }
+}
+
+BEGIN {
+  u["a"]=1
+  u["b"]=1
+  u["c"]=1
+  v["d"]=1
+  v["e"]=1
+  v["f"]=1
+  for (l in u) {
+    print "outer1", l;
+    f();
+    print "outer2", l;
+  }
+  print "end", l;
+  l="a"
+  exit;
+}'
+# It's not just buggy, it enters infinite loop. Thus disabled
+false && test x"$SKIP_KNOWN_BUGS" = x"" && testing "awk nested loops with the same variable and return" \
+	"awk '$prg'" \
+	"\
+outer1 a
+ inner d
+outer2 d
+outer1 b
+ inner d
+outer2 d
+outer1 c
+ inner d
+outer2 d
+end d
+" \
+	"" ""
+
+testing "awk handles empty ()" \
+	"awk 'BEGIN {print()}' 2>&1" "awk: cmd. line:1: Empty sequence\n" "" ""
+
+testing "awk FS assignment" "awk '{FS=\":\"; print \$1}'" \
+	"a:b\ne\n" \
+	"" \
+	"a:b c:d\ne:f g:h"
+
+# testing "description" "command" "result" "infile" "stdin"
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/awk_t1.tar.bz2 b/ap/app/busybox/src/testsuite/awk_t1.tar.bz2
new file mode 100644
index 0000000..0fb8a07
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/awk_t1.tar.bz2
Binary files differ
diff --git a/ap/app/busybox/src/testsuite/basename/basename-does-not-remove-identical-extension b/ap/app/busybox/src/testsuite/basename/basename-does-not-remove-identical-extension
new file mode 100644
index 0000000..4448fde
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/basename/basename-does-not-remove-identical-extension
@@ -0,0 +1 @@
+test xfoo = x`busybox basename foo foo`
diff --git a/ap/app/busybox/src/testsuite/basename/basename-works b/ap/app/busybox/src/testsuite/basename/basename-works
new file mode 100644
index 0000000..7140e99
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/basename/basename-works
@@ -0,0 +1 @@
+test x$(basename $(pwd)) = x$(busybox basename $(pwd))
diff --git a/ap/app/busybox/src/testsuite/bunzip2.tests b/ap/app/busybox/src/testsuite/bunzip2.tests
new file mode 100755
index 0000000..fcfce1a
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/bunzip2.tests
@@ -0,0 +1,557 @@
+#!/bin/sh
+# Used by both gunzip and bunzip2 tests
+
+FAILCOUNT=0
+
+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"
+}
+
+pbzip_4m_zeros() {
+$ECHO -ne "\x42\x5a\x68\x31\x31\x41\x59\x26\x53\x59\x63\xe3\xec\xa2\x00\x06"
+$ECHO -ne "\xe4\xc1\x00\xc0\x00\x02\x00\x00\x08\x20\x00\x30\xcc\x09\xaa\x69"
+$ECHO -ne "\x94\xa1\x36\xa9\x28\x4f\x17\x72\x45\x38\x50\x90\x63\xe3\xec\xa2"
+$ECHO -ne "\x42\x5a\x68\x31\x31\x41\x59\x26\x53\x59\x63\xe3\xec\xa2\x00\x06"
+$ECHO -ne "\xe4\xc1\x00\xc0\x00\x02\x00\x00\x08\x20\x00\x30\xcc\x09\xaa\x69"
+$ECHO -ne "\x94\xa1\x36\xa9\x28\x4f\x17\x72\x45\x38\x50\x90\x63\xe3\xec\xa2"
+$ECHO -ne "\x42\x5a\x68\x31\x31\x41\x59\x26\x53\x59\x63\xe3\xec\xa2\x00\x06"
+$ECHO -ne "\xe4\xc1\x00\xc0\x00\x02\x00\x00\x08\x20\x00\x30\xcc\x09\xaa\x69"
+$ECHO -ne "\x94\xa1\x36\xa9\x28\x4f\x17\x72\x45\x38\x50\x90\x63\xe3\xec\xa2"
+$ECHO -ne "\x42\x5a\x68\x31\x31\x41\x59\x26\x53\x59\x63\xe3\xec\xa2\x00\x06"
+$ECHO -ne "\xe4\xc1\x00\xc0\x00\x02\x00\x00\x08\x20\x00\x30\xcc\x09\xaa\x69"
+$ECHO -ne "\x94\xa1\x36\xa9\x28\x4f\x17\x72\x45\x38\x50\x90\x63\xe3\xec\xa2"
+$ECHO -ne "\x42\x5a\x68\x31\x31\x41\x59\x26\x53\x59\xc9\xb5\x21\xef\x00\x04"
+$ECHO -ne "\x8d\x40\x20\xc0\x00\x01\x00\x00\x08\x20\x00\x30\xcc\x05\x29\xa6"
+$ECHO -ne "\x4a\x11\xb1\x4a\x11\xe2\xee\x48\xa7\x0a\x12\x19\x36\xa4\x3d\xe0"
+}
+
+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 "PASS: $1"
+    else
+	echo "FAIL: $1"
+	FAILCOUNT=$((FAILCOUNT + 1))
+    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 "PASS: $unpack: test_bz2 file"
+    else
+	echo "FAIL: $unpack: test_bz2 file"
+	FAILCOUNT=$((FAILCOUNT + 1))
+    fi
+
+    if pbzip_4m_zeros | ${bb}bunzip2 >/dev/null \
+	&& test "`pbzip_4m_zeros | ${bb}bunzip2 | md5sum`" = "b5cfa9d6c8febd618f91ac2843d50a1c  -"
+    then
+	echo "PASS: $unpack: pbzip_4m_zeros file"
+    else
+	echo "FAIL: $unpack: pbzip_4m_zeros file"
+	FAILCOUNT=$((FAILCOUNT + 1))
+    fi
+fi
+
+exit $((FAILCOUNT <= 255 ? FAILCOUNT : 255))
diff --git a/ap/app/busybox/src/testsuite/bunzip2/bunzip2-reads-from-standard-input b/ap/app/busybox/src/testsuite/bunzip2/bunzip2-reads-from-standard-input
new file mode 100644
index 0000000..e212a12
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/bunzip2/bunzip2-reads-from-standard-input
@@ -0,0 +1,2 @@
+echo foo | bzip2 | busybox bunzip2 > output
+echo foo | cmp - output
diff --git a/ap/app/busybox/src/testsuite/bunzip2/bunzip2-removes-compressed-file b/ap/app/busybox/src/testsuite/bunzip2/bunzip2-removes-compressed-file
new file mode 100644
index 0000000..f1d1550
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/bunzip2/bunzip2-removes-compressed-file
@@ -0,0 +1,3 @@
+echo foo | bzip2 >foo.bz2
+busybox bunzip2 foo.bz2
+test ! -f foo.bz2
diff --git a/ap/app/busybox/src/testsuite/bunzip2/bzcat-does-not-remove-compressed-file b/ap/app/busybox/src/testsuite/bunzip2/bzcat-does-not-remove-compressed-file
new file mode 100644
index 0000000..7d4016e
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/bunzip2/bzcat-does-not-remove-compressed-file
@@ -0,0 +1,3 @@
+echo foo | bzip2 >foo.bz2
+busybox bzcat foo.bz2
+test -f foo.bz2
diff --git a/ap/app/busybox/src/testsuite/busybox.tests b/ap/app/busybox/src/testsuite/busybox.tests
new file mode 100755
index 0000000..04fea3e
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/busybox.tests
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# Tests for busybox applet itself.
+# Copyright 2005 by Rob Landley <rob@landley.net>
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+
+HELPDUMP=`true | busybox 2>&1 | cat`
+
+# We need to test under calling the binary under other names.
+
+optional FEATURE_VERBOSE_USAGE
+testing "busybox --help busybox" "true | busybox --help busybox 2>&1 | cat" "$HELPDUMP\n\n" "" ""
+SKIP=
+
+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 FEATURE_VERBOSE_USAGE CAT
+	testing "" "$i cat" "moo" "" "moo"
+	testing "$i --help cat" "$i --help cat 2>&1 | grep print" \
+		"Concatenate FILEs and print them to stdout\n" "" ""
+	SKIP=
+
+	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/ap/app/busybox/src/testsuite/bzcat.tests b/ap/app/busybox/src/testsuite/bzcat.tests
new file mode 100755
index 0000000..1c1fd65
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/bzcat.tests
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+FAILCOUNT=0
+
+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 "PASS: $1"
+    else
+	echo "FAIL: $1"
+	FAILCOUNT=$((FAILCOUNT + 1))
+    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
+
+
+
+# Copyright 2011 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+
+# testing "test name" "command" "expected result" "file input" "stdin"
+
+# "input" file is bzipped file with "a\n" data
+testing "bzcat can print many files" \
+"$ECHO -ne '$hexdump' | bzcat input input; echo \$?" \
+"\
+a
+a
+0
+" "\
+\x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\x63\x3e\xd6\xe2\x00\x00\
+\x00\xc1\x00\x00\x10\x20\x00\x20\x00\x21\x00\x82\xb1\x77\x24\x53\
+\x85\x09\x06\x33\xed\x6e\x20\
+" ""
+
+# "input" file is bzipped zero byte file
+testing "bzcat can handle compressed zero-length bzip2 files" \
+"$ECHO -ne '$hexdump' | bzcat input input; echo \$?" \
+"0\n" \
+"\x42\x5a\x68\x39\x17\x72\x45\x38\x50\x90\x00\x00\x00\x00" ""
+
+
+
+exit $((FAILCOUNT <= 255 ? FAILCOUNT : 255))
diff --git a/ap/app/busybox/src/testsuite/cal.tests b/ap/app/busybox/src/testsuite/cal.tests
new file mode 100755
index 0000000..5509cf0
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cal.tests
@@ -0,0 +1,38 @@
+#!/bin/sh
+# Copyright 2010 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+test -f "$bindir/.config" && . "$bindir/.config"
+
+# testing "test name" "command" "expected result" "file input" "stdin"
+
+testing "cal 2000" "cal 1 2000" "\
+    January 2000
+Su Mo Tu We Th Fr Sa
+                   1
+ 2  3  4  5  6  7  8
+ 9 10 11 12 13 14 15
+16 17 18 19 20 21 22
+23 24 25 26 27 28 29
+30 31
+" "" ""
+
+test x"$CONFIG_LOCALE_SUPPORT" = x"y" \
+&& test x"$CONFIG_UNICODE_SUPPORT" = x"y" \
+&& test x"$CONFIG_LAST_SUPPORTED_WCHAR" = x"0" \
+&& test x"$CONFIG_UNICODE_WIDE_WCHARS" = x"y" \
+&& test x"$CONFIG_STATIC" != x"y" \
+&& test x"$CONFIG_CROSS_COMPILER_PREFIX" = x"" \
+&& testing "unicode cal 2000" "LANG=zh_TW.utf8 cal 1 2000" "\
+    一月 2000
+日 一 二 三 四 五 六
+                   1
+ 2  3  4  5  6  7  8
+ 9 10 11 12 13 14 15
+16 17 18 19 20 21 22
+23 24 25 26 27 28 29
+30 31
+" "" ""
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/cat/cat-prints-a-file b/ap/app/busybox/src/testsuite/cat/cat-prints-a-file
new file mode 100644
index 0000000..e3f35a8
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cat/cat-prints-a-file
@@ -0,0 +1,3 @@
+echo I WANT > foo
+busybox cat foo >bar
+cmp foo bar
diff --git a/ap/app/busybox/src/testsuite/cat/cat-prints-a-file-and-standard-input b/ap/app/busybox/src/testsuite/cat/cat-prints-a-file-and-standard-input
new file mode 100644
index 0000000..bc92318
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cat/cat-prints-a-file-and-standard-input
@@ -0,0 +1,7 @@
+echo I WANT > foo
+echo SOMETHING | busybox cat foo - >bar
+cat >baz <<EOF
+I WANT
+SOMETHING
+EOF
+cmp bar baz
diff --git a/ap/app/busybox/src/testsuite/cmp/cmp-detects-difference b/ap/app/busybox/src/testsuite/cmp/cmp-detects-difference
new file mode 100644
index 0000000..b9bb628
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cmp/cmp-detects-difference
@@ -0,0 +1,9 @@
+echo foo >foo
+echo bar >bar
+set +e
+busybox cmp -s foo bar
+if [ $? != 0 ] ; then
+	exit 0;
+fi
+
+exit 1;
diff --git a/ap/app/busybox/src/testsuite/comm.tests b/ap/app/busybox/src/testsuite/comm.tests
new file mode 100755
index 0000000..2f48168
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/comm.tests
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# Copyright 2008 by Denys Vlasenko <vda.linux@googlemail.com>
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./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/ap/app/busybox/src/testsuite/cp.tests b/ap/app/busybox/src/testsuite/cp.tests
new file mode 100755
index 0000000..33cd876
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cp.tests
@@ -0,0 +1,206 @@
+#!/bin/sh
+# Copyright 2010 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+
+# Opening quote in "omitting directory 'dir'" message:
+sq='`'  # GNU cp: `
+sq="'"  # bbox cp: '
+
+rm -rf cp.testdir >/dev/null
+
+mkdir cp.testdir
+mkdir cp.testdir/dir
+> cp.testdir/dir/file
+ln -s file cp.testdir/dir/file_symlink
+
+> cp.testdir/file
+ln -s file cp.testdir/file_symlink
+ln -s dir cp.testdir/dir_symlink
+
+
+# testing "test name" "command" "expected result" "file input" "stdin"
+
+rm -rf cp.testdir2 >/dev/null && mkdir cp.testdir2 || exit 1
+testing "cp" '\
+cd cp.testdir || exit 1; cp * ../cp.testdir2 2>&1; echo $?; cd ../cp.testdir2 || exit 1
+test ! -L file         && test   -f file             || echo BAD: file
+test ! -L file_symlink && test   -f file_symlink     || echo BAD: file_symlink
+test ! -L dir          && test ! -e dir              || echo BAD: dir
+test ! -L dir_symlink  && test ! -e dir_symlink      || echo BAD: dir_symlink
+' "\
+cp: omitting directory ${sq}dir'
+cp: omitting directory ${sq}dir_symlink'
+1
+" "" ""
+
+rm -rf cp.testdir2 >/dev/null && mkdir cp.testdir2 || exit 1
+testing "cp -d" '\
+cd cp.testdir || exit 1; cp -d * ../cp.testdir2 2>&1; echo $?; cd ../cp.testdir2 || exit 1
+test ! -L file         && test   -f file             || echo BAD: file
+test   -L file_symlink && test   -f file_symlink     || echo BAD: file_symlink
+test ! -L dir          && test ! -e dir              || echo BAD: dir
+test   -L dir_symlink  && test ! -e dir_symlink      || echo BAD: dir_symlink
+' "\
+cp: omitting directory ${sq}dir'
+1
+" "" ""
+
+rm -rf cp.testdir2 >/dev/null && mkdir cp.testdir2 || exit 1
+testing "cp -P" '\
+cd cp.testdir || exit 1; cp -P * ../cp.testdir2 2>&1; echo $?; cd ../cp.testdir2 || exit 1
+test ! -L file         && test   -f file             || echo BAD: file
+test   -L file_symlink && test   -f file_symlink     || echo BAD: file_symlink
+test ! -L dir          && test ! -e dir              || echo BAD: dir
+test   -L dir_symlink  && test ! -e dir_symlink      || echo BAD: dir_symlink
+' "\
+cp: omitting directory ${sq}dir'
+1
+" "" ""
+
+rm -rf cp.testdir2 >/dev/null && mkdir cp.testdir2 || exit 1
+testing "cp -L" '\
+cd cp.testdir || exit 1; cp -L * ../cp.testdir2 2>&1; echo $?; cd ../cp.testdir2 || exit 1
+test ! -L file         && test   -f file             || echo BAD: file
+test ! -L file_symlink && test   -f file_symlink     || echo BAD: file_symlink
+test ! -L dir          && test ! -e dir              || echo BAD: dir
+test ! -L dir_symlink  && test ! -e dir_symlink      || echo BAD: dir_symlink
+' "\
+cp: omitting directory ${sq}dir'
+cp: omitting directory ${sq}dir_symlink'
+1
+" "" ""
+
+rm -rf cp.testdir2 >/dev/null && mkdir cp.testdir2 || exit 1
+testing "cp -H" '\
+cd cp.testdir || exit 1; cp -H * ../cp.testdir2 2>&1; echo $?; cd ../cp.testdir2 || exit 1
+test ! -L file         && test   -f file             || echo BAD: file
+test ! -L file_symlink && test   -f file_symlink     || echo BAD: file_symlink
+test ! -L dir          && test ! -e dir              || echo BAD: dir
+test ! -L dir_symlink  && test ! -e dir_symlink      || echo BAD: dir_symlink
+' "\
+cp: omitting directory ${sq}dir'
+cp: omitting directory ${sq}dir_symlink'
+1
+" "" ""
+
+rm -rf cp.testdir2 >/dev/null && mkdir cp.testdir2 || exit 1
+testing "cp -R" '\
+cd cp.testdir || exit 1; cp -R * ../cp.testdir2 2>&1; echo $?; cd ../cp.testdir2 || exit 1
+test ! -L file             && test   -f file             || echo BAD: file
+test   -L file_symlink     && test   -f file_symlink     || echo BAD: file_symlink
+test ! -L dir              && test   -d dir              || echo BAD: dir
+test   -L dir_symlink      && test   -d dir_symlink      || echo BAD: dir_symlink
+test ! -L dir/file         && test   -f dir/file         || echo BAD: dir/file
+test   -L dir/file_symlink && test   -f dir/file_symlink || echo BAD: dir/file_symlink
+' "\
+0
+" "" ""
+
+rm -rf cp.testdir2 >/dev/null && mkdir cp.testdir2 || exit 1
+testing "cp -Rd" '\
+cd cp.testdir || exit 1; cp -Rd * ../cp.testdir2 2>&1; echo $?; cd ../cp.testdir2 || exit 1
+test ! -L file             && test   -f file             || echo BAD: file
+test   -L file_symlink     && test   -f file_symlink     || echo BAD: file_symlink
+test ! -L dir              && test   -d dir              || echo BAD: dir
+test   -L dir_symlink      && test   -d dir_symlink      || echo BAD: dir_symlink
+test ! -L dir/file         && test   -f dir/file         || echo BAD: dir/file
+test   -L dir/file_symlink && test   -f dir/file_symlink || echo BAD: dir/file_symlink
+' "\
+0
+" "" ""
+
+rm -rf cp.testdir2 >/dev/null && mkdir cp.testdir2 || exit 1
+testing "cp -RP" '\
+cd cp.testdir || exit 1; cp -RP * ../cp.testdir2 2>&1; echo $?; cd ../cp.testdir2 || exit 1
+test ! -L file             && test   -f file             || echo BAD: file
+test   -L file_symlink     && test   -f file_symlink     || echo BAD: file_symlink
+test ! -L dir              && test   -d dir              || echo BAD: dir
+test   -L dir_symlink      && test   -d dir_symlink      || echo BAD: dir_symlink
+test ! -L dir/file         && test   -f dir/file         || echo BAD: dir/file
+test   -L dir/file_symlink && test   -f dir/file_symlink || echo BAD: dir/file_symlink
+' "\
+0
+" "" ""
+
+rm -rf cp.testdir2 >/dev/null && mkdir cp.testdir2 || exit 1
+testing "cp -RL" '\
+cd cp.testdir || exit 1; cp -RL * ../cp.testdir2 2>&1; echo $?; cd ../cp.testdir2 || exit 1
+test ! -L file             && test   -f file             || echo BAD: file
+test ! -L file_symlink     && test   -f file_symlink     || echo BAD: file_symlink
+test ! -L dir              && test   -d dir              || echo BAD: dir
+test ! -L dir_symlink      && test   -d dir_symlink      || echo BAD: dir_symlink
+test ! -L dir/file         && test   -f dir/file         || echo BAD: dir/file
+test ! -L dir/file_symlink && test   -f dir/file_symlink || echo BAD: dir/file_symlink
+' "\
+0
+" "" ""
+
+rm -rf cp.testdir2 >/dev/null && mkdir cp.testdir2 || exit 1
+# GNU coreutils 7.2 says:
+# cp: will not create hard link `../cp.testdir2/dir_symlink' to directory `../cp.testdir2/dir'
+test x"$SKIP_KNOWN_BUGS" = x"" && \
+testing "cp -RH" '\
+cd cp.testdir || exit 1; cp -RH * ../cp.testdir2 2>&1; echo $?; cd ../cp.testdir2 || exit 1
+test ! -L file             && test   -f file             || echo BAD: file
+test ! -L file_symlink     && test   -f file_symlink     || echo BAD: file_symlink
+test ! -L dir              && test   -d dir              || echo BAD: dir
+test ! -L dir_symlink      && test   -d dir_symlink      || echo BAD: dir_symlink
+test ! -L dir/file         && test   -f dir/file         || echo BAD: dir/file
+test   -L dir/file_symlink && test   -f dir/file_symlink || echo BAD: dir/file_symlink
+' "\
+0
+" "" ""
+
+rm -rf cp.testdir2 >/dev/null && mkdir cp.testdir2 || exit 1
+# GNU coreutils 7.2 says:
+# cp: will not create hard link `../cp.testdir2/dir_symlink' to directory `../cp.testdir2/dir'
+test x"$SKIP_KNOWN_BUGS" = x"" && \
+testing "cp -RHP" '\
+cd cp.testdir || exit 1; cp -RHP * ../cp.testdir2 2>&1; echo $?; cd ../cp.testdir2 || exit 1
+test ! -L file             && test   -f file             || echo BAD: file
+test ! -L file_symlink     && test   -f file_symlink     || echo BAD: file_symlink
+test ! -L dir              && test   -d dir              || echo BAD: dir
+test ! -L dir_symlink      && test   -d dir_symlink      || echo BAD: dir_symlink
+test ! -L dir/file         && test   -f dir/file         || echo BAD: dir/file
+test   -L dir/file_symlink && test   -f dir/file_symlink || echo BAD: dir/file_symlink
+' "\
+0
+" "" ""
+
+rm -rf cp.testdir2 >/dev/null && mkdir cp.testdir2 || exit 1
+testing "cp -RHL" '\
+cd cp.testdir || exit 1; cp -RHL * ../cp.testdir2 2>&1; echo $?; cd ../cp.testdir2 || exit 1
+test ! -L file             && test   -f file             || echo BAD: file
+test ! -L file_symlink     && test   -f file_symlink     || echo BAD: file_symlink
+test ! -L dir              && test   -d dir              || echo BAD: dir
+test ! -L dir_symlink      && test   -d dir_symlink      || echo BAD: dir_symlink
+test ! -L dir/file         && test   -f dir/file         || echo BAD: dir/file
+test ! -L dir/file_symlink && test   -f dir/file_symlink || echo BAD: dir/file_symlink
+' "\
+0
+" "" ""
+
+rm -rf cp.testdir2 >/dev/null && mkdir cp.testdir2 || exit 1
+# Wow! "cp -RLH" is not the same as "cp -RHL" (prev test)!
+# GNU coreutils 7.2 says:
+# cp: will not create hard link `../cp.testdir2/dir_symlink' to directory `../cp.testdir2/dir'
+test x"$SKIP_KNOWN_BUGS" = x"" && \
+testing "cp -RLH" '\
+cd cp.testdir || exit 1; cp -RLH * ../cp.testdir2 2>&1; echo $?; cd ../cp.testdir2 || exit 1
+test ! -L file             && test   -f file             || echo BAD: file
+test ! -L file_symlink     && test   -f file_symlink     || echo BAD: file_symlink
+test ! -L dir              && test   -d dir              || echo BAD: dir
+test ! -L dir_symlink      && test   -d dir_symlink      || echo BAD: dir_symlink
+test ! -L dir/file         && test   -f dir/file         || echo BAD: dir/file
+test ! -L dir/file_symlink && test   -f dir/file_symlink || echo BAD: dir/file_symlink
+' "\
+0
+" "" ""
+
+
+# Clean up
+rm -rf cp.testdir cp.testdir2 2>/dev/null
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/cp/cp-RHL-does_not_preserve-links b/ap/app/busybox/src/testsuite/cp/cp-RHL-does_not_preserve-links
new file mode 100644
index 0000000..eed6c3e
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/cp/cp-a-files-to-dir b/ap/app/busybox/src/testsuite/cp/cp-a-files-to-dir
new file mode 100644
index 0000000..b199ef9
--- /dev/null
+++ b/ap/app/busybox/src/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???
+#TZ=UTC0 touch -d '2000-01-30 05:24:08' 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/ap/app/busybox/src/testsuite/cp/cp-a-preserves-links b/ap/app/busybox/src/testsuite/cp/cp-a-preserves-links
new file mode 100644
index 0000000..0c0cd96
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/cp/cp-copies-empty-file b/ap/app/busybox/src/testsuite/cp/cp-copies-empty-file
new file mode 100644
index 0000000..ad25aa1
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cp/cp-copies-empty-file
@@ -0,0 +1,3 @@
+touch foo
+busybox cp foo bar
+cmp foo bar
diff --git a/ap/app/busybox/src/testsuite/cp/cp-copies-large-file b/ap/app/busybox/src/testsuite/cp/cp-copies-large-file
new file mode 100644
index 0000000..c2225c6
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cp/cp-copies-large-file
@@ -0,0 +1,3 @@
+dd if=/dev/zero of=foo seek=10k count=1 2>/dev/null
+busybox cp foo bar
+cmp foo bar
diff --git a/ap/app/busybox/src/testsuite/cp/cp-copies-small-file b/ap/app/busybox/src/testsuite/cp/cp-copies-small-file
new file mode 100644
index 0000000..d52a887
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cp/cp-copies-small-file
@@ -0,0 +1,3 @@
+echo I WANT > foo
+busybox cp foo bar
+cmp foo bar
diff --git a/ap/app/busybox/src/testsuite/cp/cp-d-files-to-dir b/ap/app/busybox/src/testsuite/cp/cp-d-files-to-dir
new file mode 100644
index 0000000..9571a56
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/cp/cp-dev-file b/ap/app/busybox/src/testsuite/cp/cp-dev-file
new file mode 100644
index 0000000..055f0d9
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cp/cp-dev-file
@@ -0,0 +1,2 @@
+busybox cp /dev/null foo
+test -f foo
diff --git a/ap/app/busybox/src/testsuite/cp/cp-dir-create-dir b/ap/app/busybox/src/testsuite/cp/cp-dir-create-dir
new file mode 100644
index 0000000..a8d7b50
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/cp/cp-dir-existing-dir b/ap/app/busybox/src/testsuite/cp/cp-dir-existing-dir
new file mode 100644
index 0000000..4c788ba
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/cp/cp-does-not-copy-unreadable-file b/ap/app/busybox/src/testsuite/cp/cp-does-not-copy-unreadable-file
new file mode 100644
index 0000000..e17e8e6
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cp/cp-does-not-copy-unreadable-file
@@ -0,0 +1,11 @@
+touch foo
+chmod a-r foo
+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/ap/app/busybox/src/testsuite/cp/cp-files-to-dir b/ap/app/busybox/src/testsuite/cp/cp-files-to-dir
new file mode 100644
index 0000000..fdb8191
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/cp/cp-follows-links b/ap/app/busybox/src/testsuite/cp/cp-follows-links
new file mode 100644
index 0000000..2d9f05e
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cp/cp-follows-links
@@ -0,0 +1,4 @@
+touch foo
+ln -s foo bar
+busybox cp bar baz
+test -f baz
diff --git a/ap/app/busybox/src/testsuite/cp/cp-parents b/ap/app/busybox/src/testsuite/cp/cp-parents
new file mode 100644
index 0000000..e27c162
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cp/cp-parents
@@ -0,0 +1,6 @@
+# FEATURE: CONFIG_FEATURE_CP_LONG_OPTIONS
+mkdir -p foo/bar/baz
+touch foo/bar/baz/file
+mkdir dir
+busybox cp --parents foo/bar/baz/file dir
+test -f dir/foo/bar/baz/file
diff --git a/ap/app/busybox/src/testsuite/cp/cp-preserves-hard-links b/ap/app/busybox/src/testsuite/cp/cp-preserves-hard-links
new file mode 100644
index 0000000..4de7b85
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cp/cp-preserves-hard-links
@@ -0,0 +1,6 @@
+# FEATURE: CONFIG_FEATURE_PRESERVE_HARDLINKS
+touch foo
+ln foo bar
+mkdir baz
+busybox cp -d foo bar baz
+test baz/foo -ef baz/bar
diff --git a/ap/app/busybox/src/testsuite/cp/cp-preserves-links b/ap/app/busybox/src/testsuite/cp/cp-preserves-links
new file mode 100644
index 0000000..301dc5f
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cp/cp-preserves-links
@@ -0,0 +1,5 @@
+touch foo
+ln -s foo bar
+busybox cp -d bar baz
+test -L baz
+test xfoo = x`readlink baz`
diff --git a/ap/app/busybox/src/testsuite/cp/cp-preserves-source-file b/ap/app/busybox/src/testsuite/cp/cp-preserves-source-file
new file mode 100644
index 0000000..f0f5065
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cp/cp-preserves-source-file
@@ -0,0 +1,3 @@
+touch foo
+busybox cp foo bar
+test -f foo
diff --git a/ap/app/busybox/src/testsuite/cpio.tests b/ap/app/busybox/src/testsuite/cpio.tests
new file mode 100755
index 0000000..4cd441a
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cpio.tests
@@ -0,0 +1,133 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+
+umask 022
+
+# ls -ln shows date. Need to remove that, it's variable.
+# sed: coalesce spaces
+# cut: remove date
+# grep: remove "total NNN" lines
+FILTER_LS="sed 's/  */ /g' | cut -d' ' -f 1-5,9- | grep -v '^total '"
+
+
+# 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"
+
+optional FEATURE_LS_SORTFILES FEATURE_LS_TIMESTAMPS
+testing "cpio extracts zero-sized hardlinks" \
+"$ECHO -ne '$hexdump' | bzcat | cpio -i 2>&1; 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
+" "" ""
+SKIP=
+
+
+test x"$SKIP_KNOWN_BUGS" = x"" && {
+# Currently fails. Numerous buglets: "1 blocks" versus "1 block",
+# does not list cpio.testdir/x and cpio.testdir/y
+testing "cpio lists hardlinks" \
+"$ECHO -ne '$hexdump' | bzcat | cpio -t 2>&1; echo \$?" \
+"\
+cpio.testdir
+cpio.testdir/x
+cpio.testdir/y
+1 blocks
+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
+
+optional FEATURE_CPIO_O LONG_OPTS FEATURE_LS_SORTFILES FEATURE_LS_TIMESTAMPS
+testing "cpio extracts zero-sized hardlinks 2" \
+"find cpio.testdir | cpio -H newc --create | (cd cpio.testdir2 && cpio -i 2>&1); echo \$?;
+ls -ln cpio.testdir2/cpio.testdir | $FILTER_LS" \
+"\
+2 blocks
+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
+" "" ""
+SKIP=
+
+# Was trying to create "/usr/bin", correct is "usr/bin".
+rm -rf cpio.testdir
+optional FEATURE_CPIO_P
+testing "cpio -p with absolute paths" \
+"echo /usr/bin | cpio -dp cpio.testdir 2>&1; echo \$?;
+ls cpio.testdir" \
+"\
+1 blocks
+0
+usr
+" "" ""
+SKIP=
+
+# chown on a link was affecting file, dropping its suid/sgid bits
+rm -rf cpio.testdir
+optional FEATURE_CPIO_O FEATURE_STAT_FORMAT
+mkdir cpio.testdir
+touch cpio.testdir/file
+chmod 6755 cpio.testdir/file  # sets suid/sgid bits
+ln -sf file cpio.testdir/link
+testing "cpio restores suid/sgid bits" \
+"cd cpio.testdir && { echo file; echo link; } | cpio -ovHnewc >pack.cpio && rm ???? && cpio -idmvu <pack.cpio 2>/dev/null;
+ stat -c '%a %n' file" \
+"\
+file
+link
+6755 file
+" "" ""
+SKIP=
+
+# avoid 'not created: newer or same age file exists' message for directories
+rm -rf cpio.testdir cpio.testdir2 2>/dev/null
+mkdir cpio.testdir
+testing "cpio extracts in existing directory" \
+"$ECHO -ne '$hexdump' | bzcat | cpio -id 2>&1; echo \$?" \
+"\
+1 blocks
+0
+" "" ""
+SKIP=
+
+# Clean up
+rm -rf cpio.testdir cpio.testdir2 2>/dev/null
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/cut.tests b/ap/app/busybox/src/testsuite/cut.tests
new file mode 100755
index 0000000..1103402
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cut.tests
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com>
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./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/ap/app/busybox/src/testsuite/cut/cut-cuts-a-character b/ap/app/busybox/src/testsuite/cut/cut-cuts-a-character
new file mode 100644
index 0000000..d6c5efa
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cut/cut-cuts-a-character
@@ -0,0 +1 @@
+test $(echo abcd | busybox cut -c 3) = c
diff --git a/ap/app/busybox/src/testsuite/cut/cut-cuts-a-closed-range b/ap/app/busybox/src/testsuite/cut/cut-cuts-a-closed-range
new file mode 100644
index 0000000..9680b76
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cut/cut-cuts-a-closed-range
@@ -0,0 +1 @@
+test $(echo abcd | busybox cut -c 1-2) = ab
diff --git a/ap/app/busybox/src/testsuite/cut/cut-cuts-a-field b/ap/app/busybox/src/testsuite/cut/cut-cuts-a-field
new file mode 100644
index 0000000..e200b6b
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cut/cut-cuts-a-field
@@ -0,0 +1 @@
+test $($ECHO -e "f1\tf2\tf3" | busybox cut -f 2) = f2
diff --git a/ap/app/busybox/src/testsuite/cut/cut-cuts-an-open-range b/ap/app/busybox/src/testsuite/cut/cut-cuts-an-open-range
new file mode 100644
index 0000000..1fbf277
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cut/cut-cuts-an-open-range
@@ -0,0 +1 @@
+test $(echo abcd | busybox cut -c -3) = abc
diff --git a/ap/app/busybox/src/testsuite/cut/cut-cuts-an-unclosed-range b/ap/app/busybox/src/testsuite/cut/cut-cuts-an-unclosed-range
new file mode 100644
index 0000000..a2b0cdb
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/cut/cut-cuts-an-unclosed-range
@@ -0,0 +1 @@
+test $(echo abcd | busybox cut -c 3-) = cd
diff --git a/ap/app/busybox/src/testsuite/date/date-@-works b/ap/app/busybox/src/testsuite/date/date-@-works
new file mode 100644
index 0000000..03b4c7f
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/date/date-@-works
@@ -0,0 +1,13 @@
+# Tests for time_t value (unix time format)
+
+# Just before DST switched off
+test x"Sun Oct 31 03:59:59 EEST 2010" = x"`TZ=EET-2EEST,M3.5.0/3,M10.5.0/4 busybox date -d @1288486799`"
+
+# Just after DST switched off
+test x"Sun Oct 31 03:00:01 EET 2010" = x"`TZ=EET-2EEST,M3.5.0/3,M10.5.0/4 busybox date -d @1288486801`"
+
+# Just before DST switched on
+test x"Sun Mar 28 02:59:59 EET 2010" = x"`TZ=EET-2EEST,M3.5.0/3,M10.5.0/4 busybox date -d @1269737999`"
+
+# Just after DST switched on
+test x"Sun Mar 28 04:00:01 EEST 2010" = x"`TZ=EET-2EEST,M3.5.0/3,M10.5.0/4 busybox date -d @1269738001`"
diff --git a/ap/app/busybox/src/testsuite/date/date-R-works b/ap/app/busybox/src/testsuite/date/date-R-works
new file mode 100644
index 0000000..81378cc
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/date/date-R-works
@@ -0,0 +1,13 @@
+# When different date's use time() and clock_gettime(),
+# seconds transition may not happen at _exactly_ the same moment.
+# Therefore we try it several times.
+
+test x"`date -R`" = x"`busybox date -R`" && exit 0 || true
+test x"`date -R`" = x"`busybox date -R`" && exit 0 || true
+test x"`date -R`" = x"`busybox date -R`" && exit 0 || true
+test x"`date -R`" = x"`busybox date -R`" && exit 0 || true
+test x"`date -R`" = x"`busybox date -R`" && exit 0 || true
+test x"`date -R`" = x"`busybox date -R`" && exit 0 || true
+test x"`date -R`" = x"`busybox date -R`" && exit 0 || true
+test x"`date -R`" = x"`busybox date -R`" && exit 0 || true
+false
diff --git a/ap/app/busybox/src/testsuite/date/date-format-works b/ap/app/busybox/src/testsuite/date/date-format-works
new file mode 100644
index 0000000..f2a2091
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/date/date-u-works b/ap/app/busybox/src/testsuite/date/date-u-works
new file mode 100644
index 0000000..eea6e5a
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/date/date-works b/ap/app/busybox/src/testsuite/date/date-works
new file mode 100644
index 0000000..901c485
--- /dev/null
+++ b/ap/app/busybox/src/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 200001231133`
+dt=`echo "$dt" | cut -b1-19`
+test x"$dt" = x"Sun Jan 23 11:33:00"
+
+dt=`busybox date -d 200001231133.30`
+dt=`echo "$dt" | cut -b1-19`
+test x"$dt" = x"Sun Jan 23 11:33:30"
diff --git a/ap/app/busybox/src/testsuite/date/date-works-1 b/ap/app/busybox/src/testsuite/date/date-works-1
new file mode 100644
index 0000000..cb5cea2
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/date/date-works-1
@@ -0,0 +1,134 @@
+unset LANG
+unset LANGUAGE
+unset LC_TIME
+unset LC_ALL
+
+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 200001231133 +%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 200001231133.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/ap/app/busybox/src/testsuite/dd/dd-accepts-if b/ap/app/busybox/src/testsuite/dd/dd-accepts-if
new file mode 100644
index 0000000..03d1af8
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/dd/dd-accepts-if
@@ -0,0 +1,2 @@
+echo I WANT >foo
+test "$(busybox dd if=foo 2>/dev/null)" = "I WANT"
diff --git a/ap/app/busybox/src/testsuite/dd/dd-accepts-of b/ap/app/busybox/src/testsuite/dd/dd-accepts-of
new file mode 100644
index 0000000..84405e6
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/dd/dd-accepts-of
@@ -0,0 +1,2 @@
+echo I WANT | busybox dd of=foo 2>/dev/null
+echo I WANT | cmp foo -
diff --git a/ap/app/busybox/src/testsuite/dd/dd-copies-from-standard-input-to-standard-output b/ap/app/busybox/src/testsuite/dd/dd-copies-from-standard-input-to-standard-output
new file mode 100644
index 0000000..d890eb0
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/dd/dd-copies-from-standard-input-to-standard-output
@@ -0,0 +1 @@
+test "$(echo I WANT | busybox dd 2>/dev/null)" = "I WANT"
diff --git a/ap/app/busybox/src/testsuite/dd/dd-prints-count-to-standard-error b/ap/app/busybox/src/testsuite/dd/dd-prints-count-to-standard-error
new file mode 100644
index 0000000..2187dc0
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/dd/dd-prints-count-to-standard-error
@@ -0,0 +1,2 @@
+echo I WANT | busybox dd of=foo >/dev/null 2>bar
+grep -q records bar
diff --git a/ap/app/busybox/src/testsuite/dd/dd-reports-write-errors b/ap/app/busybox/src/testsuite/dd/dd-reports-write-errors
new file mode 100644
index 0000000..4920600
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/diff.tests b/ap/app/busybox/src/testsuite/diff.tests
new file mode 100755
index 0000000..6de4648
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/diff.tests
@@ -0,0 +1,217 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+
+# testing "test name" "commands" "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 "diff of empty file against nonempty one" \
+	"diff -u - input | $TRIM_TAB" \
+"\
+--- -
++++ input
+@@ -0,0 +1 @@
++a
+" \
+	"a\n" \
+	""
+
+testing "diff -b treats EOF as whitespace" \
+	'diff -ub - input; echo $?' \
+	"0\n" \
+	"abc" \
+	"abc "
+
+testing "diff -b treats all spaces as equal" \
+	'diff -ub - input; echo $?' \
+	"0\n" \
+	"a \t c\n" \
+	"a\t \tc\n"
+
+testing "diff -B ignores changes whose lines are all blank" \
+	'diff -uB - input; echo $?' \
+	"0\n" \
+	"a\n" \
+	"\na\n\n"
+
+testing "diff -B does not ignore changes whose lines are not all blank" \
+	"diff -uB - input | $TRIM_TAB" \
+"\
+--- -
++++ input
+@@ -1,3 +1 @@
+-
+-b
+-
++a
+" \
+	"a\n" \
+	"\nb\n\n"
+
+testing "diff always takes context from old file" \
+	"diff -ub - input | $TRIM_TAB" \
+"\
+--- -
++++ input
+@@ -1 +1,3 @@
++abc
+ a c
++def
+" \
+	"abc\na  c\ndef\n" \
+	"a c\n"
+
+# testing "test name" "commands" "expected result" "file input" "stdin"
+
+# clean up
+rm -rf diff1 diff2
+
+mkdir diff1 diff2 diff2/subdir
+echo qwe >diff1/-
+echo asd >diff2/subdir/-
+optional FEATURE_DIFF_DIR
+testing "diff diff1 diff2/subdir" \
+	"diff -ur diff1 diff2/subdir | $TRIM_TAB" \
+"\
+--- diff1/-
++++ diff2/subdir/-
+@@ -1 +1 @@
+-qwe
++asd
+" \
+	"" ""
+SKIP=
+
+# using directory structure from prev test...
+optional FEATURE_DIFF_DIR
+testing "diff dir dir2/file/-" \
+	"diff -ur diff1 diff2/subdir/- | $TRIM_TAB" \
+"\
+--- diff1/-
++++ diff2/subdir/-
+@@ -1 +1 @@
+-qwe
++asd
+" \
+	"" ""
+SKIP=
+
+# using directory structure from prev test...
+mkdir diff1/test
+mkfifo diff2/subdir/test
+optional FEATURE_DIFF_DIR
+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
+" \
+	"" ""
+SKIP=
+
+# using directory structure from prev test...
+rmdir diff1/test
+echo >diff1/test
+optional FEATURE_DIFF_DIR
+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
+" \
+	"" ""
+SKIP=
+
+# using directory structure from prev test...
+mkfifo diff1/test2
+optional FEATURE_DIFF_DIR
+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
+" \
+	"" ""
+SKIP=
+
+# clean up
+rm -rf diff1 diff2
+
+# NOT using directory structure from prev test...
+mkdir diff1 diff2
+echo qwe >diff1/-
+echo rty >diff2/-
+optional FEATURE_DIFF_DIR
+testing "diff diff1 diff2/" \
+	"diff -ur diff1 diff2/ | $TRIM_TAB; diff -ur .///diff1 diff2//// | $TRIM_TAB" \
+"\
+--- diff1/-
++++ diff2/-
+@@ -1 +1 @@
+-qwe
++rty
+--- .///diff1/-
++++ diff2////-
+@@ -1 +1 @@
+-qwe
++rty
+" \
+	"" ""
+SKIP=
+
+# clean up
+rm -rf diff1 diff2
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/dirname/dirname-handles-absolute-path b/ap/app/busybox/src/testsuite/dirname/dirname-handles-absolute-path
new file mode 100644
index 0000000..ca1a51b
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/dirname/dirname-handles-absolute-path
@@ -0,0 +1 @@
+test $(busybox dirname /foo/bar/baz) = /foo/bar
diff --git a/ap/app/busybox/src/testsuite/dirname/dirname-handles-empty-path b/ap/app/busybox/src/testsuite/dirname/dirname-handles-empty-path
new file mode 100644
index 0000000..04134a5
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/dirname/dirname-handles-empty-path
@@ -0,0 +1 @@
+test $(busybox dirname '') = .
diff --git a/ap/app/busybox/src/testsuite/dirname/dirname-handles-multiple-slashes b/ap/app/busybox/src/testsuite/dirname/dirname-handles-multiple-slashes
new file mode 100644
index 0000000..286f253
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/dirname/dirname-handles-multiple-slashes
@@ -0,0 +1 @@
+test $(busybox dirname foo/bar///baz) = foo/bar
diff --git a/ap/app/busybox/src/testsuite/dirname/dirname-handles-relative-path b/ap/app/busybox/src/testsuite/dirname/dirname-handles-relative-path
new file mode 100644
index 0000000..ffe4ab4
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/dirname/dirname-handles-relative-path
@@ -0,0 +1 @@
+test $(busybox dirname foo/bar/baz) = foo/bar
diff --git a/ap/app/busybox/src/testsuite/dirname/dirname-handles-root b/ap/app/busybox/src/testsuite/dirname/dirname-handles-root
new file mode 100644
index 0000000..6bd62b8
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/dirname/dirname-handles-root
@@ -0,0 +1 @@
+test $(busybox dirname /) = /
diff --git a/ap/app/busybox/src/testsuite/dirname/dirname-handles-single-component b/ap/app/busybox/src/testsuite/dirname/dirname-handles-single-component
new file mode 100644
index 0000000..24f9ae1
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/dirname/dirname-handles-single-component
@@ -0,0 +1 @@
+test $(busybox dirname foo) = .
diff --git a/ap/app/busybox/src/testsuite/dirname/dirname-works b/ap/app/busybox/src/testsuite/dirname/dirname-works
new file mode 100644
index 0000000..d673dd9
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/dirname/dirname-works
@@ -0,0 +1 @@
+test x$(dirname $(pwd)) = x$(busybox dirname $(pwd))
diff --git a/ap/app/busybox/src/testsuite/du/du-h-works b/ap/app/busybox/src/testsuite/du/du-h-works
new file mode 100644
index 0000000..1c77b65
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/du/du-h-works
@@ -0,0 +1,4 @@
+# FEATURE: CONFIG_FEATURE_HUMAN_READABLE
+
+dd if=/dev/zero of=file bs=1M count=1 2>/dev/null
+test x"`busybox du -h file`" = x"1.0M	file"
diff --git a/ap/app/busybox/src/testsuite/du/du-k-works b/ap/app/busybox/src/testsuite/du/du-k-works
new file mode 100644
index 0000000..36dcaa8
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/du/du-k-works
@@ -0,0 +1,7 @@
+mkdir du.testdir
+cd du.testdir
+dd if=/dev/zero of=file1 bs=1k count=64 2>/dev/null
+dd if=/dev/zero of=file2 bs=1k count=16 2>/dev/null
+test x"`busybox du -k .`" = x"80	." \
+  -o x"`busybox du -k .`" = x"84	." \
+  -o x"`busybox du -k .`" = x"88	."
diff --git a/ap/app/busybox/src/testsuite/du/du-l-works b/ap/app/busybox/src/testsuite/du/du-l-works
new file mode 100644
index 0000000..426ee89
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/du/du-l-works
@@ -0,0 +1,11 @@
+# FEATURE: CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
+
+mkdir du.testdir
+cd du.testdir
+dd if=/dev/zero of=file1 bs=1k count=64 2>/dev/null
+ln file1 file1.1
+dd if=/dev/zero of=file2 bs=1k count=16 2>/dev/null
+test x"`busybox du -l .`" = x"144	." \
+  -o x"`busybox du -l .`" = x"148	." \
+  -o x"`busybox du -l .`" = x"152	." \
+  -o x"`busybox du -l .`" = x"156	."
diff --git a/ap/app/busybox/src/testsuite/du/du-m-works b/ap/app/busybox/src/testsuite/du/du-m-works
new file mode 100644
index 0000000..9fa7437
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/du/du-m-works
@@ -0,0 +1,4 @@
+# FEATURE: CONFIG_FEATURE_HUMAN_READABLE
+
+dd if=/dev/zero of=file bs=1M count=1 2>/dev/null
+test x"`busybox du -m .`" = x"1	."
diff --git a/ap/app/busybox/src/testsuite/du/du-s-works b/ap/app/busybox/src/testsuite/du/du-s-works
new file mode 100644
index 0000000..534432c
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/du/du-s-works
@@ -0,0 +1,8 @@
+# FEATURE: CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
+
+d=/bin
+du -s "$d" > logfile.gnu
+busybox du -s "$d" > logfile.bb
+cmp logfile.gnu logfile.bb && exit 0
+diff -u logfile.gnu logfile.bb
+exit 1
diff --git a/ap/app/busybox/src/testsuite/du/du-works b/ap/app/busybox/src/testsuite/du/du-works
new file mode 100644
index 0000000..e320f1d
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/du/du-works
@@ -0,0 +1,8 @@
+# FEATURE: CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
+
+d=/bin
+du "$d" > logfile.gnu
+busybox du "$d" > logfile.bb
+cmp logfile.gnu logfile.bb && exit 0
+diff -u logfile.gnu logfile.bb
+exit 1
diff --git a/ap/app/busybox/src/testsuite/echo/echo-does-not-print-newline b/ap/app/busybox/src/testsuite/echo/echo-does-not-print-newline
new file mode 100644
index 0000000..2857c0d
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/echo/echo-does-not-print-newline
@@ -0,0 +1,3 @@
+# FEATURE: CONFIG_FEATURE_FANCY_ECHO
+
+test `busybox echo -n word | wc -c` -eq 4
diff --git a/ap/app/busybox/src/testsuite/echo/echo-prints-argument b/ap/app/busybox/src/testsuite/echo/echo-prints-argument
new file mode 100644
index 0000000..479dac8
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/echo/echo-prints-argument
@@ -0,0 +1 @@
+test xfubar = x`busybox echo fubar`
diff --git a/ap/app/busybox/src/testsuite/echo/echo-prints-arguments b/ap/app/busybox/src/testsuite/echo/echo-prints-arguments
new file mode 100644
index 0000000..4e4e3b4
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/echo/echo-prints-arguments
@@ -0,0 +1 @@
+test "`busybox echo foo bar`" = "foo bar"
diff --git a/ap/app/busybox/src/testsuite/echo/echo-prints-dash b/ap/app/busybox/src/testsuite/echo/echo-prints-dash
new file mode 100644
index 0000000..ddcdbad
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/echo/echo-prints-dash
@@ -0,0 +1 @@
+test "`busybox echo - | od -t x1 | head -n 1`" = "0000000 2d 0a"
diff --git a/ap/app/busybox/src/testsuite/echo/echo-prints-newline b/ap/app/busybox/src/testsuite/echo/echo-prints-newline
new file mode 100644
index 0000000..838671e
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/echo/echo-prints-newline
@@ -0,0 +1 @@
+test `busybox echo word | wc -c` -eq 5
diff --git a/ap/app/busybox/src/testsuite/echo/echo-prints-non-opts b/ap/app/busybox/src/testsuite/echo/echo-prints-non-opts
new file mode 100644
index 0000000..c7d1e20
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/echo/echo-prints-non-opts
@@ -0,0 +1 @@
+test "`busybox echo -neEZ | od -t x1 | head -n 1`" = "0000000 2d 6e 65 45 5a 0a"
diff --git a/ap/app/busybox/src/testsuite/echo/echo-prints-slash-zero b/ap/app/busybox/src/testsuite/echo/echo-prints-slash-zero
new file mode 100644
index 0000000..d97ed8e
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/echo/echo-prints-slash-zero
@@ -0,0 +1,3 @@
+# FEATURE: CONFIG_FEATURE_FANCY_ECHO
+
+test "`busybox echo -e -n 'msg\n\0' | od -t x1 | head -n 1`" = "0000000 6d 73 67 0a 00"
diff --git a/ap/app/busybox/src/testsuite/echo/echo-prints-slash_00041 b/ap/app/busybox/src/testsuite/echo/echo-prints-slash_00041
new file mode 100644
index 0000000..9cffabd
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/echo/echo-prints-slash_00041
@@ -0,0 +1,3 @@
+# FEATURE: CONFIG_FEATURE_FANCY_ECHO
+
+test "`busybox echo -ne '\00041z' | od -t x1 | head -n 1`" = "0000000 04 31 7a"
diff --git a/ap/app/busybox/src/testsuite/echo/echo-prints-slash_0041 b/ap/app/busybox/src/testsuite/echo/echo-prints-slash_0041
new file mode 100644
index 0000000..b07429d
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/echo/echo-prints-slash_0041
@@ -0,0 +1,3 @@
+# FEATURE: CONFIG_FEATURE_FANCY_ECHO
+
+test "`busybox echo -ne '\0041z' | od -t x1 | head -n 1`" = "0000000 21 7a"
diff --git a/ap/app/busybox/src/testsuite/echo/echo-prints-slash_041 b/ap/app/busybox/src/testsuite/echo/echo-prints-slash_041
new file mode 100644
index 0000000..1d70cec
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/echo/echo-prints-slash_041
@@ -0,0 +1,3 @@
+# FEATURE: CONFIG_FEATURE_FANCY_ECHO
+
+test "`busybox echo -ne '\041z' | od -t x1 | head -n 1`" = "0000000 21 7a"
diff --git a/ap/app/busybox/src/testsuite/echo/echo-prints-slash_41 b/ap/app/busybox/src/testsuite/echo/echo-prints-slash_41
new file mode 100644
index 0000000..6d8999b
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/echo/echo-prints-slash_41
@@ -0,0 +1,3 @@
+# FEATURE: CONFIG_FEATURE_FANCY_ECHO
+
+test "`busybox echo -ne '\41z' | od -t x1 | head -n 1`" = "0000000 21 7a"
diff --git a/ap/app/busybox/src/testsuite/expand.tests b/ap/app/busybox/src/testsuite/expand.tests
new file mode 100755
index 0000000..0682c29
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/expand.tests
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+test -f "$bindir/.config" && . "$bindir/.config"
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+
+testing "expand" \
+	"expand" \
+	"        12345678        12345678\n" \
+	"" \
+	"\t12345678\t12345678\n"
+
+test x"$CONFIG_UNICODE_SUPPORT" = x"y" \
+&& test x"$CONFIG_UNICODE_USING_LOCALE" != x"y" \
+&& testing "expand with unicode characher 0x394" \
+	"expand" \
+	"Δ       12345ΔΔΔ        12345678\n" \
+	"" \
+	"Δ\t12345ΔΔΔ\t12345678\n"
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/expand/expand-works-like-GNU b/ap/app/busybox/src/testsuite/expand/expand-works-like-GNU
new file mode 100644
index 0000000..b0278d8
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/expand/expand-works-like-GNU
@@ -0,0 +1,20 @@
+# FEATURE: CONFIG_UNEXPAND
+
+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/ap/app/busybox/src/testsuite/expr/expr-big b/ap/app/busybox/src/testsuite/expr/expr-big
new file mode 100644
index 0000000..23dbbb3
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/expr/expr-works b/ap/app/busybox/src/testsuite/expr/expr-works
new file mode 100644
index 0000000..5a0fffb
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/expr/expr-works
@@ -0,0 +1,58 @@
+# 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/ap/app/busybox/src/testsuite/false/false-is-silent b/ap/app/busybox/src/testsuite/false/false-is-silent
new file mode 100644
index 0000000..8a9aa0c
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/false/false-is-silent
@@ -0,0 +1 @@
+busybox false 2>&1 | cmp - /dev/null
diff --git a/ap/app/busybox/src/testsuite/false/false-returns-failure b/ap/app/busybox/src/testsuite/false/false-returns-failure
new file mode 100644
index 0000000..1a061f2
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/false/false-returns-failure
@@ -0,0 +1 @@
+! busybox false
diff --git a/ap/app/busybox/src/testsuite/find/find-supports-minus-xdev b/ap/app/busybox/src/testsuite/find/find-supports-minus-xdev
new file mode 100644
index 0000000..c807fc8
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/find/find-supports-minus-xdev
@@ -0,0 +1,3 @@
+# FEATURE: CONFIG_FEATURE_FIND_XDEV
+
+busybox find . -xdev >/dev/null 2>&1
diff --git a/ap/app/busybox/src/testsuite/fold.tests b/ap/app/busybox/src/testsuite/fold.tests
new file mode 100755
index 0000000..ecf8b9c
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/fold.tests
@@ -0,0 +1,62 @@
+#!/bin/sh
+# Copyright 2009 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+test -f "$bindir/.config" && . "$bindir/.config"
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+
+testing "fold -s" "fold -w 7 -s" \
+        "123456\n\t\nasdf" \
+        "" \
+        "123456\tasdf" \
+
+testing "fold -w1" "fold -w1" \
+	"q\nq\n \nw\n \ne\ne\ne\n \nr\n \nt\nt\nt\nt\n \ny" \
+	"" \
+	"qq w eee r tttt y" \
+
+testing "fold with NULs" "fold -sw22" \
+	"\
+The NUL is here:>\0< \n\
+and another one is \n\
+here:>\0< - they must \n\
+be preserved
+" \
+	"" \
+	"The NUL is here:>\0< and another one \
+is here:>\0< - they must be preserved
+" \
+
+# The text was taken from English and Ukrainian wikipedia pages
+test x"$CONFIG_UNICODE_SUPPORT" = x"y" \
+&& test x"$CONFIG_UNICODE_USING_LOCALE" != x"y" \
+&& testing "fold -sw66 with unicode input" "fold -sw66" \
+	"\
+The Andromeda Galaxy (pronounced /ænˈdrɒmədə/, also known as \n\
+Messier 31, M31, or NGC224; often referred to as the Great \n\
+Andromeda Nebula in older texts) is a spiral galaxy approximately \n\
+2,500,000 light-years (1.58×10^11 AU) away in the constellation \n\
+Andromeda. It is the nearest spiral galaxy to our own, the Milky \n\
+Way.\n\
+Галактика або Туманність Андромеди (також відома як M31 за \n\
+каталогом Мессьє та NGC224 за Новим загальним каталогом) — \n\
+спіральна галактика, що знаходиться на відстані приблизно у 2,5 \n\
+мільйони світлових років від нашої планети у сузір'ї Андромеди. \n\
+На початку ХХІ ст. в центрі галактики виявлено чорну дірку." \
+	"" \
+	"\
+The Andromeda Galaxy (pronounced /ænˈdrɒmədə/, also known as \
+Messier 31, M31, or NGC224; often referred to as the Great \
+Andromeda Nebula in older texts) is a spiral galaxy approximately \
+2,500,000 light-years (1.58×10^11 AU) away in the constellation \
+Andromeda. It is the nearest spiral galaxy to our own, the Milky \
+Way.
+Галактика або Туманність Андромеди (також відома як M31 за \
+каталогом Мессьє та NGC224 за Новим загальним каталогом) — \
+спіральна галактика, що знаходиться на відстані приблизно у 2,5 \
+мільйони світлових років від нашої планети у сузір'ї Андромеди. \
+На початку ХХІ ст. в центрі галактики виявлено чорну дірку."
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/grep.tests b/ap/app/busybox/src/testsuite/grep.tests
new file mode 100755
index 0000000..4781f22
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/grep.tests
@@ -0,0 +1,134 @@
+#!/bin/sh
+
+# Copyright 2005 by Rob Landley <rob@landley.net>
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+# AUDIT:
+
+. ./testing.sh
+
+# testing "test name" "commands" "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"
+
+optional EXTRA_COMPAT
+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" ""
+SKIP=
+
+# -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" ""
+testing "grep -F handles -i" "grep -F -i foo input ; echo \$?" \
+	"FOO\n0\n" "FOO\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"
+testing "grep -E -o prints all matches" \
+	"grep -E -o '([[:xdigit:]]{2}[:-]){5}[[:xdigit:]]{2}'" \
+	"00:19:3E:00:AA:5E\n00:1D:60:3D:3A:FB\n00:22:43:49:FB:AA\n" \
+	"" "00:19:3E:00:AA:5E 00:1D:60:3D:3A:FB 00:22:43:49:FB:AA\n"
+SKIP=
+
+testing "grep -o does not loop forever" \
+	'grep -o "[^/]*$"' \
+	"test\n" \
+	"" "/var/test\n"
+testing "grep -o does not loop forever on zero-length match" \
+	'grep -o "" | head -n1' \
+	"" \
+	"" "test\n"
+
+testing "grep -f EMPTY_FILE" \
+	"grep -f input" \
+	"" \
+	"" \
+	"test\n"
+
+testing "grep -v -f EMPTY_FILE" \
+	"grep -v -f input" \
+	"test\n" \
+	"" \
+	"test\n"
+
+testing "grep -Fw matches only words" \
+	"grep -Fw foo input" \
+	"" \
+	"foop\n" \
+	""
+
+testing "grep -Fw doesn't stop on 1st mismatch" \
+	"grep -Fw foo input" \
+	"foop foo\n" \
+	"foop foo\n" \
+	""
+
+# testing "test name" "commands" "expected result" "file input" "stdin"
+#   file input will be file called "input"
+#   test can create a file "actual" instead of writing to stdout
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/gunzip.tests b/ap/app/busybox/src/testsuite/gunzip.tests
new file mode 100755
index 0000000..68c0755
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/gunzip.tests
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+. ./bunzip2.tests
diff --git a/ap/app/busybox/src/testsuite/gunzip/gunzip-reads-from-standard-input b/ap/app/busybox/src/testsuite/gunzip/gunzip-reads-from-standard-input
new file mode 100644
index 0000000..7c498c0
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/gunzip/gunzip-reads-from-standard-input
@@ -0,0 +1,2 @@
+echo foo | gzip | busybox gunzip > output
+echo foo | cmp - output
diff --git a/ap/app/busybox/src/testsuite/gzip/gzip-accepts-multiple-files b/ap/app/busybox/src/testsuite/gzip/gzip-accepts-multiple-files
new file mode 100644
index 0000000..8f0d9c8
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/gzip/gzip-accepts-multiple-files
@@ -0,0 +1,3 @@
+touch foo bar
+busybox gzip foo bar
+test -f foo.gz -a -f bar.gz
diff --git a/ap/app/busybox/src/testsuite/gzip/gzip-accepts-single-minus b/ap/app/busybox/src/testsuite/gzip/gzip-accepts-single-minus
new file mode 100644
index 0000000..8b51fdf
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/gzip/gzip-accepts-single-minus
@@ -0,0 +1 @@
+echo foo | busybox gzip - >/dev/null
diff --git a/ap/app/busybox/src/testsuite/gzip/gzip-removes-original-file b/ap/app/busybox/src/testsuite/gzip/gzip-removes-original-file
new file mode 100644
index 0000000..b9cb995
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/gzip/gzip-removes-original-file
@@ -0,0 +1,3 @@
+touch foo
+busybox gzip foo
+test ! -f foo
diff --git a/ap/app/busybox/src/testsuite/head/head-n-works b/ap/app/busybox/src/testsuite/head/head-n-works
new file mode 100644
index 0000000..db43255
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/head/head-works b/ap/app/busybox/src/testsuite/head/head-works
new file mode 100644
index 0000000..56ad3e3
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/hostid/hostid-works b/ap/app/busybox/src/testsuite/hostid/hostid-works
new file mode 100644
index 0000000..bcfd717
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/hostid/hostid-works
@@ -0,0 +1,8 @@
+h=x$(busybox hostid)
+# Is $h a sequence of hex numbers?
+x="${h//[0123456789abcdef]/x}"
+x="${x//xxx/x}"
+x="${x//xxx/x}"
+x="${x//xxx/x}"
+x="${x//xx/x}"
+test x"$x" = x"x"
diff --git a/ap/app/busybox/src/testsuite/hostname/hostname-d-works b/ap/app/busybox/src/testsuite/hostname/hostname-d-works
new file mode 100644
index 0000000..54c0aac
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/hostname/hostname-d-works
@@ -0,0 +1,3 @@
+f=$(busybox hostname -f).
+d=$(busybox hostname -d)
+test x"${f#*.}" = x"$d${d:+.}"
diff --git a/ap/app/busybox/src/testsuite/hostname/hostname-i-works b/ap/app/busybox/src/testsuite/hostname/hostname-i-works
new file mode 100644
index 0000000..7299bff
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/hostname/hostname-i-works
@@ -0,0 +1,9 @@
+test x"$SKIP_KNOWN_BUGS" != x"" && exit
+
+# Observed bug:
+# # ./busybox hostname -i
+# 127.0.0.1
+# # hostname -i
+# 127.0.0.1 10.0.0.2 10.32.10.45
+
+test x$(hostname -i) = x$(busybox hostname -i)
diff --git a/ap/app/busybox/src/testsuite/hostname/hostname-s-works b/ap/app/busybox/src/testsuite/hostname/hostname-s-works
new file mode 100644
index 0000000..172b944
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/hostname/hostname-s-works
@@ -0,0 +1 @@
+test x$(hostname -s) = x$(busybox hostname -s)
diff --git a/ap/app/busybox/src/testsuite/hostname/hostname-works b/ap/app/busybox/src/testsuite/hostname/hostname-works
new file mode 100644
index 0000000..f51a406
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/hostname/hostname-works
@@ -0,0 +1 @@
+test x$(hostname) = x$(busybox hostname)
diff --git a/ap/app/busybox/src/testsuite/id/id-g-works b/ap/app/busybox/src/testsuite/id/id-g-works
new file mode 100644
index 0000000..671fc53
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/id/id-g-works
@@ -0,0 +1 @@
+test x$(id -g) = x$(busybox id -g)
diff --git a/ap/app/busybox/src/testsuite/id/id-u-works b/ap/app/busybox/src/testsuite/id/id-u-works
new file mode 100644
index 0000000..2358cb0
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/id/id-u-works
@@ -0,0 +1 @@
+test x$(id -u) = x$(busybox id -u)
diff --git a/ap/app/busybox/src/testsuite/id/id-un-works b/ap/app/busybox/src/testsuite/id/id-un-works
new file mode 100644
index 0000000..db390e7
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/id/id-un-works
@@ -0,0 +1 @@
+test x$(id -un) = x$(busybox id -un)
diff --git a/ap/app/busybox/src/testsuite/id/id-ur-works b/ap/app/busybox/src/testsuite/id/id-ur-works
new file mode 100644
index 0000000..6b0fcb0
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/id/id-ur-works
@@ -0,0 +1 @@
+test x$(id -ur) = x$(busybox id -ur)
diff --git a/ap/app/busybox/src/testsuite/ln/ln-creates-hard-links b/ap/app/busybox/src/testsuite/ln/ln-creates-hard-links
new file mode 100644
index 0000000..2f6e23f
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/ln/ln-creates-soft-links b/ap/app/busybox/src/testsuite/ln/ln-creates-soft-links
new file mode 100644
index 0000000..e875e4c
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/ln/ln-force-creates-hard-links b/ap/app/busybox/src/testsuite/ln/ln-force-creates-hard-links
new file mode 100644
index 0000000..c96b7d6
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/ln/ln-force-creates-soft-links b/ap/app/busybox/src/testsuite/ln/ln-force-creates-soft-links
new file mode 100644
index 0000000..cab8d1d
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/ln/ln-preserves-hard-links b/ap/app/busybox/src/testsuite/ln/ln-preserves-hard-links
new file mode 100644
index 0000000..47fb989
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/ln/ln-preserves-soft-links b/ap/app/busybox/src/testsuite/ln/ln-preserves-soft-links
new file mode 100644
index 0000000..3a49bed
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/ln/ln-preserves-soft-links
@@ -0,0 +1,8 @@
+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/ap/app/busybox/src/testsuite/ls.mk_uni_tests b/ap/app/busybox/src/testsuite/ls.mk_uni_tests
new file mode 100644
index 0000000..da0c29f
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/ls.mk_uni_tests
@@ -0,0 +1,111 @@
+# DO NOT EDIT THIS FILE! MOST TEXT EDITORS WILL DAMAGE IT!
+>'0001_1__Some_correct_UTF-8_text___________________________________________|'
+>'0002_2__Boundary_condition_test_cases_____________________________________|'
+>'0003_2.1__First_possible_sequence_of_a_certain_length_____________________|'
+>'0004_2.1.2__2_bytes__U-00000080_:________"€"______________________________|'
+>'0005_2.1.3__3_bytes__U-00000800_:________"ࠀ"______________________________|'
+>'0006_2.1.4__4_bytes__U-00010000_:________"𐀀"______________________________|'
+>'0007_2.1.5__5_bytes__U-00200000_:________"øˆ€€€"______________________________|'
+>'0008_2.1.6__6_bytes__U-04000000_:________"ü„€€€€"______________________________|'
+>'0009_2.2__Last_possible_sequence_of_a_certain_length______________________|'
+>'0010_2.2.1__1_byte___U-0000007F_:________""______________________________|'
+>'0011_2.2.2__2_bytes__U-000007FF_:________"߿"______________________________|'
+>'0012_2.2.3__3_bytes__U-0000FFFF_:________"￿"______________________________|'
+>'0013_2.2.4__4_bytes__U-001FFFFF_:________"÷¿¿¿"______________________________|'
+>'0014_2.2.5__5_bytes__U-03FFFFFF_:________"û¿¿¿¿"______________________________|'
+>'0015_2.2.6__6_bytes__U-7FFFFFFF_:________"ý¿¿¿¿¿"______________________________|'
+>'0016_2.3__Other_boundary_conditions_______________________________________|'
+>'0017_2.3.1__U-0000D7FF_=_ed_9f_bf_=_"퟿"___________________________________|'
+>'0018_2.3.2__U-0000E000_=_ee_80_80_=_""___________________________________|'
+>'0019_2.3.3__U-0000FFFD_=_ef_bf_bd_=_"�"___________________________________|'
+>'0020_2.3.4__U-0010FFFF_=_f4_8f_bf_bf_=_"􏿿"________________________________|'
+>'0021_2.3.5__U-00110000_=_f4_90_80_80_=_"ô€€"________________________________|'
+>'0022_3__Malformed_sequences_______________________________________________|'
+>'0023_3.1__Unexpected_continuation_bytes___________________________________|'
+>'0024_3.1.1__First_continuation_byte_0x80:_"€"_____________________________|'
+>'0025_3.1.2__Last__continuation_byte_0xbf:_"¿"_____________________________|'
+>'0026_3.1.3__2_continuation_bytes:_"€¿"____________________________________|'
+>'0027_3.1.4__3_continuation_bytes:_"€¿€"___________________________________|'
+>'0028_3.1.5__4_continuation_bytes:_"€¿€¿"__________________________________|'
+>'0029_3.1.6__5_continuation_bytes:_"€¿€¿€"_________________________________|'
+>'0030_3.1.7__6_continuation_bytes:_"€¿€¿€¿"________________________________|'
+>'0031_3.1.8__7_continuation_bytes:_"€¿€¿€¿€"_______________________________|'
+>'0032_3.1.9__Sequence_of_all_64_possible_continuation_bytes__0x80-0xbf_:___|'
+>'0033____"€‚ƒ„…†‡ˆ‰Š‹ŒŽ_________________________________________________|'
+>'0034_____‘’“”•–—˜™š›œžŸ_________________________________________________|'
+>'0035_____ ¡¢£¤¥¦§¨©ª«¬­®¯_________________________________________________|'
+>'0036_____°±²³´µ¶·¸¹º»¼½¾¿"________________________________________________|'
+>'0037_3.2__Lonely_start_characters_________________________________________|'
+>'0038_3.2.1__All_32_first_bytes_of_2-byte_sequences__0xc0-0xdf_,___________|'
+>'0039________each_followed_by_a_space_character:___________________________|'
+>'0040____"À_Á_Â_Ã_Ä_Å_Æ_Ç_È_É_Ê_Ë_Ì_Í_Î_Ï__________________________________|'
+>'0041_____Ð_Ñ_Ò_Ó_Ô_Õ_Ö_×_Ø_Ù_Ú_Û_Ü_Ý_Þ_ß_"________________________________|'
+>'0042_3.2.2__All_16_first_bytes_of_3-byte_sequences__0xe0-0xef_,___________|'
+>'0043________each_followed_by_a_space_character:___________________________|'
+>'0044____"à_á_â_ã_ä_å_æ_ç_è_é_ê_ë_ì_í_î_ï_"________________________________|'
+>'0045_3.2.3__All_8_first_bytes_of_4-byte_sequences__0xf0-0xf7_,____________|'
+>'0046________each_followed_by_a_space_character:___________________________|'
+>'0047____"ð_ñ_ò_ó_ô_õ_ö_÷_"________________________________________________|'
+>'0048_3.2.4__All_4_first_bytes_of_5-byte_sequences__0xf8-0xfb_,____________|'
+>'0049________each_followed_by_a_space_character:___________________________|'
+>'0050____"ø_ù_ú_û_"________________________________________________________|'
+>'0051_3.2.5__All_2_first_bytes_of_6-byte_sequences__0xfc-0xfd_,____________|'
+>'0052________each_followed_by_a_space_character:___________________________|'
+>'0053____"ü_ý_"____________________________________________________________|'
+>'0054_3.3__Sequences_with_last_continuation_byte_missing___________________|'
+>'0055_3.3.1__2-byte_sequence_with_last_byte_missing__U+0000_:_____"À"______|'
+>'0056_3.3.2__3-byte_sequence_with_last_byte_missing__U+0000_:_____"à€"______|'
+>'0057_3.3.3__4-byte_sequence_with_last_byte_missing__U+0000_:_____"ð€€"______|'
+>'0058_3.3.4__5-byte_sequence_with_last_byte_missing__U+0000_:_____"ø€€€"______|'
+>'0059_3.3.5__6-byte_sequence_with_last_byte_missing__U+0000_:_____"ü€€€€"______|'
+>'0060_3.3.6__2-byte_sequence_with_last_byte_missing__U-000007FF_:_"ß"______|'
+>'0061_3.3.7__3-byte_sequence_with_last_byte_missing__U-0000FFFF_:_"ï¿"______|'
+>'0062_3.3.8__4-byte_sequence_with_last_byte_missing__U-001FFFFF_:_"÷¿¿"______|'
+>'0063_3.3.9__5-byte_sequence_with_last_byte_missing__U-03FFFFFF_:_"û¿¿¿"______|'
+>'0064_3.3.10_6-byte_sequence_with_last_byte_missing__U-7FFFFFFF_:_"ý¿¿¿¿"______|'
+>'0065_3.4__Concatenation_of_incomplete_sequences___________________________|'
+>'0066____"Àà€ð€€ø€€€ü€€€€ßï¿÷¿¿û¿¿¿ý¿¿¿¿"______________________________________________________|'
+>'0067_3.5__Impossible_bytes________________________________________________|'
+>'0068_3.5.1__fe_=_"þ"______________________________________________________|'
+>'0069_3.5.2__ff_=_"ÿ"______________________________________________________|'
+>'0070_3.5.3__fe_fe_ff_ff_=_"þþÿÿ"__________________________________________|'
+>'0071_4__Overlong_sequences________________________________________________|'
+>'0072_4.1__Examples_of_an_overlong_ASCII_character_________________________|'
+>'0073_4.1.1_U+002F_=_c0_af_____________=_"À¯"_______________________________|'
+>'0074_4.1.2_U+002F_=_e0_80_af__________=_"à€¯"_______________________________|'
+>'0075_4.1.3_U+002F_=_f0_80_80_af_______=_"ð€€¯"_______________________________|'
+>'0076_4.1.4_U+002F_=_f8_80_80_80_af____=_"ø€€€¯"_______________________________|'
+>'0077_4.1.5_U+002F_=_fc_80_80_80_80_af_=_"ü€€€€¯"_______________________________|'
+>'0078_4.2__Maximum_overlong_sequences______________________________________|'
+>'0079_4.2.1__U-0000007F_=_c1_bf_____________=_"Á¿"__________________________|'
+>'0080_4.2.2__U-000007FF_=_e0_9f_bf__________=_"àŸ¿"__________________________|'
+>'0081_4.2.3__U-0000FFFF_=_f0_8f_bf_bf_______=_"ð¿¿"__________________________|'
+>'0082_4.2.4__U-001FFFFF_=_f8_87_bf_bf_bf____=_"ø‡¿¿¿"__________________________|'
+>'0083_4.2.5__U-03FFFFFF_=_fc_83_bf_bf_bf_bf_=_"üƒ¿¿¿¿"__________________________|'
+>'0084_4.3__Overlong_representation_of_the_NUL_character____________________|'
+>'0085_4.3.1__U+0000_=_c0_80_____________=_""______________________________|'
+>'0086_4.3.2__U+0000_=_e0_80_80__________=_"à€€"______________________________|'
+>'0087_4.3.3__U+0000_=_f0_80_80_80_______=_"ð€€€"______________________________|'
+>'0088_4.3.4__U+0000_=_f8_80_80_80_80____=_"ø€€€€"______________________________|'
+>'0089_4.3.5__U+0000_=_fc_80_80_80_80_80_=_"ü€€€€€"______________________________|'
+>'0090_5__Illegal_code_positions____________________________________________|'
+>'0091_5.1_Single_UTF-16_surrogates_________________________________________|'
+>'0092_5.1.1__U+D800_=_ed_a0_80_=_"í €"_______________________________________|'
+>'0093_5.1.2__U+DB7F_=_ed_ad_bf_=_"í­¿"_______________________________________|'
+>'0094_5.1.3__U+DB80_=_ed_ae_80_=_"í®€"_______________________________________|'
+>'0095_5.1.4__U+DBFF_=_ed_af_bf_=_"í¯¿"_______________________________________|'
+>'0096_5.1.5__U+DC00_=_ed_b0_80_=_"í°€"_______________________________________|'
+>'0097_5.1.6__U+DF80_=_ed_be_80_=_"í¾€"_______________________________________|'
+>'0098_5.1.7__U+DFFF_=_ed_bf_bf_=_"í¿¿"_______________________________________|'
+>'0099_5.2_Paired_UTF-16_surrogates_________________________________________|'
+>'0100_5.2.1__U+D800_U+DC00_=_ed_a0_80_ed_b0_80_=_"𐀀"______________________|'
+>'0101_5.2.2__U+D800_U+DFFF_=_ed_a0_80_ed_bf_bf_=_"𐏿"______________________|'
+>'0102_5.2.3__U+DB7F_U+DC00_=_ed_ad_bf_ed_b0_80_=_"󯰀"______________________|'
+>'0103_5.2.4__U+DB7F_U+DFFF_=_ed_ad_bf_ed_bf_bf_=_"í­¿í¿¿"______________________|'
+>'0104_5.2.5__U+DB80_U+DC00_=_ed_ae_80_ed_b0_80_=_"󰀀"______________________|'
+>'0105_5.2.6__U+DB80_U+DFFF_=_ed_ae_80_ed_bf_bf_=_"󰏿"______________________|'
+>'0106_5.2.7__U+DBFF_U+DC00_=_ed_af_bf_ed_b0_80_=_"􏰀"______________________|'
+>'0107_5.2.8__U+DBFF_U+DFFF_=_ed_af_bf_ed_bf_bf_=_"􏿿"______________________|'
+>'0108_5.3_Other_illegal_code_positions_____________________________________|'
+>'0109_5.3.1__U+FFFE_=_ef_bf_be_=_"￾"_______________________________________|'
+>'0110_5.3.2__U+FFFF_=_ef_bf_bf_=_"￿"_______________________________________|'
diff --git a/ap/app/busybox/src/testsuite/ls.tests b/ap/app/busybox/src/testsuite/ls.tests
new file mode 100755
index 0000000..9309d36
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/ls.tests
@@ -0,0 +1,268 @@
+#!/bin/sh
+# Copyright 2010 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+test -f "$bindir/.config" && . "$bindir/.config"
+
+rm -rf ls.testdir 2>/dev/null
+mkdir ls.testdir || exit 1
+
+# testing "test name" "command" "expected result" "file input" "stdin"
+
+# With Unicode provided by libc locale, I'm not sure this test can pass.
+# I suspect we might fail to skip exactly correct number of bytes
+# over broked unicode sequences.
+test x"$CONFIG_UNICODE_SUPPORT" = x"y" \
+&& test x"$CONFIG_UNICODE_USING_LOCALE" != x"y" \
+&& test x"$CONFIG_SUBST_WCHAR" = x"63" \
+&& test x"$CONFIG_LAST_SUPPORTED_WCHAR" = x"767" \
+&& test x"$CONFIG_FEATURE_LS_SORTFILES" = x"y" \
+&& testing "ls unicode test with codepoints limited to 767" \
+"(cd ls.testdir && sh ../ls.mk_uni_tests) && ls -1 ls.testdir" \
+'0001_1__Some_correct_UTF-8_text___________________________________________|
+0002_2__Boundary_condition_test_cases_____________________________________|
+0003_2.1__First_possible_sequence_of_a_certain_length_____________________|
+0004_2.1.2__2_bytes__U-00000080_:________"?"______________________________|
+0005_2.1.3__3_bytes__U-00000800_:________"?"______________________________|
+0006_2.1.4__4_bytes__U-00010000_:________"?"______________________________|
+0007_2.1.5__5_bytes__U-00200000_:________"?"______________________________|
+0008_2.1.6__6_bytes__U-04000000_:________"?"______________________________|
+0009_2.2__Last_possible_sequence_of_a_certain_length______________________|
+0010_2.2.1__1_byte___U-0000007F_:________"?"______________________________|
+0011_2.2.2__2_bytes__U-000007FF_:________"?"______________________________|
+0012_2.2.3__3_bytes__U-0000FFFF_:________"?"______________________________|
+0013_2.2.4__4_bytes__U-001FFFFF_:________"?"______________________________|
+0014_2.2.5__5_bytes__U-03FFFFFF_:________"?"______________________________|
+0015_2.2.6__6_bytes__U-7FFFFFFF_:________"?"______________________________|
+0016_2.3__Other_boundary_conditions_______________________________________|
+0017_2.3.1__U-0000D7FF_=_ed_9f_bf_=_"?"___________________________________|
+0018_2.3.2__U-0000E000_=_ee_80_80_=_"?"___________________________________|
+0019_2.3.3__U-0000FFFD_=_ef_bf_bd_=_"?"___________________________________|
+0020_2.3.4__U-0010FFFF_=_f4_8f_bf_bf_=_"?"________________________________|
+0021_2.3.5__U-00110000_=_f4_90_80_80_=_"?"________________________________|
+0022_3__Malformed_sequences_______________________________________________|
+0023_3.1__Unexpected_continuation_bytes___________________________________|
+0024_3.1.1__First_continuation_byte_0x80:_"?"_____________________________|
+0025_3.1.2__Last__continuation_byte_0xbf:_"?"_____________________________|
+0026_3.1.3__2_continuation_bytes:_"??"____________________________________|
+0027_3.1.4__3_continuation_bytes:_"???"___________________________________|
+0028_3.1.5__4_continuation_bytes:_"????"__________________________________|
+0029_3.1.6__5_continuation_bytes:_"?????"_________________________________|
+0030_3.1.7__6_continuation_bytes:_"??????"________________________________|
+0031_3.1.8__7_continuation_bytes:_"???????"_______________________________|
+0032_3.1.9__Sequence_of_all_64_possible_continuation_bytes__0x80-0xbf_:___|
+0033____"????????????????_________________________________________________|
+0034_____????????????????_________________________________________________|
+0035_____????????????????_________________________________________________|
+0036_____????????????????"________________________________________________|
+0037_3.2__Lonely_start_characters_________________________________________|
+0038_3.2.1__All_32_first_bytes_of_2-byte_sequences__0xc0-0xdf_,___________|
+0039________each_followed_by_a_space_character:___________________________|
+0040____"?_?_?_?_?_?_?_?_?_?_?_?_?_?_?_?__________________________________|
+0041_____?_?_?_?_?_?_?_?_?_?_?_?_?_?_?_?_"________________________________|
+0042_3.2.2__All_16_first_bytes_of_3-byte_sequences__0xe0-0xef_,___________|
+0043________each_followed_by_a_space_character:___________________________|
+0044____"?_?_?_?_?_?_?_?_?_?_?_?_?_?_?_?_"________________________________|
+0045_3.2.3__All_8_first_bytes_of_4-byte_sequences__0xf0-0xf7_,____________|
+0046________each_followed_by_a_space_character:___________________________|
+0047____"?_?_?_?_?_?_?_?_"________________________________________________|
+0048_3.2.4__All_4_first_bytes_of_5-byte_sequences__0xf8-0xfb_,____________|
+0049________each_followed_by_a_space_character:___________________________|
+0050____"?_?_?_?_"________________________________________________________|
+0051_3.2.5__All_2_first_bytes_of_6-byte_sequences__0xfc-0xfd_,____________|
+0052________each_followed_by_a_space_character:___________________________|
+0053____"?_?_"____________________________________________________________|
+0054_3.3__Sequences_with_last_continuation_byte_missing___________________|
+0055_3.3.1__2-byte_sequence_with_last_byte_missing__U+0000_:_____"?"______|
+0056_3.3.2__3-byte_sequence_with_last_byte_missing__U+0000_:_____"?"______|
+0057_3.3.3__4-byte_sequence_with_last_byte_missing__U+0000_:_____"?"______|
+0058_3.3.4__5-byte_sequence_with_last_byte_missing__U+0000_:_____"?"______|
+0059_3.3.5__6-byte_sequence_with_last_byte_missing__U+0000_:_____"?"______|
+0060_3.3.6__2-byte_sequence_with_last_byte_missing__U-000007FF_:_"?"______|
+0061_3.3.7__3-byte_sequence_with_last_byte_missing__U-0000FFFF_:_"?"______|
+0062_3.3.8__4-byte_sequence_with_last_byte_missing__U-001FFFFF_:_"?"______|
+0063_3.3.9__5-byte_sequence_with_last_byte_missing__U-03FFFFFF_:_"?"______|
+0064_3.3.10_6-byte_sequence_with_last_byte_missing__U-7FFFFFFF_:_"?"______|
+0065_3.4__Concatenation_of_incomplete_sequences___________________________|
+0066____"??????????"______________________________________________________|
+0067_3.5__Impossible_bytes________________________________________________|
+0068_3.5.1__fe_=_"?"______________________________________________________|
+0069_3.5.2__ff_=_"?"______________________________________________________|
+0070_3.5.3__fe_fe_ff_ff_=_"????"__________________________________________|
+0071_4__Overlong_sequences________________________________________________|
+0072_4.1__Examples_of_an_overlong_ASCII_character_________________________|
+0073_4.1.1_U+002F_=_c0_af_____________=_"?"_______________________________|
+0074_4.1.2_U+002F_=_e0_80_af__________=_"?"_______________________________|
+0075_4.1.3_U+002F_=_f0_80_80_af_______=_"?"_______________________________|
+0076_4.1.4_U+002F_=_f8_80_80_80_af____=_"?"_______________________________|
+0077_4.1.5_U+002F_=_fc_80_80_80_80_af_=_"?"_______________________________|
+0078_4.2__Maximum_overlong_sequences______________________________________|
+0079_4.2.1__U-0000007F_=_c1_bf_____________=_"?"__________________________|
+0080_4.2.2__U-000007FF_=_e0_9f_bf__________=_"?"__________________________|
+0081_4.2.3__U-0000FFFF_=_f0_8f_bf_bf_______=_"?"__________________________|
+0082_4.2.4__U-001FFFFF_=_f8_87_bf_bf_bf____=_"?"__________________________|
+0083_4.2.5__U-03FFFFFF_=_fc_83_bf_bf_bf_bf_=_"?"__________________________|
+0084_4.3__Overlong_representation_of_the_NUL_character____________________|
+0085_4.3.1__U+0000_=_c0_80_____________=_"?"______________________________|
+0086_4.3.2__U+0000_=_e0_80_80__________=_"?"______________________________|
+0087_4.3.3__U+0000_=_f0_80_80_80_______=_"?"______________________________|
+0088_4.3.4__U+0000_=_f8_80_80_80_80____=_"?"______________________________|
+0089_4.3.5__U+0000_=_fc_80_80_80_80_80_=_"?"______________________________|
+0090_5__Illegal_code_positions____________________________________________|
+0091_5.1_Single_UTF-16_surrogates_________________________________________|
+0092_5.1.1__U+D800_=_ed_a0_80_=_"?"_______________________________________|
+0093_5.1.2__U+DB7F_=_ed_ad_bf_=_"?"_______________________________________|
+0094_5.1.3__U+DB80_=_ed_ae_80_=_"?"_______________________________________|
+0095_5.1.4__U+DBFF_=_ed_af_bf_=_"?"_______________________________________|
+0096_5.1.5__U+DC00_=_ed_b0_80_=_"?"_______________________________________|
+0097_5.1.6__U+DF80_=_ed_be_80_=_"?"_______________________________________|
+0098_5.1.7__U+DFFF_=_ed_bf_bf_=_"?"_______________________________________|
+0099_5.2_Paired_UTF-16_surrogates_________________________________________|
+0100_5.2.1__U+D800_U+DC00_=_ed_a0_80_ed_b0_80_=_"??"______________________|
+0101_5.2.2__U+D800_U+DFFF_=_ed_a0_80_ed_bf_bf_=_"??"______________________|
+0102_5.2.3__U+DB7F_U+DC00_=_ed_ad_bf_ed_b0_80_=_"??"______________________|
+0103_5.2.4__U+DB7F_U+DFFF_=_ed_ad_bf_ed_bf_bf_=_"??"______________________|
+0104_5.2.5__U+DB80_U+DC00_=_ed_ae_80_ed_b0_80_=_"??"______________________|
+0105_5.2.6__U+DB80_U+DFFF_=_ed_ae_80_ed_bf_bf_=_"??"______________________|
+0106_5.2.7__U+DBFF_U+DC00_=_ed_af_bf_ed_b0_80_=_"??"______________________|
+0107_5.2.8__U+DBFF_U+DFFF_=_ed_af_bf_ed_bf_bf_=_"??"______________________|
+0108_5.3_Other_illegal_code_positions_____________________________________|
+0109_5.3.1__U+FFFE_=_ef_bf_be_=_"?"_______________________________________|
+0110_5.3.2__U+FFFF_=_ef_bf_bf_=_"?"_______________________________________|
+' "" ""
+
+# Currently fails on "0080_4.2.2__U-000007FF_=_e0_9f_bf" line
+test x"$CONFIG_UNICODE_SUPPORT" = x"y" \
+&& test x"$CONFIG_UNICODE_USING_LOCALE" != x"y" \
+&& test x"$CONFIG_SUBST_WCHAR" = x"63" \
+&& test x"$CONFIG_LAST_SUPPORTED_WCHAR" = x"0" \
+&& testing "ls unicode test with unlimited codepoints" \
+"(cd ls.testdir && sh ../ls.mk_uni_tests) && ls -1 ls.testdir" \
+'0001_1__Some_correct_UTF-8_text___________________________________________|
+0002_2__Boundary_condition_test_cases_____________________________________|
+0003_2.1__First_possible_sequence_of_a_certain_length_____________________|
+0004_2.1.2__2_bytes__U-00000080_:________"?"______________________________|
+0005_2.1.3__3_bytes__U-00000800_:________"ࠀ"______________________________|
+0006_2.1.4__4_bytes__U-00010000_:________"𐀀"______________________________|
+0007_2.1.5__5_bytes__U-00200000_:________"?"______________________________|
+0008_2.1.6__6_bytes__U-04000000_:________"?"______________________________|
+0009_2.2__Last_possible_sequence_of_a_certain_length______________________|
+0010_2.2.1__1_byte___U-0000007F_:________"?"______________________________|
+0011_2.2.2__2_bytes__U-000007FF_:________"߿"______________________________|
+0012_2.2.3__3_bytes__U-0000FFFF_:________"?"______________________________|
+0013_2.2.4__4_bytes__U-001FFFFF_:________"?"______________________________|
+0014_2.2.5__5_bytes__U-03FFFFFF_:________"?"______________________________|
+0015_2.2.6__6_bytes__U-7FFFFFFF_:________"?"______________________________|
+0016_2.3__Other_boundary_conditions_______________________________________|
+0017_2.3.1__U-0000D7FF_=_ed_9f_bf_=_"퟿"___________________________________|
+0018_2.3.2__U-0000E000_=_ee_80_80_=_"?"___________________________________|
+0019_2.3.3__U-0000FFFD_=_ef_bf_bd_=_"�"___________________________________|
+0020_2.3.4__U-0010FFFF_=_f4_8f_bf_bf_=_"?"________________________________|
+0021_2.3.5__U-00110000_=_f4_90_80_80_=_"?"________________________________|
+0022_3__Malformed_sequences_______________________________________________|
+0023_3.1__Unexpected_continuation_bytes___________________________________|
+0024_3.1.1__First_continuation_byte_0x80:_"?"_____________________________|
+0025_3.1.2__Last__continuation_byte_0xbf:_"?"_____________________________|
+0026_3.1.3__2_continuation_bytes:_"??"____________________________________|
+0027_3.1.4__3_continuation_bytes:_"???"___________________________________|
+0028_3.1.5__4_continuation_bytes:_"????"__________________________________|
+0029_3.1.6__5_continuation_bytes:_"?????"_________________________________|
+0030_3.1.7__6_continuation_bytes:_"??????"________________________________|
+0031_3.1.8__7_continuation_bytes:_"???????"_______________________________|
+0032_3.1.9__Sequence_of_all_64_possible_continuation_bytes__0x80-0xbf_:___|
+0033____"????????????????_________________________________________________|
+0034_____????????????????_________________________________________________|
+0035_____????????????????_________________________________________________|
+0036_____????????????????"________________________________________________|
+0037_3.2__Lonely_start_characters_________________________________________|
+0038_3.2.1__All_32_first_bytes_of_2-byte_sequences__0xc0-0xdf_,___________|
+0039________each_followed_by_a_space_character:___________________________|
+0040____"?_?_?_?_?_?_?_?_?_?_?_?_?_?_?_?__________________________________|
+0041_____?_?_?_?_?_?_?_?_?_?_?_?_?_?_?_?_"________________________________|
+0042_3.2.2__All_16_first_bytes_of_3-byte_sequences__0xe0-0xef_,___________|
+0043________each_followed_by_a_space_character:___________________________|
+0044____"?_?_?_?_?_?_?_?_?_?_?_?_?_?_?_?_"________________________________|
+0045_3.2.3__All_8_first_bytes_of_4-byte_sequences__0xf0-0xf7_,____________|
+0046________each_followed_by_a_space_character:___________________________|
+0047____"?_?_?_?_?_?_?_?_"________________________________________________|
+0048_3.2.4__All_4_first_bytes_of_5-byte_sequences__0xf8-0xfb_,____________|
+0049________each_followed_by_a_space_character:___________________________|
+0050____"?_?_?_?_"________________________________________________________|
+0051_3.2.5__All_2_first_bytes_of_6-byte_sequences__0xfc-0xfd_,____________|
+0052________each_followed_by_a_space_character:___________________________|
+0053____"?_?_"____________________________________________________________|
+0054_3.3__Sequences_with_last_continuation_byte_missing___________________|
+0055_3.3.1__2-byte_sequence_with_last_byte_missing__U+0000_:_____"?"______|
+0056_3.3.2__3-byte_sequence_with_last_byte_missing__U+0000_:_____"?"______|
+0057_3.3.3__4-byte_sequence_with_last_byte_missing__U+0000_:_____"?"______|
+0058_3.3.4__5-byte_sequence_with_last_byte_missing__U+0000_:_____"?"______|
+0059_3.3.5__6-byte_sequence_with_last_byte_missing__U+0000_:_____"?"______|
+0060_3.3.6__2-byte_sequence_with_last_byte_missing__U-000007FF_:_"?"______|
+0061_3.3.7__3-byte_sequence_with_last_byte_missing__U-0000FFFF_:_"?"______|
+0062_3.3.8__4-byte_sequence_with_last_byte_missing__U-001FFFFF_:_"?"______|
+0063_3.3.9__5-byte_sequence_with_last_byte_missing__U-03FFFFFF_:_"?"______|
+0064_3.3.10_6-byte_sequence_with_last_byte_missing__U-7FFFFFFF_:_"?"______|
+0065_3.4__Concatenation_of_incomplete_sequences___________________________|
+0066____"??????????"______________________________________________________|
+0067_3.5__Impossible_bytes________________________________________________|
+0068_3.5.1__fe_=_"?"______________________________________________________|
+0069_3.5.2__ff_=_"?"______________________________________________________|
+0070_3.5.3__fe_fe_ff_ff_=_"????"__________________________________________|
+0071_4__Overlong_sequences________________________________________________|
+0072_4.1__Examples_of_an_overlong_ASCII_character_________________________|
+0073_4.1.1_U+002F_=_c0_af_____________=_"?"_______________________________|
+0074_4.1.2_U+002F_=_e0_80_af__________=_"?"_______________________________|
+0075_4.1.3_U+002F_=_f0_80_80_af_______=_"?"_______________________________|
+0076_4.1.4_U+002F_=_f8_80_80_80_af____=_"?"_______________________________|
+0077_4.1.5_U+002F_=_fc_80_80_80_80_af_=_"?"_______________________________|
+0078_4.2__Maximum_overlong_sequences______________________________________|
+0079_4.2.1__U-0000007F_=_c1_bf_____________=_"?"__________________________|
+0080_4.2.2__U-000007FF_=_e0_9f_bf__________=_"?"__________________________|
+0081_4.2.3__U-0000FFFF_=_f0_8f_bf_bf_______=_"?"__________________________|
+0082_4.2.4__U-001FFFFF_=_f8_87_bf_bf_bf____=_"?"__________________________|
+0083_4.2.5__U-03FFFFFF_=_fc_83_bf_bf_bf_bf_=_"?"__________________________|
+0084_4.3__Overlong_representation_of_the_NUL_character____________________|
+0085_4.3.1__U+0000_=_c0_80_____________=_"?"______________________________|
+0086_4.3.2__U+0000_=_e0_80_80__________=_"?"______________________________|
+0087_4.3.3__U+0000_=_f0_80_80_80_______=_"?"______________________________|
+0088_4.3.4__U+0000_=_f8_80_80_80_80____=_"?"______________________________|
+0089_4.3.5__U+0000_=_fc_80_80_80_80_80_=_"?"______________________________|
+0090_5__Illegal_code_positions____________________________________________|
+0091_5.1_Single_UTF-16_surrogates_________________________________________|
+0092_5.1.1__U+D800_=_ed_a0_80_=_"?"_______________________________________|
+0093_5.1.2__U+DB7F_=_ed_ad_bf_=_"?"_______________________________________|
+0094_5.1.3__U+DB80_=_ed_ae_80_=_"?"_______________________________________|
+0095_5.1.4__U+DBFF_=_ed_af_bf_=_"?"_______________________________________|
+0096_5.1.5__U+DC00_=_ed_b0_80_=_"?"_______________________________________|
+0097_5.1.6__U+DF80_=_ed_be_80_=_"?"_______________________________________|
+0098_5.1.7__U+DFFF_=_ed_bf_bf_=_"?"_______________________________________|
+0099_5.2_Paired_UTF-16_surrogates_________________________________________|
+0100_5.2.1__U+D800_U+DC00_=_ed_a0_80_ed_b0_80_=_"??"______________________|
+0101_5.2.2__U+D800_U+DFFF_=_ed_a0_80_ed_bf_bf_=_"??"______________________|
+0102_5.2.3__U+DB7F_U+DC00_=_ed_ad_bf_ed_b0_80_=_"??"______________________|
+0103_5.2.4__U+DB7F_U+DFFF_=_ed_ad_bf_ed_bf_bf_=_"??"______________________|
+0104_5.2.5__U+DB80_U+DC00_=_ed_ae_80_ed_b0_80_=_"??"______________________|
+0105_5.2.6__U+DB80_U+DFFF_=_ed_ae_80_ed_bf_bf_=_"??"______________________|
+0106_5.2.7__U+DBFF_U+DC00_=_ed_af_bf_ed_b0_80_=_"??"______________________|
+0107_5.2.8__U+DBFF_U+DFFF_=_ed_af_bf_ed_bf_bf_=_"??"______________________|
+0108_5.3_Other_illegal_code_positions_____________________________________|
+0109_5.3.1__U+FFFE_=_ef_bf_be_=_"?"_______________________________________|
+0110_5.3.2__U+FFFF_=_ef_bf_bf_=_"?"_______________________________________|
+' "" ""
+
+rm -rf ls.testdir 2>/dev/null
+mkdir ls.testdir || exit 1
+
+# testing "test name" "command" "expected result" "file input" "stdin"
+
+test x"$CONFIG_FEATURE_LS_SORTFILES" = x"y" \
+&& testing "ls symlink_to_dir" \
+"touch ls.testdir/A ls.testdir/B; ln -s ls.testdir ls.link; ls ls.link; ls -1 ls.link/; ls -1 ls.link; rm -f ls.link" \
+"A\nB\nA\nB\nA\nB\n" \
+"" ""
+
+# Clean up
+rm -rf ls.testdir 2>/dev/null
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/ls/ls-1-works b/ap/app/busybox/src/testsuite/ls/ls-1-works
new file mode 100644
index 0000000..71ab9a6
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/ls/ls-1-works
@@ -0,0 +1,6 @@
+# FEATURE: CONFIG_FEATURE_LS_SORTFILES
+
+[ -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/ap/app/busybox/src/testsuite/ls/ls-h-works b/ap/app/busybox/src/testsuite/ls/ls-h-works
new file mode 100644
index 0000000..60016ba
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/ls/ls-h-works
@@ -0,0 +1,6 @@
+# FEATURE: CONFIG_FEATURE_LS_SORTFILES CONFIG_FEATURE_HUMAN_READABLE
+
+[ -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/ap/app/busybox/src/testsuite/ls/ls-l-works b/ap/app/busybox/src/testsuite/ls/ls-l-works
new file mode 100644
index 0000000..ce08810
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/ls/ls-l-works
@@ -0,0 +1,8 @@
+test x"$SKIP_KNOWN_BUGS" != x"" && exit
+
+# busybox does not emit "total NNN" line
+
+[ -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/ap/app/busybox/src/testsuite/ls/ls-s-works b/ap/app/busybox/src/testsuite/ls/ls-s-works
new file mode 100644
index 0000000..8bf5c64
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/ls/ls-s-works
@@ -0,0 +1,8 @@
+test x"$SKIP_KNOWN_BUGS" != x"" && exit
+
+# busybox does not emit "total NNN" line
+
+[ -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/ap/app/busybox/src/testsuite/makedevs.device_table.txt b/ap/app/busybox/src/testsuite/makedevs.device_table.txt
new file mode 100644
index 0000000..88ac209
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/makedevs.tests b/ap/app/busybox/src/testsuite/makedevs.tests
new file mode 100755
index 0000000..fd12460
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/makedevs.tests
@@ -0,0 +1,150 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+
+test x"`id -u`" = x"0" || {
+	echo "SKIPPED: makedevs (must be root to test this)"
+	exit 0
+}
+
+unset LANG
+unset LC_COLLATE
+unset LC_ALL
+
+# 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
+
+optional FEATURE_MAKEDEVS_TABLE FEATURE_FIND_NOT FEATURE_FIND_TYPE FEATURE_LS_RECURSIVE FEATURE_LS_SORTFILES
+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
+" \
+	"" ""
+SKIP=
+
+# clean up
+rm -rf makedevs.testdir
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/md5sum.tests b/ap/app/busybox/src/testsuite/md5sum.tests
new file mode 100755
index 0000000..1068b08
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/md5sum.tests
@@ -0,0 +1,43 @@
+#!/bin/sh
+# Used by {ms5,shaN}sum
+
+# We pipe texts 0...999 bytes long, {md5,shaN}sum them,
+# then {md5,shaN}sum the resulting list.
+# Then we compare the result with expected result.
+#
+# Here are the expected results:
+# efe30c482e0b687e0cca0612f42ca29b
+# d41337e834377140ae7f98460d71d908598ef04f
+# 8e1d3ed57ebc130f0f72508446559eeae06451ae6d61b1e8ce46370cfb8963c3
+# fe413e0f177324d1353893ca0772ceba83fd41512ba63895a0eebb703ef9feac2fb4e92b2cb430b3bda41b46b0cb4ea8307190a5cc795157cfb680a9cd635d0f
+
+if ! test "$1"; then
+	set -- md5sum efe30c482e0b687e0cca0612f42ca29b
+fi
+
+sum="$1"
+expected="$2"
+
+test -f "$bindir/.config" && . "$bindir/.config"
+
+test x"$CONFIG_FEATURE_FANCY_HEAD" != x"y" \
+&& { echo "SKIPPED: $sum"; exit 0; }
+
+text="The quick brown fox jumps over the lazy dog"
+text=`yes "$text" | head -c 9999`
+
+result=`(
+n=0
+while test $n -le 999; do
+	echo "$text" | head -c $n | "$sum"
+	: $((n++))
+done | "$sum"
+)`
+
+if test x"$result" = x"$expected  -"; then
+    echo "PASS: $sum"
+    exit 0
+fi
+
+echo "FAIL: $sum (r:$result exp:$expected)"
+exit 1
diff --git a/ap/app/busybox/src/testsuite/md5sum/md5sum-verifies-non-binary-file b/ap/app/busybox/src/testsuite/md5sum/md5sum-verifies-non-binary-file
new file mode 100644
index 0000000..1df818e
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/md5sum/md5sum-verifies-non-binary-file
@@ -0,0 +1,5 @@
+# FEATURE: CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
+
+touch foo
+md5sum foo > bar
+busybox md5sum -c bar
diff --git a/ap/app/busybox/src/testsuite/mdev.tests b/ap/app/busybox/src/testsuite/mdev.tests
new file mode 100755
index 0000000..48d3dcc
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/mdev.tests
@@ -0,0 +1,246 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./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="grep -v '^total ' | sed -e 's/,  */,/g' -e 's/  */ /g' | cut -d' ' -f 1-5,9-"
+# cut: remove size+date
+FILTER_LS2="grep -v '^total ' | sed -e 's/,  */,/g' -e 's/  */ /g' | cut -d' ' -f 1-4,9-"
+
+# testing "test name" "commands" "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
+
+optional STATIC FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
+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
+" \
+	"" ""
+SKIP=
+
+# continuing to use directory structure from prev test
+optional STATIC FEATURE_MDEV_CONF FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
+testing "mdev deletes /block/sda" \
+	"env - PATH=$PATH ACTION=remove DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
+	ls -ln mdev.testdir/dev | $FILTER_LS" \
+"\
+" \
+	"" ""
+SKIP=
+
+# 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
+optional STATIC FEATURE_MDEV_CONF FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
+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
+" \
+	"" ""
+SKIP=
+
+# 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
+optional STATIC FEATURE_MDEV_CONF FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
+testing "mdev does not stop on dash-rule" \
+	"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
+	ls -ln mdev.testdir/dev | $FILTER_LS" \
+"\
+br--r--r-- 1 2 2 8,0 sda
+" \
+	"" ""
+SKIP=
+
+# continuing to use directory structure from prev test
+rm -rf mdev.testdir/dev/*
+echo "\$MODALIAS=qw  1:1 666" >mdev.testdir/etc/mdev.conf
+echo "\$MODALIAS=qw. 2:2 444" >>mdev.testdir/etc/mdev.conf
+echo "\$MODALIAS=qw. 3:3 400" >>mdev.testdir/etc/mdev.conf
+optional STATIC FEATURE_MDEV_CONF FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
+testing "mdev \$ENVVAR=regex match" \
+	"env - PATH=$PATH ACTION=add DEVPATH=/block/sda MODALIAS=qwe chroot mdev.testdir /mdev 2>&1;
+	ls -ln mdev.testdir/dev | $FILTER_LS" \
+"\
+br--r--r-- 1 2 2 8,0 sda
+" \
+	"" ""
+SKIP=
+
+# 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
+optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
+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
+" \
+	"" ""
+SKIP=
+
+# continuing to use directory structure from prev test
+rm -rf mdev.testdir/dev/*
+echo "sda 0:0 444 >disk/" >mdev.testdir/etc/mdev.conf
+optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
+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
+" \
+	"" ""
+SKIP=
+
+# continuing to use directory structure from prev test
+rm -rf mdev.testdir/dev/*
+echo "sda 0:0 444 =disk/sd/a" >mdev.testdir/etc/mdev.conf
+optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
+testing "mdev move rule '=bar/baz/fname'" \
+	"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 3 0 0 disk
+
+mdev.testdir/dev/disk:
+drwxr-xr-x 2 0 0 sd
+
+mdev.testdir/dev/disk/sd:
+br--r--r-- 1 0 0 a
+" \
+	"" ""
+SKIP=
+
+# 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
+optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_MDEV_RENAME_REGEXP FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME FEATURE_LS_SORTFILES
+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
+" \
+	"" ""
+SKIP=
+
+# 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
+optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_EXEC FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME FEATURE_SH_IS_ASH
+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
+" \
+	"" ""
+SKIP=
+
+# continuing to use directory structure from prev test
+rm -rf mdev.testdir/dev/*
+echo "sda 0:0 644 =block/ @echo @echo TEST:\$MDEV" >mdev.testdir/etc/mdev.conf
+optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_MDEV_EXEC FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME FEATURE_SH_IS_ASH
+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:block/sda
+mdev.testdir/dev:
+drwxr-xr-x 2 0 0 block
+
+mdev.testdir/dev/block:
+brw-r--r-- 1 0 0 sda
+" \
+	"" ""
+SKIP=
+
+# continuing to use directory structure from prev test
+rm -rf mdev.testdir/dev/*
+echo "@8,0 0:1 644" >mdev.testdir/etc/mdev.conf
+optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_MDEV_RENAME_REGEXP FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
+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
+" \
+	"" ""
+SKIP=
+
+# continuing to use directory structure from prev test
+rm -rf mdev.testdir/dev/*
+mkdir -p mdev.testdir/sys/class/tty/capi
+echo "191:0" >mdev.testdir/sys/class/tty/capi/dev
+mkdir -p mdev.testdir/sys/class/tty/capi1
+echo "191:1" >mdev.testdir/sys/class/tty/capi1/dev
+mkdir -p mdev.testdir/sys/class/tty/capi20
+echo "191:20" >mdev.testdir/sys/class/tty/capi20/dev
+echo "capi            0:0 0660 =capi20"      >mdev.testdir/etc/mdev.conf
+echo "capi([0-9])     0:0 0660 =capi20.0%1" >>mdev.testdir/etc/mdev.conf
+echo "capi([0-9]*)    0:0 0660 =capi20.%1"  >>mdev.testdir/etc/mdev.conf
+# mdev invocation with DEVPATH=/class/tty/capi20 was deleting /dev/capi20
+optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_MDEV_RENAME_REGEXP FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME FEATURE_LS_SORTFILES
+testing "move rule does not delete node with name == device_name" \
+	"\
+	env - PATH=$PATH ACTION=add DEVPATH=/class/tty/capi chroot mdev.testdir /mdev 2>&1;
+	env - PATH=$PATH ACTION=add DEVPATH=/class/tty/capi1 chroot mdev.testdir /mdev 2>&1;
+	env - PATH=$PATH ACTION=add DEVPATH=/class/tty/capi20 chroot mdev.testdir /mdev 2>&1;
+	ls -lnR mdev.testdir/dev | $FILTER_LS" \
+"\
+mdev.testdir/dev:
+crw-rw---- 1 0 0 191,0 capi20
+crw-rw---- 1 0 0 191,1 capi20.01
+crw-rw---- 1 0 0 191,20 capi20.20
+" \
+	"" ""
+SKIP=
+
+# clean up
+rm -rf mdev.testdir
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/mkdir/mkdir-makes-a-directory b/ap/app/busybox/src/testsuite/mkdir/mkdir-makes-a-directory
new file mode 100644
index 0000000..6ca5c4d
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/mkdir/mkdir-makes-a-directory
@@ -0,0 +1,2 @@
+busybox mkdir foo
+test -d foo
diff --git a/ap/app/busybox/src/testsuite/mkdir/mkdir-makes-parent-directories b/ap/app/busybox/src/testsuite/mkdir/mkdir-makes-parent-directories
new file mode 100644
index 0000000..992facb
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/mkdir/mkdir-makes-parent-directories
@@ -0,0 +1,2 @@
+busybox mkdir -p foo/bar
+test -d foo -a -d foo/bar
diff --git a/ap/app/busybox/src/testsuite/mkfs.minix.tests b/ap/app/busybox/src/testsuite/mkfs.minix.tests
new file mode 100755
index 0000000..324eaaf
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/mkfs.minix.tests
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# mkfs.minix tests.
+# Copyright 2007 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+
+# '\n' produces 10 on little endian, but not on big endian
+cr=`echo | od -i | sed 's/ *$//g;s/.* //g;2d'`
+if [ x"$cr" = x"10" ]; then
+	hash=4f35f7afeba07d56055bed1f29ae20b7
+else
+	hash=5adbc1b3ccd20ca5d0ab5bc1e13ac3fc
+fi
+
+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"\
+"$hash  -\n" \
+	"" \
+	""
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/mount.testroot b/ap/app/busybox/src/testsuite/mount.testroot
new file mode 100755
index 0000000..4f34c57
--- /dev/null
+++ b/ap/app/busybox/src/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 GPLv2, see file LICENSE in this source tree.
+
+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/ap/app/busybox/src/testsuite/mount.tests b/ap/app/busybox/src/testsuite/mount.tests
new file mode 100755
index 0000000..a0bc508
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/mount.tests
@@ -0,0 +1,111 @@
+#!/bin/sh
+# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com>
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+test -f "$bindir/.config" && . "$bindir/.config"
+
+test "`id -u`" = 0 || {
+	echo "SKIPPED: mount (must be root to test this)"
+	exit 0
+}
+
+if test x"$CONFIG_MKFS_MINIX" != x"y" \
+|| test x"$CONFIG_FEATURE_MINIX2" != x"y" \
+|| test x"$CONFIG_FEATURE_MOUNT_LOOP" != x"y" \
+|| test x"$CONFIG_FEATURE_MOUNT_FLAGS" != x"y" \
+|| test x"$CONFIG_FEATURE_DEVFS" = x"y" \
+; then
+	echo "SKIPPED: mount"
+	exit 0
+fi
+
+testdir="$PWD/mount.testdir"
+
+dd if=/dev/zero of=mount.image1m count=1 bs=1M 2>/dev/null || { echo "dd error"; exit 1; }
+mkfs.minix -v mount.image1m >/dev/null 2>&1 || { echo "mkfs.minix error"; exit 1; }
+modprobe minix 2>/dev/null
+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[, ]'"\
+"|| grep -F $testdir </proc/mounts" \
+	"1\n""1\n" \
+	"" ""
+
+umount -d "$testdir"
+rmdir "$testdir"
+rm mount.image1m
+
+
+# Bug: mount.shared1 directory shows no files (has to show files a and b)
+optional FEATURE_LS_RECURSIVE FEATURE_LS_SORTFILES
+testing "mount bind+rshared" "\
+mkdir -p mount.dir mount.shared1 mount.shared2
+touch mount.dir/a mount.dir/b
+
+mount --bind         mount.shared1 mount.shared1 2>&1
+mount --make-rshared mount.shared1               2>&1
+mount --bind         mount.shared2 mount.shared2 2>&1
+mount --make-rshared mount.shared2               2>&1
+
+mount --bind mount.shared2 mount.shared1         2>&1
+mount --bind mount.dir     mount.shared2         2>&1
+
+ls -R mount.dir mount.shared1 mount.shared2      2>&1
+
+umount mount.dir mount.shared1 mount.shared2 2>/dev/null
+umount mount.dir mount.shared1 mount.shared2 2>/dev/null
+umount mount.dir mount.shared1 mount.shared2 2>/dev/null
+rm -f mount.dir/a mount.dir/b mount.dir/c
+rmdir mount.dir mount.shared1 mount.shared2
+" \
+"\
+mount.dir:
+a
+b
+
+mount.shared1:
+a
+b
+
+mount.shared2:
+a
+b
+" \
+	"" ""
+SKIP=
+
+
+testing "mount RO loop" "\
+exec 2>&1
+umount -d mount.dir 2>/dev/null
+rmdir mount.dir     2>/dev/null
+mkdir -p mount.dir
+(
+cd mount.dir                               || { echo 'cd error'; exit 1; }
+mkdir z1 z2                                || { echo 'mkdir error'; exit 1; }
+mount -t tmpfs tmpfs z1                    || { echo 'mount tmpfs error'; exit 1; }
+dd if=/dev/zero of=z1/e2img count=10 bs=1M 2>/dev/null || { echo 'dd error'; exit 1; }
+mke2fs -F z1/e2img                         2>/dev/null >&2 || { echo 'mke2fs error'; exit 1; }
+mount -r -o loop -t ext2 z1/e2img z2       || { echo 'mount -r -o loop error'; exit 1; }
+mount -o remount,ro z1                     || { echo 'mount -o remount,ro error'; exit 1; }
+)
+umount -d mount.dir/z2
+##losetup -d /dev/loop*
+umount -d mount.dir/z1
+rm -rf mount.dir
+echo DONE
+" \
+"DONE\n" "" ""
+
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/msh/msh-supports-underscores-in-variable-names b/ap/app/busybox/src/testsuite/msh/msh-supports-underscores-in-variable-names
new file mode 100644
index 0000000..9c7834b
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/msh/msh-supports-underscores-in-variable-names
@@ -0,0 +1 @@
+test "`busybox msh -c 'FOO_BAR=foo; echo $FOO_BAR'`" = foo
diff --git a/ap/app/busybox/src/testsuite/mv/mv-files-to-dir b/ap/app/busybox/src/testsuite/mv/mv-files-to-dir
new file mode 100644
index 0000000..2b567f7
--- /dev/null
+++ b/ap/app/busybox/src/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
+TZ=UTC0 touch -d '2000-01-30 05:24:08' 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/ap/app/busybox/src/testsuite/mv/mv-follows-links b/ap/app/busybox/src/testsuite/mv/mv-follows-links
new file mode 100644
index 0000000..1fb355b
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/mv/mv-moves-empty-file b/ap/app/busybox/src/testsuite/mv/mv-moves-empty-file
new file mode 100644
index 0000000..48afca4
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/mv/mv-moves-file b/ap/app/busybox/src/testsuite/mv/mv-moves-file
new file mode 100644
index 0000000..edb4c37
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/mv/mv-moves-file
@@ -0,0 +1,3 @@
+touch foo
+busybox mv foo bar
+test ! -f foo -a -f bar
diff --git a/ap/app/busybox/src/testsuite/mv/mv-moves-hardlinks b/ap/app/busybox/src/testsuite/mv/mv-moves-hardlinks
new file mode 100644
index 0000000..eaa8215
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/mv/mv-moves-large-file b/ap/app/busybox/src/testsuite/mv/mv-moves-large-file
new file mode 100644
index 0000000..77d088f
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/mv/mv-moves-small-file b/ap/app/busybox/src/testsuite/mv/mv-moves-small-file
new file mode 100644
index 0000000..065c7f1
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/mv/mv-moves-symlinks b/ap/app/busybox/src/testsuite/mv/mv-moves-symlinks
new file mode 100644
index 0000000..c413af0
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/mv/mv-moves-unreadable-files b/ap/app/busybox/src/testsuite/mv/mv-moves-unreadable-files
new file mode 100644
index 0000000..bc9c313
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/mv/mv-preserves-hard-links b/ap/app/busybox/src/testsuite/mv/mv-preserves-hard-links
new file mode 100644
index 0000000..b3ba3aa
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/mv/mv-preserves-links b/ap/app/busybox/src/testsuite/mv/mv-preserves-links
new file mode 100644
index 0000000..ea565d2
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/mv/mv-refuses-mv-dir-to-subdir b/ap/app/busybox/src/testsuite/mv/mv-refuses-mv-dir-to-subdir
new file mode 100644
index 0000000..3bad131
--- /dev/null
+++ b/ap/app/busybox/src/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
+TZ=UTC0 touch -d '2000-01-30 05:24:08' 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/ap/app/busybox/src/testsuite/mv/mv-removes-source-file b/ap/app/busybox/src/testsuite/mv/mv-removes-source-file
new file mode 100644
index 0000000..48afca4
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/od.tests b/ap/app/busybox/src/testsuite/od.tests
new file mode 100755
index 0000000..7a9da3e
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/od.tests
@@ -0,0 +1,39 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+
+# testing "test name" "commands" "expected result" "file input" "stdin"
+
+optional DESKTOP
+testing "od -b" \
+	"od -b" \
+"\
+0000000 110 105 114 114 117
+0000005
+" \
+	"" "HELLO"
+SKIP=
+
+optional DESKTOP LONG_OPTS
+testing "od -b --traditional" \
+	"od -b --traditional" \
+"\
+0000000 110 105 114 114 117
+0000005
+" \
+	"" "HELLO"
+SKIP=
+
+optional DESKTOP LONG_OPTS
+testing "od -b --traditional FILE" \
+	"od -b --traditional input" \
+"\
+0000000 110 105 114 114 117
+0000005
+" \
+	"HELLO" ""
+SKIP=
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/parse.tests b/ap/app/busybox/src/testsuite/parse.tests
new file mode 100755
index 0000000..904e1a1
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/parse.tests
@@ -0,0 +1,110 @@
+#!/bin/sh
+
+# Copyright 2008 by Denys Vlasenko <vda.linux@googlemail.com>
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./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]
+[option][0x08][01020304]
+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/ap/app/busybox/src/testsuite/patch.tests b/ap/app/busybox/src/testsuite/patch.tests
new file mode 100755
index 0000000..2759d2a
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/patch.tests
@@ -0,0 +1,247 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+
+# testing "test name" "command(s)" "expected result" "file input" "stdin"
+
+testing "patch with old_file == new_file" \
+	'patch 2>&1; echo $?; cat input' \
+"\
+patching file input
+0
+qwe
+asd
+zxc
+" \
+"\
+qwe
+zxc
+" \
+"\
+--- 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 2>&1; echo $?; cat input' \
+"\
+patching file input
+0
+qwe
+asd
+zxc
+" \
+"\
+qwe
+zxc
+" \
+"\
+--- 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 2>&1; echo $?; cat input' \
+"\
+patching file input
+0
+qwe
+zxc
+" \
+"\
+qwe
+asd
+zxc
+" \
+"\
+--- 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 detects already applied hunk" \
+	'patch 2>&1; echo $?; cat input' \
+"\
+Possibly reversed hunk 1 at 4
+Hunk 1 FAILED 1/1.
+ abc
++def
+ 123
+patching file input
+1
+abc
+def
+123
+" \
+"\
+abc
+def
+123
+" \
+"\
+--- input.old	Jan 01 01:01:01 2000
++++ input	Jan 01 01:01:01 2000
+@@ -1,2 +1,3 @@
+ abc
++def
+ 123
+" \
+
+testing "patch detects already applied hunk at the EOF" \
+	'patch 2>&1; echo $?; cat input' \
+"\
+Possibly reversed hunk 1 at 4
+Hunk 1 FAILED 1/1.
+ abc
+ 123
++456
+patching file input
+1
+abc
+123
+456
+" \
+"\
+abc
+123
+456
+" \
+"\
+--- input.old	Jan 01 01:01:01 2000
++++ input	Jan 01 01:01:01 2000
+@@ -1,2 +1,3 @@
+ abc
+ 123
++456
+" \
+
+# testing "test name" "command(s)" "expected result" "file input" "stdin"
+testing "patch -N ignores already applied hunk" \
+	'patch -N 2>&1; echo $?; cat input' \
+"\
+patching file input
+0
+abc
+def
+123
+" \
+"\
+abc
+def
+123
+" \
+"\
+--- input
++++ input
+@@ -1,2 +1,3 @@
+ abc
++def
+ 123
+" \
+
+# testing "test name" "command(s)" "expected result" "file input" "stdin"
+testing "patch FILE PATCH" \
+	'cat >a.patch; patch input a.patch 2>&1; echo $?; cat input; rm a.patch' \
+"\
+patching file input
+0
+abc
+def
+123
+" \
+"\
+abc
+123
+" \
+"\
+--- foo.old
++++ foo
+@@ -1,2 +1,3 @@
+ abc
++def
+ 123
+" \
+
+# testing "test name" "command(s)" "expected result" "file input" "stdin"
+testing "patch at the beginning" \
+	'patch 2>&1; cat input' \
+"\
+patching file input
+111changed
+444
+555
+666
+777
+888
+999
+" \
+"\
+111
+222
+333
+444
+555
+666
+777
+888
+999
+" \
+"\
+--- input
++++ input
+@@ -1,6 +1,4 @@
+-111
+-222
+-333
++111changed
+ 444
+ 555
+ 666
+" \
+
+# testing "test name" "command(s)" "expected result" "file input" "stdin"
+testing "patch creates new file" \
+	'patch 2>&1; echo $?; cat testfile; rm testfile' \
+"\
+creating testfile
+0
+qwerty
+" "" "\
+--- /dev/null
++++ testfile
+@@ -0,0 +1 @@
++qwerty
+"
+
+# testing "test name" "command(s)" "expected result" "file input" "stdin"
+testing "patch understands ...dir///dir..." \
+	'patch -p1 2>&1; echo $?' \
+"\
+patching file dir2///file
+patch: can't open 'dir2///file': No such file or directory
+1
+" "" "\
+--- bogus_dir///dir2///file
++++ bogus_dir///dir2///file
+@@ -1,2 +1,3 @@
+ qwe
++asd
+ zxc
+"
+
+rm input.orig 2>/dev/null
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/pidof.tests b/ap/app/busybox/src/testsuite/pidof.tests
new file mode 100755
index 0000000..2a06d2b
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/pidof.tests
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# pidof tests.
+# Copyright 2005 by Bernhard Reutner-Fischer
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+# 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" "" ""
+SKIP=
+
+optional FEATURE_PIDOF_OMIT FEATURE_PIDOF_SINGLE
+# 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" "" "" ""
+SKIP=
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/printf.tests b/ap/app/busybox/src/testsuite/printf.tests
new file mode 100755
index 0000000..9a3c874
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/printf.tests
@@ -0,0 +1,108 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./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" \
+	"" ""
+
+# "FIXED" now to act compatibly
+## 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" \
+#	"" ""
+
+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: invalid number 'bad'\n""0\n"\
+"3\n""printf: invalid number '123bad'\n""0\n"\
+"4\n""1\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/ap/app/busybox/src/testsuite/pwd/pwd-prints-working-directory b/ap/app/busybox/src/testsuite/pwd/pwd-prints-working-directory
new file mode 100644
index 0000000..8575347
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/pwd/pwd-prints-working-directory
@@ -0,0 +1 @@
+test $(pwd) = $(busybox pwd)
diff --git a/ap/app/busybox/src/testsuite/readlink.tests b/ap/app/busybox/src/testsuite/readlink.tests
new file mode 100755
index 0000000..c7fc8ad
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/readlink.tests
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Readlink tests.
+# Copyright 2006 by Natanael Copa <n@tanael.org>
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./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"
+
+exit $((FAILCOUNT <= 255 ? FAILCOUNT : 255))
diff --git a/ap/app/busybox/src/testsuite/rm/rm-removes-file b/ap/app/busybox/src/testsuite/rm/rm-removes-file
new file mode 100644
index 0000000..46571a9
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/rm/rm-removes-file
@@ -0,0 +1,3 @@
+touch foo
+busybox rm foo
+test ! -f foo
diff --git a/ap/app/busybox/src/testsuite/rmdir/rmdir-removes-parent-directories b/ap/app/busybox/src/testsuite/rmdir/rmdir-removes-parent-directories
new file mode 100644
index 0000000..222f5de
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/rmdir/rmdir-removes-parent-directories
@@ -0,0 +1,3 @@
+mkdir -p foo/bar
+busybox rmdir -p foo/bar
+test ! -d foo
diff --git a/ap/app/busybox/src/testsuite/runtest b/ap/app/busybox/src/testsuite/runtest
new file mode 100755
index 0000000..51575d9
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/runtest
@@ -0,0 +1,171 @@
+#!/bin/sh
+# Usage:
+# runtest [applet1] [applet2...]
+
+. ./testing.sh
+
+total_failed=0
+
+# 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 status=0
+	local uc_applet=$(echo "$applet" | tr a-z A-Z)
+	local testname="$testcase"
+
+	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 "^# FEATURE: " "$testcase" >/dev/null; then
+		local feature=$(sed -ne 's/^# FEATURE: //p' "$testcase")
+
+		for f in $feature; do
+			if grep "^# $f is not set$" "$bindir/.config" >/dev/null; then
+				echo "UNTESTED: $testname"
+				return 0
+			fi
+		done
+	fi
+
+	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
+		echo "PASS: $testname"
+	fi
+
+	cd ..
+	rm -rf ".tmpdir.$applet"
+
+	return $status
+}
+
+# Run all old-style tests for given applet
+run_oldstyle_applet_tests()
+{
+	local applet="$1"
+	local status=0
+
+	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
+			total_failed=$((total_failed + 1))
+		}
+	done
+	return $status
+}
+
+
+
+lcwd=$(pwd)
+[ x"$tsdir" != x"" ] || tsdir="$lcwd"
+[ x"$bindir" != x"" ] || bindir="${lcwd%/*}" # one directory up from $lcwd
+PATH="$bindir:$PATH"
+export bindir   # some tests need to look at $bindir/.config
+
+if [ x"$VERBOSE" = x ]; then
+	export VERBOSE=
+fi
+
+if [ x"$1" = x"-v" ]; then
+	export VERBOSE=1
+	shift
+fi
+
+implemented=$(
+	printf "busybox " # always 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="$@"
+fi
+
+# Populate a directory with links to all busybox applets
+
+LINKSDIR="$bindir/runtest-tempdir-links"
+
+# Comment this line out if you have put a different binary in $LINKSDIR
+# (say, a "standard" tool's binary) in order to run tests against it:
+rm -rf "$LINKSDIR" 2>/dev/null
+
+mkdir "$LINKSDIR" 2>/dev/null
+for i in $implemented; do
+	# Note: if $LINKSDIR/applet exists, we do not overwrite it.
+	# Useful if one wants to run tests against a standard utility,
+	# not an applet.
+	ln -s "$bindir/busybox" "$LINKSDIR/$i" 2>/dev/null
+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
+	# 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 [ ! -e "$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"
+		rc=$?
+		total_failed=$((total_failed + rc))
+		test $rc -ne 0 && 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 "$total_failed failure(s) detected; running with -v (verbose) will give more info"
+fi
+exit $status
diff --git a/ap/app/busybox/src/testsuite/rx.tests b/ap/app/busybox/src/testsuite/rx.tests
new file mode 100755
index 0000000..37fa02e
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/rx.tests
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Copyright 2009 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+
+# Simple one-block file transfer
+# rx => 'C'
+# rx <= SOH <blockno> <255-blockno> <128 byte padded with x1A> <crc> <crc>
+# rx => ACK
+# rx <= EOT
+# rx => ACK
+testing "rx" \
+	"rx rx.OUTFILE | hexdump -vC && cat rx.OUTFILE" \
+"\
+00000000  43 06 06                                          |C..|\n\
+00000003\n\
+???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????" \
+	"" "\01\01\0376\
+???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????\
+\x1A\x1A\x1A\x1A\x1A\x4B\xB0\04"
+
+rm -f rx.OUTFILE 2>/dev/null
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/sed.tests b/ap/app/busybox/src/testsuite/sed.tests
new file mode 100755
index 0000000..468565f
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/sed.tests
@@ -0,0 +1,315 @@
+#!/bin/sh
+
+# SUSv3 compliant sed tests.
+# Copyright 2005 by Rob Landley <rob@landley.net>
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+
+# testing "description" "commands" "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 with empty match" "sed 's/z*//g'" "string\n" "" "string\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"
+
+test x"$SKIP_KNOWN_BUGS" = x"" && {
+# 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"
+}
+# non-GNU sed: N does _not_ flush pattern space, therefore c is eaten @ script end
+# GNU sed: N flushes pattern space, therefore c is printed too @ script end
+testing "sed N (flushes pattern space (GNU behavior))" "sed -e 'N;p'" \
+	"a\nb\na\nb\nc\n" "" "a\nb\nc\n"
+
+testing "sed N test2" "sed ':a;N;s/\n/ /;ta'" \
+	"a b c\n" "" "a\nb\nc\n"
+
+testing "sed N test3" "sed 'N;s/\n/ /'" \
+	"a b\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
+test x"$SKIP_KNOWN_BUGS" = x"" && {
+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"
+test x"$SKIP_KNOWN_BUGS" = x"" && {
+$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" ""
+test x"$SKIP_KNOWN_BUGS" = x"" && {
+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"
+test x"$SKIP_KNOWN_BUGS" = x"" && {
+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
+test x"$SKIP_KNOWN_BUGS" = x"" && {
+# Incompatibility: illegal jump is not detected if input is ""
+# (that is, no lines at all). GNU sed 4.1.5 complains even in this case
+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" "commands" "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"
+
+testing "sed d does not break n,m matching" \
+	"sed -n '1d;1,3p'" \
+	"second\nthird\n" "" "first\nsecond\nthird\nfourth\n"
+
+testing "sed d does not break n,regex matching" \
+	"sed -n '1d;1,/hir/p'" \
+	"second\nthird\n" "" "first\nsecond\nthird\nfourth\n"
+
+testing "sed d does not break n,regex matching #2" \
+	"sed -n '1,5d;1,/hir/p'" \
+	"second2\nthird2\n" "" \
+	"first\nsecond\nthird\nfourth\n""first2\nsecond2\nthird2\nfourth2\n"
+
+testing "sed 2d;2,1p (gnu compat)" \
+	"sed -n '2d;2,1p'" \
+	"third\n" "" \
+	"first\nsecond\nthird\nfourth\n"
+
+# Regex means: "match / at BOL or nothing, then one or more not-slashes".
+# The bug was that second slash in /usr/lib was treated as "at BOL" too.
+testing "sed beginning (^) matches only once" \
+	"sed 's,\(^/\|\)[^/][^/]*,>\0<,g'" \
+	">/usr</>lib<\n" "" \
+	"/usr/lib\n"
+
+testing "sed c" \
+	"sed 'crepl'" \
+	"repl\nrepl\n" "" \
+	"first\nsecond\n"
+
+testing "sed nested {}s" \
+	"sed '/asd/ { p; /s/ { s/s/c/ }; p; q }'" \
+	"qwe\nasd\nacd\nacd\n" "" \
+	"qwe\nasd\nzxc\n"
+
+testing "sed a cmd ended by double backslash" \
+	"sed -e '/| one /a \\
+	| three \\\\' -e '/| one-/a \\
+	| three-* \\\\'" \
+'	| one \\
+	| three \\
+	| two \\
+' '' \
+'	| one \\
+	| two \\
+'
+
+# first three lines are deleted; 4th line is matched and printed by "2,3" and by "4" ranges
+testing "sed with N skipping lines past ranges on next cmds" \
+	"sed -n '1{N;N;d};1p;2,3p;3p;4p'" \
+	"4\n4\n" "" "1\n2\n3\n4\n"
+
+testing "sed -i with address modifies all files, not only first" \
+	"cp input input2; sed -i -e '1s/foo/bar/' input input2 && cat input input2; rm input2" \
+	"bar\nbar\n" "foo\n" ""
+
+testing "sed understands \r" \
+	"sed 's/r/\r/'" \
+	"\rrr\n" "" "rrr\n"
+
+testing "sed -i finishes ranges correctly" \
+	"sed '1,2d' -i input; echo \$?; cat input" \
+	"0\n3\n4\n" "1\n2\n3\n4\n" ""
+
+testing "sed zero chars match/replace advances correctly 1" \
+	"sed 's/l*/@/g'" \
+	"@h@e@o@\n" "" "helllo\n"
+
+testing "sed zero chars match/replace advances correctly 2" \
+	"sed 's [^ .]* x g'" \
+	"x x.x\n" "" " a.b\n"
+
+testing "sed zero chars match/replace logic must not falsely trigger here 1" \
+	"sed 's/a/A/g'" \
+	"_AAA1AA\n" "" "_aaa1aa\n"
+
+testing "sed zero chars match/replace logic must not falsely trigger here 2" \
+	"sed 's/ *$/_/g'" \
+	"qwerty_\n" "" "qwerty\n"
+
+# testing "description" "commands" "result" "infile" "stdin"
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/seq.tests b/ap/app/busybox/src/testsuite/seq.tests
new file mode 100755
index 0000000..1e1116c
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/seq.tests
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# SUSv3 compliant seq tests.
+# Copyright 2006 by Rob Landley <rob@landley.net>
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+# 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 .30" "seq 3 .30 4" "3.00\n3.30\n3.60\n3.90\n" "" ""
+testing "seq count by .30 to 4.000" "seq 3 .30 4.000" "3.00\n3.30\n3.60\n3.90\n" "" ""
+testing "seq count by -.9" "seq .7 -.9 -2.2" "0.7\n-0.2\n-1.1\n-2.0\n" "" ""
+testing "seq count by zero" "seq 4 0 8 | head -n 10" "4\n4\n4\n4\n4\n4\n4\n4\n4\n4\n" "" ""
+
+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" "" ""
+# Looks like a bug in coreutils 6.10: it uses width one less than needed
+# These tests contain the expected "fixed" output
+testing "seq count by .3 with padding 1" "seq -w 09 .3 11" "09.0\n09.3\n09.6\n09.9\n10.2\n10.5\n10.8\n" "" ""
+testing "seq count by .3 with padding 2" "seq -w 03 .3 0004" "0003.0\n0003.3\n0003.6\n0003.9\n" "" ""
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/sha1sum.tests b/ap/app/busybox/src/testsuite/sha1sum.tests
new file mode 100755
index 0000000..a968fa8
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/sha1sum.tests
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+. ./md5sum.tests sha1sum d41337e834377140ae7f98460d71d908598ef04f
diff --git a/ap/app/busybox/src/testsuite/sha256sum.tests b/ap/app/busybox/src/testsuite/sha256sum.tests
new file mode 100755
index 0000000..d2dd78f
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/sha256sum.tests
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+. ./md5sum.tests sha256sum 8e1d3ed57ebc130f0f72508446559eeae06451ae6d61b1e8ce46370cfb8963c3
diff --git a/ap/app/busybox/src/testsuite/sha3sum.tests b/ap/app/busybox/src/testsuite/sha3sum.tests
new file mode 100755
index 0000000..82fada6
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/sha3sum.tests
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+. ./md5sum.tests sha3sum c29d77bc548fa2b20a04c861400a5360879c52156e2a54a3415b99a9a3123e1d5f36714a24eca8c1f05a8e2d8ba859c930d41141f64a255c6794436fc99c486a
diff --git a/ap/app/busybox/src/testsuite/sha512sum.tests b/ap/app/busybox/src/testsuite/sha512sum.tests
new file mode 100755
index 0000000..3bc7cae
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/sha512sum.tests
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+. ./md5sum.tests sha512sum fe413e0f177324d1353893ca0772ceba83fd41512ba63895a0eebb703ef9feac2fb4e92b2cb430b3bda41b46b0cb4ea8307190a5cc795157cfb680a9cd635d0f
diff --git a/ap/app/busybox/src/testsuite/sort.tests b/ap/app/busybox/src/testsuite/sort.tests
new file mode 100755
index 0000000..91b282e
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/sort.tests
@@ -0,0 +1,131 @@
+#!/bin/sh
+
+# SUSv3 compliant sort tests.
+# Copyright 2005 by Rob Landley <rob@landley.net>
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./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
+"
+
+# testing "description" "command(s)" "result" "infile" "stdin"
+
+# 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" ""
+
+test x"$SKIP_KNOWN_BUGS" = x"" && {
+# Busybox is definitely doing these wrong.  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"
+
+testing "sort file in place" \
+"sort -o input input && cat input" "\
+111
+222
+" "\
+222
+111
+" ""
+
+# testing "description" "command(s)" "result" "infile" "stdin"
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/start-stop-daemon.tests b/ap/app/busybox/src/testsuite/start-stop-daemon.tests
new file mode 100755
index 0000000..d07aeef
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/start-stop-daemon.tests
@@ -0,0 +1,19 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./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/ap/app/busybox/src/testsuite/strings/strings-works-like-GNU b/ap/app/busybox/src/testsuite/strings/strings-works-like-GNU
new file mode 100644
index 0000000..2d64710
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/strings/strings-works-like-GNU
@@ -0,0 +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
+	set -e
+	diff -q foo bar
+fi
diff --git a/ap/app/busybox/src/testsuite/sum.tests b/ap/app/busybox/src/testsuite/sum.tests
new file mode 100755
index 0000000..b9f4cbf
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/sum.tests
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# unit test for sum.
+# Copyright 2007 by Bernhard Reutner-Fischer
+# Licensed under GPLv2 or later, see file LICENSE in this source tree.
+
+# 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/ap/app/busybox/src/testsuite/tail.tests b/ap/app/busybox/src/testsuite/tail.tests
new file mode 100755
index 0000000..305a83b
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tail.tests
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# Copyright 2009 by Denys Vlasenko <vda.linux@googlemail.com>
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./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
+
+testing "tail: +N with N > file length" \
+	"tail -c +55 2>&1; echo \$?" \
+	"0\n" \
+	"" "qw"
+
+testing "tail: -c +N with largish N" \
+	"
+	dd if=/dev/zero bs=16k count=1 2>/dev/null | tail -c +8200 | wc -c;
+	dd if=/dev/zero bs=16k count=1 2>/dev/null | tail -c +8208 | wc -c;
+	" \
+	"8185\n8177\n" \
+	"" ""
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/tail/tail-n-works b/ap/app/busybox/src/testsuite/tail/tail-n-works
new file mode 100644
index 0000000..0e1319f
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/tail/tail-works b/ap/app/busybox/src/testsuite/tail/tail-works
new file mode 100644
index 0000000..50eca13
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tail/tail-works
@@ -0,0 +1,6 @@
+# FEATURE: CONFIG_INCLUDE_SUSv2
+
+$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/ap/app/busybox/src/testsuite/tar.tests b/ap/app/busybox/src/testsuite/tar.tests
new file mode 100755
index 0000000..7927020
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tar.tests
@@ -0,0 +1,214 @@
+#!/bin/sh
+# Copyright 2009 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+
+unset LANG
+unset LANGUAGE
+unset LC_COLLATE
+unset LC_ALL
+umask 022
+
+rm -rf tar.tempdir 2>/dev/null
+mkdir tar.tempdir && cd tar.tempdir || exit 1
+
+# testing "test name" "script" "expected result" "file input" "stdin"
+
+optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES
+testing "tar hardlinks and repeated files" '\
+rm -rf input_* test.tar 2>/dev/null
+>input_hard1
+ln input_hard1 input_hard2
+mkdir input_dir
+>input_dir/file
+chmod -R 644 *
+chmod    755 input_dir
+tar cf test.tar input input_dir/ input_hard1 input_hard2 input_hard1 input_dir/ input
+tar tvf test.tar | sed "s/.*[0-9] input/input/"
+tar xf test.tar 2>&1
+echo Ok: $?
+ls -l . input_dir/* | grep input_ | sed "s/\\(^[^ ]*\\) .* input/\\1 input/"
+' "\
+input
+input_dir/
+input_dir/file
+input_hard1
+input_hard2 -> input_hard1
+input_hard1 -> input_hard1
+input_dir/
+input_dir/file
+input
+Ok: 0
+-rw-r--r-- input_dir/file
+drwxr-xr-x input_dir
+-rw-r--r-- input_hard1
+-rw-r--r-- input_hard2
+" \
+"" ""
+SKIP=
+
+optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES
+testing "tar hardlinks mode" '\
+rm -rf input_* test.tar 2>/dev/null
+>input_hard1
+chmod 741 input_hard1
+ln input_hard1 input_hard2
+mkdir input_dir
+ln input_hard1 input_dir
+ln input_hard2 input_dir
+chmod 550 input_dir
+# On some filesystems, input_dir/input_hard2 is returned by readdir
+# BEFORE input_dir/input_hard1! Thats why we cant just "tar cf ... input_*":
+tar cf test.tar input_dir/input_hard* input_hard*
+tar tvf test.tar | sed "s/.*[0-9] input/input/"
+chmod 770 input_dir
+rm -rf input_*
+tar xf test.tar 2>&1
+echo Ok: $?
+ls -l . input_dir/* | grep "input.*hard" | sed "s/\\(^[^ ]*\\) .* input/\\1 input/"
+' "\
+input_dir/input_hard1
+input_dir/input_hard2 -> input_dir/input_hard1
+input_hard1 -> input_dir/input_hard1
+input_hard2 -> input_dir/input_hard1
+Ok: 0
+-rwxr----x input_dir/input_hard1
+-rwxr----x input_dir/input_hard2
+-rwxr----x input_hard1
+-rwxr----x input_hard2
+" \
+"" ""
+SKIP=
+
+optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES
+testing "tar symlinks mode" '\
+rm -rf input_* test.tar 2>/dev/null
+>input_file
+chmod 741 input_file
+ln -s input_file input_soft
+mkdir input_dir
+ln input_file input_dir
+ln input_soft input_dir
+chmod 550 input_dir
+tar cf test.tar input_dir/* input_[fs]*
+tar tvf test.tar | sed "s/.*[0-9] input/input/" | sort
+chmod 770 input_dir
+rm -rf input_*
+tar xf test.tar 2>&1
+echo Ok: $?
+ls -l . input_dir/* | grep "input_[fs]" | sed "s/\\(^[^ ]*\\) .* input/\\1 input/"
+' "\
+input_dir/input_file
+input_dir/input_soft -> input_file
+input_file -> input_dir/input_file
+input_soft -> input_dir/input_soft
+Ok: 0
+-rwxr----x input_dir/input_file
+lrwxrwxrwx input_file
+-rwxr----x input_file
+lrwxrwxrwx input_file
+" \
+"" ""
+SKIP=
+
+optional FEATURE_TAR_CREATE FEATURE_TAR_LONG_OPTIONS
+testing "tar --overwrite" "\
+rm -rf input_* test.tar 2>/dev/null
+ln input input_hard
+tar cf test.tar input_hard
+echo WRONG >input
+# --overwrite opens 'input_hard' without unlinking,
+# thus 'input_hard' still linked to 'input' and we write 'Ok' into it
+tar xf test.tar --overwrite 2>&1 && cat input
+" "\
+Ok
+" \
+"Ok\n" ""
+SKIP=
+
+test x"$SKIP_KNOWN_BUGS" = x"" && {
+# Needs to be run under non-root for meaningful test
+optional FEATURE_TAR_CREATE
+testing "tar writing into read-only dir" '\
+rm -rf input_* test.tar 2>/dev/null
+mkdir input_dir
+>input_dir/input_file
+chmod 550 input_dir
+tar cf test.tar input_dir
+tar tvf test.tar | sed "s/.*[0-9] input/input/"
+chmod 770 input_dir
+rm -rf input_*
+tar xf test.tar 2>&1
+echo Ok: $?
+ls -l input_dir/* . | grep input_ | sed "s/\\(^[^ ]*\\) .* input/\\1 input/"
+chmod 770 input_dir
+' "\
+input_dir/
+input_dir/input_file
+Ok: 0
+-rw-r--r-- input_dir/input_file
+dr-xr-x--- input_dir
+" \
+"" ""
+SKIP=
+}
+
+# Had a bug where on extract autodetect first "switched off" -z
+# and then failed to recognize .tgz extension
+optional FEATURE_TAR_CREATE FEATURE_SEAMLESS_GZ
+testing "tar extract tgz" "\
+dd count=1 bs=1M if=/dev/zero of=F0 2>/dev/null
+tar -czf F0.tgz F0
+rm F0
+tar -xzvf F0.tgz && echo Ok
+rm F0 || echo BAD
+" "\
+F0
+Ok
+" \
+"" ""
+SKIP=
+
+# Do we detect XZ-compressed data (even w/o .tar.xz or txz extension)?
+# (the uuencoded hello_world.txz contains one empty file named "hello_world")
+optional UUDECODE FEATURE_TAR_AUTODETECT FEATURE_SEAMLESS_XZ
+testing "tar extract txz" "\
+uudecode -o input && tar tf input && echo Ok
+" "\
+hello_world
+Ok
+" \
+"" "\
+begin-base64 644 hello_world.txz
+/Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4AX/AEldADQZSe6ODIZQ3rSQ8kAJ
+SnMPTX+XWGKW3Yu/Rwqg4Ik5wqgQKgVH97J8yA8IvZ4ahaCQogUNHRkXibr2
+Q615wcb2G7fJU49AhWAAAAAAUA8gu9DyXfAAAWWADAAAAB5FXGCxxGf7AgAA
+AAAEWVo=
+====
+"
+SKIP=
+
+# On extract, everything up to and including last ".." component is stripped
+optional FEATURE_TAR_CREATE
+testing "tar strips /../ on extract" "\
+rm -rf input_* test.tar 2>/dev/null
+mkdir input_dir
+echo Ok >input_dir/file
+tar cf test.tar ./../tar.tempdir/input_dir/../input_dir 2>&1
+rm -rf input_* 2>/dev/null
+tar -vxf test.tar 2>&1
+cat input_dir/file 2>&1
+" "\
+tar: removing leading './../tar.tempdir/input_dir/../' from member names
+input_dir/
+input_dir/file
+Ok
+" \
+"" ""
+SKIP=
+
+
+cd .. && rm -rf tar.tempdir || exit 1
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/tar/tar-archives-multiple-files b/ap/app/busybox/src/testsuite/tar/tar-archives-multiple-files
new file mode 100644
index 0000000..245d9e9
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tar/tar-archives-multiple-files
@@ -0,0 +1,6 @@
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
+touch foo bar
+busybox tar cf foo.tar foo bar
+rm foo bar
+tar xf foo.tar
+test -f foo -a -f bar
diff --git a/ap/app/busybox/src/testsuite/tar/tar-complains-about-missing-file b/ap/app/busybox/src/testsuite/tar/tar-complains-about-missing-file
new file mode 100644
index 0000000..26e8cbb
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tar/tar-complains-about-missing-file
@@ -0,0 +1,3 @@
+touch foo
+tar cf foo.tar foo
+! busybox tar xf foo.tar bar
diff --git a/ap/app/busybox/src/testsuite/tar/tar-demands-at-least-one-ctx b/ap/app/busybox/src/testsuite/tar/tar-demands-at-least-one-ctx
new file mode 100644
index 0000000..85e7f60
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tar/tar-demands-at-least-one-ctx
@@ -0,0 +1 @@
+! busybox tar v
diff --git a/ap/app/busybox/src/testsuite/tar/tar-demands-at-most-one-ctx b/ap/app/busybox/src/testsuite/tar/tar-demands-at-most-one-ctx
new file mode 100644
index 0000000..130d0e7
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tar/tar-demands-at-most-one-ctx
@@ -0,0 +1 @@
+! busybox tar tx
diff --git a/ap/app/busybox/src/testsuite/tar/tar-extracts-all-subdirs b/ap/app/busybox/src/testsuite/tar/tar-extracts-all-subdirs
new file mode 100644
index 0000000..f5351f4
--- /dev/null
+++ b/ap/app/busybox/src/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
+diff -u logfile.gnu logfile.bb
diff --git a/ap/app/busybox/src/testsuite/tar/tar-extracts-file b/ap/app/busybox/src/testsuite/tar/tar-extracts-file
new file mode 100644
index 0000000..ca72f24
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tar/tar-extracts-file
@@ -0,0 +1,5 @@
+touch foo
+tar cf foo.tar foo
+rm foo
+busybox tar xf foo.tar
+test -f foo
diff --git a/ap/app/busybox/src/testsuite/tar/tar-extracts-from-standard-input b/ap/app/busybox/src/testsuite/tar/tar-extracts-from-standard-input
new file mode 100644
index 0000000..a30e9f0
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tar/tar-extracts-from-standard-input
@@ -0,0 +1,5 @@
+touch foo
+tar cf foo.tar foo
+rm foo
+cat foo.tar | busybox tar x
+test -f foo
diff --git a/ap/app/busybox/src/testsuite/tar/tar-extracts-multiple-files b/ap/app/busybox/src/testsuite/tar/tar-extracts-multiple-files
new file mode 100644
index 0000000..7897d81
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tar/tar-extracts-multiple-files
@@ -0,0 +1,6 @@
+touch foo bar
+tar cf foo.tar foo bar
+rm foo bar
+busybox tar -xf foo.tar
+test -f foo
+test -f bar
diff --git a/ap/app/busybox/src/testsuite/tar/tar-extracts-to-standard-output b/ap/app/busybox/src/testsuite/tar/tar-extracts-to-standard-output
new file mode 100644
index 0000000..ca48e36
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tar/tar-extracts-to-standard-output
@@ -0,0 +1,3 @@
+echo foo > foo
+tar cf foo.tar foo
+cat foo.tar | busybox tar Ox | cmp foo -
diff --git a/ap/app/busybox/src/testsuite/tar/tar-handles-cz-options b/ap/app/busybox/src/testsuite/tar/tar-handles-cz-options
new file mode 100644
index 0000000..95c628d
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tar/tar-handles-cz-options
@@ -0,0 +1,5 @@
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
+# FEATURE: CONFIG_FEATURE_SEAMLESS_GZ
+touch foo
+busybox tar czf foo.tar.gz foo
+gzip -d foo.tar.gz
diff --git a/ap/app/busybox/src/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list b/ap/app/busybox/src/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list
new file mode 100644
index 0000000..5033642
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list
@@ -0,0 +1,6 @@
+# FEATURE: CONFIG_FEATURE_TAR_FROM
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
+touch foo
+tar cf foo.tar foo
+echo foo >foo.exclude
+busybox tar xf foo.tar -X foo.exclude
diff --git a/ap/app/busybox/src/testsuite/tar/tar-handles-exclude-and-extract-lists b/ap/app/busybox/src/testsuite/tar/tar-handles-exclude-and-extract-lists
new file mode 100644
index 0000000..2de0f0e
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tar/tar-handles-exclude-and-extract-lists
@@ -0,0 +1,8 @@
+# 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
+rm foo bar baz
+busybox tar xf foo.tar foo bar -X foo.exclude
+test ! -f foo -a -f bar -a ! -f baz
diff --git a/ap/app/busybox/src/testsuite/tar/tar-handles-multiple-X-options b/ap/app/busybox/src/testsuite/tar/tar-handles-multiple-X-options
new file mode 100644
index 0000000..155b27e
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tar/tar-handles-multiple-X-options
@@ -0,0 +1,10 @@
+# FEATURE: CONFIG_FEATURE_TAR_FROM
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
+touch foo
+touch bar
+tar cf foo.tar foo bar
+echo foo > foo.exclude
+echo bar > bar.exclude
+rm foo bar
+busybox tar xf foo.tar -X foo.exclude -X bar.exclude
+test ! -f foo -a ! -f bar
diff --git a/ap/app/busybox/src/testsuite/tar/tar-handles-nested-exclude b/ap/app/busybox/src/testsuite/tar/tar-handles-nested-exclude
new file mode 100644
index 0000000..39013a1
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tar/tar-handles-nested-exclude
@@ -0,0 +1,9 @@
+# FEATURE: CONFIG_FEATURE_TAR_FROM
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
+mkdir foo
+touch foo/bar
+tar cf foo.tar foo
+rm -rf foo
+echo foo/bar >foobar.exclude
+busybox tar xf foo.tar foo -X foobar.exclude
+test -d foo -a ! -f foo/bar
diff --git a/ap/app/busybox/src/testsuite/tar/tar_with_link_with_size b/ap/app/busybox/src/testsuite/tar/tar_with_link_with_size
new file mode 100644
index 0000000..774cd56
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tar/tar_with_link_with_size
@@ -0,0 +1,31 @@
+# FEATURE: CONFIG_FEATURE_TAR_UNAME_GNAME
+
+# 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/ap/app/busybox/src/testsuite/tar/tar_with_prefix_fields b/ap/app/busybox/src/testsuite/tar/tar_with_prefix_fields
new file mode 100644
index 0000000..8c1fda7
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tar/tar_with_prefix_fields
@@ -0,0 +1,264 @@
+# FEATURE: CONFIG_FEATURE_TAR_UNAME_GNAME
+# FEATURE: CONFIG_DESKTOP
+
+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/ap/app/busybox/src/testsuite/taskset.tests b/ap/app/busybox/src/testsuite/taskset.tests
new file mode 100755
index 0000000..3fb5c90
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/taskset.tests
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Copyright 2006 Bernhard Reutner-Fischer
+# Licensed under GPLv2 or later, see file LICENSE in this source tree.
+
+. ./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/ap/app/busybox/src/testsuite/tee/tee-appends-input b/ap/app/busybox/src/testsuite/tee/tee-appends-input
new file mode 100644
index 0000000..cff20bf
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tee/tee-appends-input
@@ -0,0 +1,5 @@
+echo i\'m a little teapot >foo
+cp foo bar
+echo i\'m a little teapot >>foo
+echo i\'m a little teapot | busybox tee -a bar >/dev/null
+cmp foo bar
diff --git a/ap/app/busybox/src/testsuite/tee/tee-tees-input b/ap/app/busybox/src/testsuite/tee/tee-tees-input
new file mode 100644
index 0000000..26e2173
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tee/tee-tees-input
@@ -0,0 +1,3 @@
+echo i\'m a little teapot >foo
+echo i\'m a little teapot | busybox tee bar >baz
+cmp foo bar && cmp foo baz
diff --git a/ap/app/busybox/src/testsuite/test.tests b/ap/app/busybox/src/testsuite/test.tests
new file mode 100755
index 0000000..2c92e34
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/test.tests
@@ -0,0 +1,79 @@
+#!/bin/sh
+
+# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com>
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./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/ap/app/busybox/src/testsuite/testing.sh b/ap/app/busybox/src/testsuite/testing.sh
new file mode 100644
index 0000000..e7e64e5
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/testing.sh
@@ -0,0 +1,170 @@
+# Simple test harness infrastructure 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 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 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
+}
+
+# Helper functions
+
+optional()
+{
+	SKIP=
+	while test "$1"; do
+		if test x"${OPTIONFLAGS/*:$1:*/y}" != x"y"; then
+			SKIP=1
+			return
+		fi
+		shift
+	done
+}
+
+# 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 ======================
+  [ -z "$VERBOSE" ] || echo "echo -ne '$4' >input"
+  [ -z "$VERBOSE" ] || echo "echo -ne '$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/ap/app/busybox/src/testsuite/touch/touch-creates-file b/ap/app/busybox/src/testsuite/touch/touch-creates-file
new file mode 100644
index 0000000..4b49354
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/touch/touch-creates-file
@@ -0,0 +1,2 @@
+busybox touch foo
+test -f foo
diff --git a/ap/app/busybox/src/testsuite/touch/touch-does-not-create-file b/ap/app/busybox/src/testsuite/touch/touch-does-not-create-file
new file mode 100644
index 0000000..8852592
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/touch/touch-does-not-create-file
@@ -0,0 +1,2 @@
+busybox touch -c foo
+test ! -f foo
diff --git a/ap/app/busybox/src/testsuite/touch/touch-touches-files-after-non-existent-file b/ap/app/busybox/src/testsuite/touch/touch-touches-files-after-non-existent-file
new file mode 100644
index 0000000..a869ec2
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/touch/touch-touches-files-after-non-existent-file
@@ -0,0 +1,3 @@
+touch -t 198001010000 bar
+busybox touch -c foo bar
+test x"`find bar -mtime -1`" = xbar
diff --git a/ap/app/busybox/src/testsuite/tr.tests b/ap/app/busybox/src/testsuite/tr.tests
new file mode 100755
index 0000000..5cca299
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tr.tests
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+# Copyright 2009 by Denys Vlasenko <vda.linux@googlemail.com>
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./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"
+
+optional FEATURE_TR_CLASSES
+testing "tr understands [:xdigit:]" \
+	"tr -cd '[:xdigit:]'" \
+	"19AF" "" "19AFH\n"
+SKIP=
+
+optional FEATURE_TR_CLASSES
+testing "tr does not stop after [:digit:]" \
+	"tr '[:digit:]y-z' 111111111123" \
+	"111abcx23\n" "" "789abcxyz\n"
+SKIP=
+
+optional FEATURE_TR_CLASSES
+testing "tr has correct xdigit sequence" \
+	"tr '[:xdigit:]Gg' 1111111151242222333330xX" \
+	"#1111111151242222x333330X\n" "" \
+	"#0123456789ABCDEFGabcdefg\n"
+SKIP=
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/tr/tr-d-alnum-works b/ap/app/busybox/src/testsuite/tr/tr-d-alnum-works
new file mode 100644
index 0000000..6540ea5
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tr/tr-d-alnum-works
@@ -0,0 +1,6 @@
+# FEATURE: CONFIG_FEATURE_TR_CLASSES
+
+echo testing | tr -d '[[:alnum:]]' > logfile.gnu
+echo testing | busybox tr -d '[[:alnum:]]' > logfile.bb
+
+diff -u logfile.gnu logfile.bb
diff --git a/ap/app/busybox/src/testsuite/tr/tr-d-works b/ap/app/busybox/src/testsuite/tr/tr-d-works
new file mode 100644
index 0000000..a86bfbd
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/tr/tr-non-gnu b/ap/app/busybox/src/testsuite/tr/tr-non-gnu
new file mode 100644
index 0000000..ffa6951
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tr/tr-non-gnu
@@ -0,0 +1 @@
+echo fdhrnzvfu bffvsentr | busybox tr '[a-z]' '[n-z][a-m]'
diff --git a/ap/app/busybox/src/testsuite/tr/tr-rejects-wrong-class b/ap/app/busybox/src/testsuite/tr/tr-rejects-wrong-class
new file mode 100644
index 0000000..1d488a3
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tr/tr-rejects-wrong-class
@@ -0,0 +1,21 @@
+# FEATURE: CONFIG_FEATURE_TR_CLASSES
+
+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/ap/app/busybox/src/testsuite/tr/tr-works b/ap/app/busybox/src/testsuite/tr/tr-works
new file mode 100644
index 0000000..5e4a30e
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/tr/tr-works
@@ -0,0 +1,28 @@
+# FEATURE: CONFIG_FEATURE_TR_CLASSES
+
+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/ap/app/busybox/src/testsuite/true/true-is-silent b/ap/app/busybox/src/testsuite/true/true-is-silent
new file mode 100644
index 0000000..1d1bdb2
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/true/true-is-silent
@@ -0,0 +1 @@
+busybox true 2>&1 | cmp - /dev/null
diff --git a/ap/app/busybox/src/testsuite/true/true-returns-success b/ap/app/busybox/src/testsuite/true/true-returns-success
new file mode 100644
index 0000000..cdf2d55
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/true/true-returns-success
@@ -0,0 +1 @@
+busybox true
diff --git a/ap/app/busybox/src/testsuite/umlwrapper.sh b/ap/app/busybox/src/testsuite/umlwrapper.sh
new file mode 100755
index 0000000..e55e4db
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/uncompress.tests b/ap/app/busybox/src/testsuite/uncompress.tests
new file mode 100755
index 0000000..51a2334
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/uncompress.tests
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Copyright 2011 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+
+# testing "test name" "commands" "expected result" "file input" "stdin"
+
+testing "uncompress < \x1f\x9d\x90 \x01 x N" \
+'uncompress 2>&1 1>/dev/null; echo $?' \
+"\
+uncompress: corrupted data
+1
+" \
+"" "\
+\x1f\x9d\x90\
+\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\
+"
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/unexpand.tests b/ap/app/busybox/src/testsuite/unexpand.tests
new file mode 100755
index 0000000..7b326dc
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/unexpand.tests
@@ -0,0 +1,39 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./testing.sh
+test -f "$bindir/.config" && . "$bindir/.config"
+
+# 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" \
+
+testing "unexpand case 8" "unexpand" \
+	"a b\n" "" "a b\n" \
+
+test x"$CONFIG_UNICODE_SUPPORT" = x"y" \
+&& test x"$CONFIG_UNICODE_USING_LOCALE" != x"y" \
+&& testing "unexpand with unicode characher 0x394" "unexpand" \
+	"1ΔΔΔ5\t99999\n" "" "1ΔΔΔ5   99999\n"
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/unexpand/unexpand-works-like-GNU b/ap/app/busybox/src/testsuite/unexpand/unexpand-works-like-GNU
new file mode 100644
index 0000000..a525836
--- /dev/null
+++ b/ap/app/busybox/src/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/ap/app/busybox/src/testsuite/uniq.tests b/ap/app/busybox/src/testsuite/uniq.tests
new file mode 100755
index 0000000..83bf382
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/uniq.tests
@@ -0,0 +1,87 @@
+#!/bin/sh
+
+# SUSv3 compliant uniq tests.
+# Copyright 2005 by Rob Landley <rob@landley.net>
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+# 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/ap/app/busybox/src/testsuite/unzip.tests b/ap/app/busybox/src/testsuite/unzip.tests
new file mode 100755
index 0000000..8677a03
--- /dev/null
+++ b/ap/app/busybox/src/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 GPLv2, see file LICENSE in this source tree.
+
+. ./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/ap/app/busybox/src/testsuite/uptime/uptime-works b/ap/app/busybox/src/testsuite/uptime/uptime-works
new file mode 100644
index 0000000..6b168ab
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/uptime/uptime-works
@@ -0,0 +1 @@
+busybox uptime
diff --git a/ap/app/busybox/src/testsuite/uuencode.tests b/ap/app/busybox/src/testsuite/uuencode.tests
new file mode 100755
index 0000000..6ce70f7
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/uuencode.tests
@@ -0,0 +1,122 @@
+#!/bin/sh
+
+# unit test for uuencode to test functionality.
+# Copyright 2006 by Erik Hovland <erik@hovland.org>
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+# AUDIT: Unit tests for uuencode
+
+. ./testing.sh
+
+# testing "test name" "command(s)" "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
+umask 0
+testing "uuencode sets standard input mode correctly" \
+        "uuencode foo </dev/null | head -n 1 | grep -q 666 && echo yes" "yes\n" "" ""
+umask 022
+
+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"
+
+testing "uuencode empty file" 'r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
+'begin 644 FILE
+`
+end
+' "" ""
+testing "uuencode -m empty file" 'r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
+'begin-base64 644 FILE
+====
+' "" ""
+
+testing "uuencode file 'A'" 'r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
+'begin 644 FILE
+!00``
+`
+end
+A' "" "A"
+testing "uuencode -m file 'A'" 'r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
+'begin-base64 644 FILE
+QQ==
+====
+A' "" "A"
+
+testing "uuencode file 'AB'" 'r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
+'begin 644 FILE
+"04(`
+`
+end
+AB' "" "AB"
+testing "uuencode -m file 'AB'" 'r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
+'begin-base64 644 FILE
+QUI=
+====
+AB' "" "AB"
+
+testing "uuencode file 'ABC'" 'r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
+'begin 644 FILE
+#04)#
+`
+end
+ABC' "" "ABC"
+testing "uuencode -m file 'ABC'" 'r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
+'begin-base64 644 FILE
+QUJD
+====
+ABC' "" "ABC"
+
+testing "uuencode file 'ABCD'" 'r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
+'begin 644 FILE
+$04)#1```
+`
+end
+ABCD' "" "ABCD"
+testing "uuencode -m file 'ABCD'" 'r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
+'begin-base64 644 FILE
+QUJDRA==
+====
+ABCD' "" "ABCD"
+
+testing "uuencode file 'ABCDE'" 'r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
+'begin 644 FILE
+%04)#1$4`
+`
+end
+ABCDE' "" "ABCDE"
+testing "uuencode -m file 'ABCDE'" 'r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
+'begin-base64 644 FILE
+QUJDREU=
+====
+ABCDE' "" "ABCDE"
+
+testing "uuencode file 'ABCDEF'" 'r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
+'begin 644 FILE
+&04)#1$5&
+`
+end
+ABCDEF' "" "ABCDEF"
+testing "uuencode -m file 'ABCDEF'" 'r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
+'begin-base64 644 FILE
+QUJDREVG
+====
+ABCDEF' "" "ABCDEF"
+
+testing "uuencode file 'A<NUL><0xff>Z'" 'r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
+'begin 644 FILE
+$00#_6@``
+`
+end
+A\x0\xffZ' "" "A\x0\xffZ"
+testing "uuencode -m file 'A<NUL><0xff>Z'" 'r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
+'begin-base64 644 FILE
+QQD/Wg==
+====
+A\x0\xffZ' "" "A\x0\xffZ"
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/wc/wc-counts-all b/ap/app/busybox/src/testsuite/wc/wc-counts-all
new file mode 100644
index 0000000..7083645
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/wc/wc-counts-all
@@ -0,0 +1,2 @@
+# 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/ap/app/busybox/src/testsuite/wc/wc-counts-characters b/ap/app/busybox/src/testsuite/wc/wc-counts-characters
new file mode 100644
index 0000000..7558646
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/wc/wc-counts-characters
@@ -0,0 +1 @@
+test `echo i\'m a little teapot | busybox wc -c` -eq 20
diff --git a/ap/app/busybox/src/testsuite/wc/wc-counts-lines b/ap/app/busybox/src/testsuite/wc/wc-counts-lines
new file mode 100644
index 0000000..5be6ed0
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/wc/wc-counts-lines
@@ -0,0 +1 @@
+test `echo i\'m a little teapot | busybox wc -l` -eq 1
diff --git a/ap/app/busybox/src/testsuite/wc/wc-counts-words b/ap/app/busybox/src/testsuite/wc/wc-counts-words
new file mode 100644
index 0000000..331650e
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/wc/wc-counts-words
@@ -0,0 +1 @@
+test `echo i\'m a little teapot | busybox wc -w` -eq 4
diff --git a/ap/app/busybox/src/testsuite/wc/wc-prints-longest-line-length b/ap/app/busybox/src/testsuite/wc/wc-prints-longest-line-length
new file mode 100644
index 0000000..78831fc
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/wc/wc-prints-longest-line-length
@@ -0,0 +1 @@
+test `echo i\'m a little teapot | busybox wc -L` -eq 19
diff --git a/ap/app/busybox/src/testsuite/wget/wget--O-overrides--P b/ap/app/busybox/src/testsuite/wget/wget--O-overrides--P
new file mode 100644
index 0000000..40a3a96
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/wget/wget--O-overrides--P
@@ -0,0 +1,5 @@
+test x"$SKIP_INTERNET_TESTS" != x"" && exit
+
+mkdir foo
+busybox wget -q -O index.html -P foo http://www.google.com/
+test -s index.html
diff --git a/ap/app/busybox/src/testsuite/wget/wget-handles-empty-path b/ap/app/busybox/src/testsuite/wget/wget-handles-empty-path
new file mode 100644
index 0000000..01d60bd
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/wget/wget-handles-empty-path
@@ -0,0 +1,3 @@
+test x"$SKIP_INTERNET_TESTS" != x"" && exit
+
+busybox wget http://www.google.com
diff --git a/ap/app/busybox/src/testsuite/wget/wget-retrieves-google-index b/ap/app/busybox/src/testsuite/wget/wget-retrieves-google-index
new file mode 100644
index 0000000..f9dbb8b
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/wget/wget-retrieves-google-index
@@ -0,0 +1,4 @@
+test x"$SKIP_INTERNET_TESTS" != x"" && exit
+
+busybox wget -q -O foo http://www.google.com/
+test -s foo
diff --git a/ap/app/busybox/src/testsuite/wget/wget-supports--P b/ap/app/busybox/src/testsuite/wget/wget-supports--P
new file mode 100644
index 0000000..bfe4ac4
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/wget/wget-supports--P
@@ -0,0 +1,5 @@
+test x"$SKIP_INTERNET_TESTS" != x"" && exit
+
+mkdir foo
+busybox wget -q -P foo http://www.google.com/
+test -s foo/index.html
diff --git a/ap/app/busybox/src/testsuite/which/which-uses-default-path b/ap/app/busybox/src/testsuite/which/which-uses-default-path
new file mode 100644
index 0000000..63ceb9f
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/which/which-uses-default-path
@@ -0,0 +1,4 @@
+BUSYBOX=$(type -p busybox)
+SAVED_PATH=$PATH
+unset PATH
+$BUSYBOX which ls
diff --git a/ap/app/busybox/src/testsuite/xargs.tests b/ap/app/busybox/src/testsuite/xargs.tests
new file mode 100755
index 0000000..2d0a201
--- /dev/null
+++ b/ap/app/busybox/src/testsuite/xargs.tests
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Copyright 2008 by Denys Vlasenko
+# Licensed under GPLv2, see file LICENSE in this source tree.
+
+. ./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"
+
+testing "xargs -s7 can take one-char input" \
+	"xargs -s7 echo" \
+	"a\n" \
+	"" "a\n"
+
+testing "xargs -sNUM test 1" \
+	"xargs -ts25 echo 2>&1 >/dev/null" \
+	"echo 1 2 3 4 5 6 7 8 9 0\n""echo 1 2 3 4 5 6 7 8 9\n""echo 00\n" \
+	"" "1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 00\n"
+
+testing "xargs -sNUM test 2" \
+	"xargs -ts25 echo 1 2>&1 >/dev/null" \
+	"echo 1 2 3 4 5 6 7 8 9 0\n""echo 1 2 3 4 5 6 7 8 9\n""echo 1 00\n" \
+	"" "2 3 4 5 6 7 8 9 0 2 3 4 5 6 7 8 9 00\n"
+
+exit $FAILCOUNT
diff --git a/ap/app/busybox/src/testsuite/xargs/xargs-works b/ap/app/busybox/src/testsuite/xargs/xargs-works
new file mode 100644
index 0000000..c95869e
--- /dev/null
+++ b/ap/app/busybox/src/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