[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#816672: busybox: broken DEB_BUILD_OPTIONS=nocheck handling & FTBFS if testsuite runs



Package: busybox
Version: 1:1.22.0-18
Tags: patch

Hello,

the handling of "DEB_BUILD_OPTIONS=nocheck" in the busybox
debian/rules is the wrong way round: by default the testsuite
isn't run, but if "nocheck" is set, the testsuite gets run.

The attached patch fixes this problem, but that in return results
in the package failing to build from source because the testsuite
fails:

-----8<----------8<----------8<----------8<----------8<----------8<-----
[...]
ln -sf busybox build/udeb/.stamp-build
======== running testsuite in build/deb ========
rm -f build/deb/testsuite/mdev.tests
if [ -f debian/testsuite-linux.diff ] && \
   ! [ -f build/deb/.tests-fixed ]; then \
	( cd build/deb && patch -p1 && touch .tests-fixed; ) \
	  < debian/testsuite-linux.diff ; \
fi
cd build/deb/testsuite && SKIP_KNOWN_BUGS=y VERBOSE=y LANG=C.UTF8 ./runtest -v
../scripts/echo.c: In function 'main':
../scripts/echo.c:115:6: warning: implicit declaration of function 'dup2' [-Wimplicit-function-declaration]
  if (dup2(1, 1) != 1)
      ^
======================
echo -ne '' >input
echo -ne '' | true | busybox --help busybox 2>&1 | cat
PASS: busybox --help busybox
======================
echo -ne '' >input
echo -ne '' | busybox
PASS: busybox
======================
echo -ne '' >input
echo -ne '' | busybox unknown 2>&1
PASS: busybox unknown
======================
echo -ne '' >input
echo -ne '' | busybox --help 2>&1
PASS: busybox --help
======================
echo -ne '' >input
echo -ne 'moo' | busybox cat
PASS: busybox cat
======================
echo -ne '' >input
echo -ne '' | busybox --help cat 2>&1 | grep print
PASS: busybox --help cat
======================
echo -ne '' >input
echo -ne '' | busybox --help unknown 2>&1
PASS: busybox --help unknown
======================
echo -ne '' >input
echo -ne '' | ./busybox-suffix
PASS: ./busybox-suffix
======================
echo -ne '' >input
echo -ne '' | ./busybox-suffix unknown 2>&1
PASS: ./busybox-suffix unknown
======================
echo -ne '' >input
echo -ne '' | ./busybox-suffix --help 2>&1
PASS: ./busybox-suffix --help
======================
echo -ne '' >input
echo -ne 'moo' | ./busybox-suffix cat
PASS: ./busybox-suffix cat
======================
echo -ne '' >input
echo -ne '' | ./busybox-suffix --help cat 2>&1 | grep print
PASS: ./busybox-suffix --help cat
======================
echo -ne '' >input
echo -ne '' | ./busybox-suffix --help unknown 2>&1
PASS: ./busybox-suffix --help unknown
======================
echo -ne '' >input
echo -ne '' | ./unknown 2>&1
PASS: busybox as unknown name
SKIPPED: ar creates archives
rm: can't remove 'test.a': No such file or directory
SKIPPED: ar replaces things in archives
======================
echo -ne '' >input
echo -ne '' | awk -F '[#]' '{ print NF }'
PASS: awk -F case 0
======================
echo -ne '' >input
echo -ne '
' | awk -F '[#]' '{ print NF }'
PASS: awk -F case 1
======================
echo -ne '' >input
echo -ne '#
' | awk -F '[#]' '{ print NF }'
PASS: awk -F case 2
======================
echo -ne '' >input
echo -ne '#abc#
' | awk -F '[#]' '{ print NF }'
PASS: awk -F case 3
======================
echo -ne '' >input
echo -ne '#abc#zz
' | awk -F '[#]' '{ print NF }'
PASS: awk -F case 4
======================
echo -ne '' >input
echo -ne '#abc##zz
' | awk -F '[#]' '{ print NF }'
PASS: awk -F case 5
======================
echo -ne '' >input
echo -ne 'z#abc##zz
' | awk -F '[#]' '{ print NF }'
PASS: awk -F case 6
======================
echo -ne '' >input
echo -ne 'z##abc##zz
' | awk -F '[#]' '{ print NF }'
PASS: awk -F case 7
======================
echo -ne '' >input
echo -ne '' | awk 'BEGIN{if(23==23) print "foo"}'
PASS: awk if operator == 
======================
echo -ne '' >input
echo -ne '' | awk 'BEGIN{if(23!=23) print "bar"}'
PASS: awk if operator != 
======================
echo -ne '' >input
echo -ne '' | awk 'BEGIN{if(23>=23) print "foo"}'
PASS: awk if operator >= 
======================
echo -ne '' >input
echo -ne '' | awk 'BEGIN{if(2 < 13) print "foo"}'
PASS: awk if operator < 
======================
echo -ne '' >input
echo -ne '' | awk 'BEGIN{if("a"=="ab") print "bar"}'
PASS: awk if string == 
======================
echo -ne '' >input
echo -ne '
' | awk '{ print or(4294967295,1) }'
PASS: awk bitwise op
======================
echo -ne '' >input
echo -ne '' | awk '
function empty_fun(count) {
  # empty
}
END {
  i=1
  print "L" i "
"
  empty_fun(i + i + ++i)
  print "L" i "
"
}'
PASS: awk handles empty function f(arg){}
======================
echo -ne '' >input
echo -ne '' | awk '
function outer_fun() {
  return 1
}
END {
  i=1
  print "L" i "
"
  i += outer_fun()
  print "L" i "
"
}'
PASS: awk properly handles function from other scope
======================
echo -ne '' >input
echo -ne '' | awk '
END {
  i=1
  print "L" i "
"
  i + trigger_error_fun()
  print "L" i "
"
}' 2>&1
PASS: awk properly handles undefined function
======================
echo -ne '' >input
echo -ne '
' | awk '{ print or(0xffffffff,1) }'
PASS: awk hex const 1
======================
echo -ne '' >input
echo -ne '
' | awk '{ print or(0x80000000,1) }'
PASS: awk hex const 2
======================
echo -ne '' >input
echo -ne '
' | awk '{ print or(01234,1) }'
PASS: awk oct const
======================
echo -ne '' >input
echo -ne '
' | awk '{ printf "%f %f
", "000.123", "009.123" }'
PASS: awk floating const with leading zeroes
======================
echo -ne '' >input
echo -ne 'a--
a--b--
a--b--c--
a--b--c--d--' | awk -F-- '{ print NF, length($NF), $NF }'
PASS: awk long field sep
======================
echo -ne '' >input
echo -ne 'a!b
' | awk -F'\x21' '{print $1}'
PASS: awk -F handles escapes
======================
echo -ne '' >input
echo -ne 'Hi
' | awk 'gsub("@(samp|code|file)\{","");'; echo $?
PASS: awk gsub falls back to non-extended-regex
======================
echo -ne '' >input
echo -ne '' | awk -f awk_t1_opt-functions.awk -f awk_t1_opth-gen.awk <awk_t1_input | md5sum
PASS: awk 'gcc build bug'
======================
echo -ne '' >input
echo -ne '' | awk 'BEGIN { print ":" NF ":" $0 ":" $1 ":" $2 ":" }'
PASS: awk NF in BEGIN
======================
echo -ne '' >input
echo -ne '' | awk '
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");
}'
PASS: awk string cast (bug 725)
======================
echo -ne '' >input
echo -ne '' | awk 'BEGIN { arr [3] = 1; print arr [3] }'
PASS: awk handles whitespace before array subscript
======================
echo -ne '' >input
echo -ne '' | awk 'BEGIN { getline line <"doesnt_exist"; print ERRNO; ERRNO=0; close("doesnt_exist"); print ERRNO; print "Ok" }'
PASS: awk handles non-existing file correctly
======================
echo -ne '' >input
echo -ne '' | awk '
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;
}'
PASS: awk nested loops with the same variable
======================
echo -ne '' >input
echo -ne '' | awk 'BEGIN {print()}' 2>&1
PASS: awk handles empty ()
======================
echo -ne '' >input
echo -ne 'a:b c:d
e:f g:h' | awk '{FS=":"; print $1}'
PASS: awk FS assignment
SKIPPED: awk large integer
======================
echo -ne '' >input
echo -ne '' | awk 'BEGIN{ A[1]=2; A["qwe"]="asd"; print length(A)}'
PASS: awk length(array)
======================
echo -ne 'do re mi
' >input
echo -ne '{print $2; print ARGC;}' | awk -f - input
PASS: awk -f and ARGC
======================
echo -ne 'do re mi
' >input
echo -ne '' | awk -e '{print $2; print ARGC;}' input
PASS: awk -e and ARGC
PASS: basename-does-not-remove-identical-extension
PASS: basename-works
PASS: bunzip2-reads-from-standard-input
PASS: bunzip2-removes-compressed-file
PASS: bzcat-does-not-remove-compressed-file
PASS: bunzip2: doesnt exist
PASS: bunzip2: unknown suffix
PASS: bunzip2: already exists
PASS: bunzip2: stream unpack
PASS: bunzip2: delete src
PASS: bunzip2: test_bz2 file
PASS: bunzip2: pbzip_4m_zeros file
PASS: bzcat: dont delete src
======================
echo -ne '\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
echo -ne '' | /usr/src/debian-busybox/git/busybox/build/deb/testsuite/echo-ne -ne '' | bzcat input input; echo $?
PASS: bzcat can print many files
======================
echo -ne '\x42\x5a\x68\x39\x17\x72\x45\x38\x50\x90\x00\x00\x00\x00' >input
echo -ne '' | /usr/src/debian-busybox/git/busybox/build/deb/testsuite/echo-ne -ne '' | bzcat input input; echo $?
PASS: bzcat can handle compressed zero-length bzip2 files
======================
echo -ne '' >input
echo -ne '' | cal 1 2000
PASS: cal 2000
PASS: cat-prints-a-file
PASS: cat-prints-a-file-and-standard-input
PASS: cmp-detects-difference
PASS: cp-RHL-does_not_preserve-links
PASS: cp-a-files-to-dir
PASS: cp-a-preserves-links
PASS: cp-copies-empty-file
PASS: cp-copies-large-file
PASS: cp-copies-small-file
PASS: cp-d-files-to-dir
PASS: cp-dev-file
PASS: cp-dir-create-dir
PASS: cp-dir-existing-dir
PASS: cp-does-not-copy-unreadable-file
PASS: cp-files-to-dir
PASS: cp-follows-links
PASS: cp-parents
PASS: cp-preserves-hard-links
PASS: cp-preserves-links
PASS: cp-preserves-source-file
======================
echo -ne '' >input
echo -ne '' | \
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

PASS: cp
======================
echo -ne '' >input
echo -ne '' | \
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

PASS: cp -d
======================
echo -ne '' >input
echo -ne '' | \
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

PASS: cp -P
======================
echo -ne '' >input
echo -ne '' | \
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

PASS: cp -L
======================
echo -ne '' >input
echo -ne '' | \
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

PASS: cp -H
======================
echo -ne '' >input
echo -ne '' | \
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

PASS: cp -R
======================
echo -ne '' >input
echo -ne '' | \
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

PASS: cp -Rd
======================
echo -ne '' >input
echo -ne '' | \
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

PASS: cp -RP
======================
echo -ne '' >input
echo -ne '' | \
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

PASS: cp -RL
======================
echo -ne '' >input
echo -ne '' | \
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

PASS: cp -RHL
======================
echo -ne '' >input
echo -ne '' | /usr/src/debian-busybox/git/busybox/build/deb/testsuite/echo-ne -ne '\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' | bzcat | cpio -i 2>&1; echo $?;
ls -ln cpio.testdir | sed 's/  */ /g' | cut -d' ' -f 1-5,9- | grep -v '^total '
PASS: cpio extracts zero-sized hardlinks
======================
echo -ne '' >input
echo -ne '' | find cpio.testdir | cpio -H newc --create | (cd cpio.testdir2 && cpio -i 2>&1); echo $?;
ls -ln cpio.testdir2/cpio.testdir | sed 's/  */ /g' | cut -d' ' -f 1-5,9- | grep -v '^total '
PASS: cpio extracts zero-sized hardlinks 2
SKIPPED: cpio -p with absolute paths
======================
echo -ne '' >input
echo -ne '' | cd cpio.testdir && { echo file; echo link; } | cpio -ovHnewc >pack.cpio && rm ???? && cpio -idmvu <pack.cpio 2>/dev/null;
 stat -c '%a %n' file
PASS: cpio restores suid/sgid bits
======================
echo -ne '' >input
echo -ne '' | /usr/src/debian-busybox/git/busybox/build/deb/testsuite/echo-ne -ne '\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' | bzcat | cpio -id 2>&1; echo $?
PASS: cpio extracts in existing directory
PASS: cut-cuts-a-character
PASS: cut-cuts-a-closed-range
PASS: cut-cuts-a-field
PASS: cut-cuts-an-open-range
PASS: cut-cuts-an-unclosed-range
======================
echo -ne 'the quick brown fox
' >input
echo -ne 'jumps over the lazy dog
' | cut -d' ' -f2 - input
PASS: cut '-' (stdin) and multi file handling
PASS: date-@-works
PASS: date-R-works
PASS: date-format-works
PASS: date-u-works
PASS: date-works
PASS: date-works-1
PASS: dd-accepts-if
PASS: dd-accepts-of
PASS: dd-copies-from-standard-input-to-standard-output
PASS: dd-prints-count-to-standard-error
PASS: dd-reports-write-errors
======================
echo -ne 'qwe
asd
zxc
' >input
echo -ne 'asd
' | diff -u - input | sed 's/	.*//'
PASS: diff of stdin
======================
echo -ne 'qwe
asd
zxc' >input
echo -ne 'asd
' | diff -u - input | sed 's/	.*//'
PASS: diff of stdin, no newline in the file
======================
echo -ne '' >input
echo -ne 'stdin' | diff - -; echo $?; wc -c
PASS: diff of stdin, twice
======================
echo -ne 'a
' >input
echo -ne '' | diff -u - input | sed 's/	.*//'
PASS: diff of empty file against nonempty one
======================
echo -ne 'abc' >input
echo -ne 'abc ' | diff -ub - input; echo $?
PASS: diff -b treats EOF as whitespace
======================
echo -ne 'a 	 c
' >input
echo -ne 'a	 	c
' | diff -ub - input; echo $?
PASS: diff -b treats all spaces as equal
======================
echo -ne 'a
' >input
echo -ne '
a

' | diff -uB - input; echo $?
PASS: diff -B ignores changes whose lines are all blank
======================
echo -ne 'a
' >input
echo -ne '
b

' | diff -uB - input | sed 's/	.*//'
PASS: diff -B does not ignore changes whose lines are not all blank
======================
echo -ne 'abc
a  c
def
' >input
echo -ne 'a c
' | diff -ub - input | sed 's/	.*//'
PASS: diff always takes context from old file
======================
echo -ne '' >input
echo -ne '' | diff -ur diff1 diff2/subdir | sed 's/	.*//'
PASS: diff diff1 diff2/subdir
======================
echo -ne '' >input
echo -ne '' | diff -ur diff1 diff2/subdir/- | sed 's/	.*//'
PASS: diff dir dir2/file/-
======================
echo -ne '' >input
echo -ne '' | diff -ur diff1 diff2/subdir | sed 's/	.*//'
PASS: diff of dir and fifo
======================
echo -ne '' >input
echo -ne '' | diff -ur diff1 diff2/subdir | sed 's/	.*//'
PASS: diff of file and fifo
======================
echo -ne '' >input
echo -ne '' | diff -urN diff1 diff2/subdir | sed 's/	.*//'
PASS: diff -rN does not read non-regular files
======================
echo -ne '' >input
echo -ne '' | diff -ur diff1 diff2/ | sed 's/	.*//'; diff -ur .///diff1 diff2//// | sed 's/	.*//'
PASS: diff diff1 diff2/
PASS: dirname-handles-absolute-path
PASS: dirname-handles-empty-path
PASS: dirname-handles-multiple-slashes
PASS: dirname-handles-relative-path
PASS: dirname-handles-root
PASS: dirname-handles-single-component
PASS: dirname-works
PASS: du-h-works
PASS: du-k-works
PASS: du-l-works
PASS: du-m-works
PASS: du-s-works
PASS: du-works
PASS: echo-does-not-print-newline
PASS: echo-prints-argument
PASS: echo-prints-arguments
PASS: echo-prints-dash
PASS: echo-prints-newline
PASS: echo-prints-non-opts
PASS: echo-prints-slash-zero
PASS: echo-prints-slash_00041
PASS: echo-prints-slash_0041
PASS: echo-prints-slash_041
PASS: echo-prints-slash_41
PASS: expand-works-like-GNU
======================
echo -ne '' >input
echo -ne '	12345678	12345678
' | expand
PASS: expand
======================
echo -ne '' >input
echo -ne 'Δ	12345ΔΔΔ	12345678
' | expand
FAIL: expand with unicode characher 0x394
--- expected
+++ actual
@@ -1 +1 @@
-Δ       12345ΔΔΔ        12345678
+Δ      12345ΔΔΔ     12345678
PASS: expr-big
PASS: expr-works
PASS: false-is-silent
PASS: false-returns-failure
PASS: find-supports-minus-xdev
======================
echo -ne '' >input
echo -ne '123456	asdf' | fold -w 7 -s
PASS: fold -s
======================
echo -ne '' >input
echo -ne 'qq w eee r tttt y' | fold -w1
PASS: fold -w1
======================
echo -ne '' >input
echo -ne 'The NUL is here:>
PASS: fold with NULs
======================
echo -ne '' >input
echo -ne '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 мільйони світлових років від нашої планети у сузір'ї Андромеди. На початку ХХІ ст. в центрі галактики виявлено чорну дірку.' | fold -sw66
FAIL: fold -sw66 with unicode input
--- expected
+++ actual
@@ -4,8 +4,13 @@
 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 
-мільйони світлових років від нашої планети у сузір'ї Андромеди. 
-На початку ХХІ ст. в центрі галактики виявлено чорну дірку.
\ No newline at end of file
+Галактика або Туманність Андромеди 
+(також відома як M31 за каталогом 
+Мессьє та NGC224 за Новим загальним 
+каталогом) — спіральна галактика, 
+що знаходиться на відстані 
+приблизно у 2,5 мільйони світлових 
+років від нашої планети у сузір'ї 
+Андромеди. На початку ХХІ ст. в 
+центрі галактики виявлено чорну 
+дірку.
\ No newline at end of file
======================
echo -ne '' >input
echo -ne '' | grep nonexistent 2> /dev/null ; echo $?
PASS: grep (exit with error)
======================
echo -ne '' >input
echo -ne '' | grep grep /usr/src/debian-busybox/git/busybox/build/deb/testsuite/grep.tests > /dev/null 2>&1 ; echo $?
PASS: grep (exit success)
======================
echo -ne '' >input
echo -ne 'one
two
three
three
three
' | grep two
PASS: grep (default to stdin)
======================
echo -ne '' >input
echo -ne 'one
two
three
three
three
' | grep two -
PASS: grep - (specify stdin)
======================
echo -ne 'one
two
three
three
three
' >input
echo -ne '' | grep two input
PASS: grep input (specify file)
======================
echo -ne 'bug' >input
echo -ne '' | grep bug input
PASS: grep (no newline at EOL)
======================
echo -ne 'one
two
three
three
three
' >input
echo -ne '' | grep two input empty 2>/dev/null
PASS: grep two files
======================
echo -ne 'one
two
three
' >input
echo -ne 'one
two
too
three
three
' | grep two - input
PASS: grep - infile (specify stdin and file)
======================
echo -ne '' >input
echo -ne 'one
two
two
three
three
three
' | grep two - nonexistent 2> /dev/null ; echo $?
PASS: grep - nofile (specify stdin and nonexisting file)
======================
echo -ne '' >input
echo -ne 'one
two
two
three
three
three
' | grep -q nomatch - nonexistent 2> /dev/null ; echo $?
PASS: grep -q - nofile (specify stdin and nonexisting file, no match)
======================
echo -ne '' >input
echo -ne 'one
two
two
three
three
three
' | grep -q two - nonexistent ; echo $?
PASS: grep -q - nofile (specify stdin and nonexisting file, match)
======================
echo -ne '' >input
echo -ne '' | grep -s nomatch nonexistent ; echo $?
PASS: grep -s nofile (nonexisting file, no match)
======================
echo -ne '' >input
echo -ne 'nomatch
domatch
end
' | grep -s domatch nonexistent - ; echo $?
PASS: grep -s nofile - (stdin and nonexisting file, match)
======================
echo -ne '
echo -ne '' | grep -a foo input
PASS: grep handles NUL in files
======================
echo -ne '' >input
echo -ne '
PASS: grep handles NUL on stdin
======================
echo -ne '
echo -ne '' | grep . input > /dev/null 2>&1 ; echo $?
PASS: grep matches NUL
======================
echo -ne 'one
two
' >input
echo -ne '' | grep -e one -e two input ; echo $?
PASS: grep handles multiple regexps
======================
echo -ne 'one
two
' >input
echo -ne '' | grep -F -e one -e two input ; echo $?
PASS: grep -F handles multiple expessions
======================
echo -ne 'FOO
' >input
echo -ne '' | grep -F -i foo input ; echo $?
PASS: grep -F handles -i
======================
echo -ne 'tw
two
three
' >input
echo -ne 'tw.
thr
' | grep -f - input ; echo $?
PASS: grep can read regexps from stdin
======================
echo -ne 'foo
' >input
echo -ne '' | grep -x foo input ; echo $?
PASS: grep -x (full match)
======================
echo -ne 'foo bar
' >input
echo -ne '' | grep -x foo input ; echo $?
PASS: grep -x (partial match 1)
======================
echo -ne 'bar foo
' >input
echo -ne '' | grep -x foo input ; echo $?
PASS: grep -x (partial match 2)
======================
echo -ne 'foo
' >input
echo -ne '' | grep -x -F foo input ; echo $?
PASS: grep -x -F (full match)
======================
echo -ne 'foo bar
' >input
echo -ne '' | grep -x -F foo input ; echo $?
PASS: grep -x -F (partial match 1)
======================
echo -ne 'bar foo
' >input
echo -ne '' | grep -x -F foo input ; echo $?
PASS: grep -x -F (partial match 2)
======================
echo -ne '' >input
echo -ne 'br
foo
baz' | grep -E fo+
PASS: grep -E supports extended regexps
======================
echo -ne '' >input
echo -ne 'foo
bar
' | egrep foo
PASS: grep is also egrep
======================
echo -ne '' >input
echo -ne 'FOO
' | egrep foo ; [ $? -ne 0 ] && echo yes
PASS: egrep is not case insensitive
======================
echo -ne '' >input
echo -ne '00:19:3E:00:AA:5E 00:1D:60:3D:3A:FB 00:22:43:49:FB:AA
' | grep -E -o '([[:xdigit:]]{2}[:-]){5}[[:xdigit:]]{2}'
PASS: grep -E -o prints all matches
======================
echo -ne '' >input
echo -ne '/var/test
' | grep -o "[^/]*$"
PASS: grep -o does not loop forever
======================
echo -ne '' >input
echo -ne 'test
' | grep -o "" | head -n1
PASS: grep -o does not loop forever on zero-length match
======================
echo -ne '' >input
echo -ne 'test
' | grep -f input
PASS: grep -f EMPTY_FILE
======================
echo -ne '' >input
echo -ne 'test
' | grep -v -f input
PASS: grep -v -f EMPTY_FILE
======================
echo -ne 'foop
' >input
echo -ne '' | grep -Fw foo input
PASS: grep -Fw matches only words
======================
echo -ne 'foop foo
' >input
echo -ne '' | grep -Fw foo input
PASS: grep -Fw doesn't stop on 1st mismatch
======================
echo -ne 'foop foo
' >input
echo -ne '' | grep -w foo input
PASS: grep -w doesn't stop on 1st mismatch
======================
echo -ne 'strstr
' >input
echo -ne '' | grep -w ^str input
PASS: grep -w ^str doesn't match str not at the beginning
======================
echo -ne 'anything
' >input
echo -ne '' | grep -w ^ input
PASS: grep -w ^ doesn't hang
PASS: gunzip-reads-from-standard-input
PASS: gunzip: doesnt exist
PASS: gunzip: unknown suffix
PASS: gunzip: already exists
PASS: gunzip: stream unpack
PASS: gunzip: delete src
PASS: gzip-accepts-multiple-files
PASS: gzip-accepts-single-minus
PASS: gzip-removes-original-file
PASS: head-n-works
PASS: head-works
PASS: hostid-works
PASS: hostname-d-works
PASS: hostname-i-works
PASS: hostname-s-works
PASS: hostname-works
PASS: id-g-works
PASS: id-u-works
PASS: id-un-works
PASS: id-ur-works
PASS: ln-creates-hard-links
PASS: ln-creates-soft-links
PASS: ln-force-creates-hard-links
PASS: ln-force-creates-soft-links
PASS: ln-preserves-hard-links
PASS: ln-preserves-soft-links
PASS: ls-1-works
PASS: ls-h-works
PASS: ls-l-works
PASS: ls-s-works
======================
echo -ne '' >input
echo -ne '' | (cd ls.testdir && sh ../ls.mk_uni_tests) && ls -1 ls.testdir
FAIL: ls unicode test with codepoints limited to 767
--- expected
+++ actual
@@ -1,24 +1,24 @@
 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_:________"?"______________________________|
+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_:________"?"______________________________|
+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_=_"?"________________________________|
+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:_"?"_____________________________|
@@ -53,58 +53,58 @@
 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_:_____"?"______|
+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_:_"?"______|
+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____"??????????"______________________________________________________|
+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_=_"?"_______________________________|
+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_=_"?"__________________________|
+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_=_"?"______________________________|
+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_=_"?"_______________________________________|
+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_=_"??"______________________|
+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_=_"?"_______________________________________|
+0109_5.3.1__U+FFFE_=_ef_bf_be_=_"???"_______________________________________|
+0110_5.3.2__U+FFFF_=_ef_bf_bf_=_"???"_______________________________________|
======================
echo -ne '' >input
echo -ne '' | 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
PASS: ls symlink_to_dir
PASS: md5sum-verifies-non-binary-file
PASS: md5sum
PASS: mkdir-makes-a-directory
PASS: mkdir-makes-parent-directories
SKIPPED: mount
PASS: mv-files-to-dir
PASS: mv-follows-links
PASS: mv-moves-empty-file
PASS: mv-moves-file
PASS: mv-moves-hardlinks
PASS: mv-moves-large-file
PASS: mv-moves-small-file
PASS: mv-moves-symlinks
PASS: mv-moves-unreadable-files
PASS: mv-preserves-hard-links
PASS: mv-preserves-links
PASS: mv-refuses-mv-dir-to-subdir
PASS: mv-removes-source-file
======================
echo -ne '' >input
echo -ne 'HELLO' | od -b
PASS: od -b
======================
echo -ne '' >input
echo -ne 'HELLO' | od -b --traditional
PASS: od -b --traditional
======================
echo -ne 'HELLO' >input
echo -ne '' | od -b --traditional input
PASS: od -b --traditional FILE
======================
echo -ne 'qwe
zxc
' >input
echo -ne '--- input	Jan 01 01:01:01 2000
+++ input	Jan 01 01:01:01 2000
@@ -1,2 +1,3 @@
 qwe
+asd
 zxc
' | patch 2>&1; echo $?; cat input
PASS: patch with old_file == new_file
======================
echo -ne 'qwe
zxc
' >input
echo -ne '--- input.doesnt_exist	Jan 01 01:01:01 2000
+++ input	Jan 01 01:01:01 2000
@@ -1,2 +1,3 @@
 qwe
+asd
 zxc
' | patch 2>&1; echo $?; cat input
PASS: patch with nonexistent old_file
======================
echo -ne 'qwe
asd
zxc
' >input
echo -ne '--- input.doesnt_exist	Jan 01 01:01:01 2000
+++ input	Jan 01 01:01:01 2000
@@ -1,2 +1,3 @@
 qwe
+asd
 zxc
' | patch -R 2>&1; echo $?; cat input
PASS: patch -R with nonexistent old_file
======================
echo -ne 'abc
def
123
' >input
echo -ne '--- input.old	Jan 01 01:01:01 2000
+++ input	Jan 01 01:01:01 2000
@@ -1,2 +1,3 @@
 abc
+def
 123
' | patch 2>&1; echo $?; cat input
PASS: patch detects already applied hunk
======================
echo -ne 'abc
123
456
' >input
echo -ne '--- input.old	Jan 01 01:01:01 2000
+++ input	Jan 01 01:01:01 2000
@@ -1,2 +1,3 @@
 abc
 123
+456
' | patch 2>&1; echo $?; cat input
PASS: patch detects already applied hunk at the EOF
======================
echo -ne 'abc
def
123
' >input
echo -ne '--- input
+++ input
@@ -1,2 +1,3 @@
 abc
+def
 123
' | patch -N 2>&1; echo $?; cat input
PASS: patch -N ignores already applied hunk
======================
echo -ne 'abc
123
' >input
echo -ne '--- foo.old
+++ foo
@@ -1,2 +1,3 @@
 abc
+def
 123
' | cat >a.patch; patch input a.patch 2>&1; echo $?; cat input; rm a.patch
PASS: patch FILE PATCH
======================
echo -ne '111
222
333
444
555
666
777
888
999
' >input
echo -ne '--- input
+++ input
@@ -1,6 +1,4 @@
-111
-222
-333
+111changed
 444
 555
 666
' | patch 2>&1; cat input
PASS: patch at the beginning
======================
echo -ne '' >input
echo -ne '--- /dev/null
+++ testfile
@@ -0,0 +1 @@
+qwerty
' | patch 2>&1; echo $?; cat testfile; rm testfile
PASS: patch creates new file
======================
echo -ne '' >input
echo -ne '--- bogus_dir///dir2///file
+++ bogus_dir///dir2///file
@@ -1,2 +1,3 @@
 qwe
+asd
 zxc
' | patch -p1 2>&1; echo $?
PASS: patch understands ...dir///dir...
======================
echo -ne '' >input
echo -ne '' | pidof veryunlikelyoccuringbinaryname ; echo $?
PASS: pidof (exit with error)
======================
echo -ne '' >input
echo -ne '' | pidof pidof > /dev/null; echo $?
PASS: pidof (exit with success)
======================
echo -ne '' >input
echo -ne '' | pidof pidof.tests | grep -o -w 2864
PASS: pidof this
SKIPPED: pidof -s
SKIPPED: pidof -o %PPID NOP
SKIPPED: pidof -o init
======================
echo -ne '' >input
echo -ne '' | busybox printf 'PASS: printf produces no further output 1
======================
echo -ne '' >input
echo -ne '' | busybox printf '%sPASS: printf produces no further output 2
======================
echo -ne '' >input
echo -ne '' | busybox printf '%s
' foo $HOME
PASS: printf repeatedly uses pattern for each argv
======================
echo -ne '' >input
echo -ne '' | busybox printf '%b' 'a	b' 'c\d
' 2>&1; echo $?
PASS: printf understands %b escaped_string
======================
echo -ne '' >input
echo -ne '' | busybox printf '%d
' '"x' "'y" "'zTAIL" 2>&1; echo $?
PASS: printf understands %d '"x' "'y" "'zTAIL"
======================
echo -ne '' >input
echo -ne '' | busybox printf '%s
' '"x' "'y" "'zTAIL" 2>&1; echo $?
PASS: printf understands %s '"x' "'y" "'zTAIL"
======================
echo -ne '' >input
echo -ne '' | busybox printf '|%23.12f|
' 5.25 2>&1; echo $?
PASS: printf understands %23.12f
======================
echo -ne '' >input
echo -ne '' | busybox printf '|%*.*f|
' 23 12 5.25 2>&1; echo $?
PASS: printf understands %*.*f
======================
echo -ne '' >input
echo -ne '' | busybox printf '|%*f|
' -23 5.25 2>&1; echo $?
PASS: printf understands %*f with negative width
======================
echo -ne '' >input
echo -ne '' | busybox printf '|%.*f|
' -12 5.25 2>&1; echo $?
PASS: printf understands %.*f with negative precision
======================
echo -ne '' >input
echo -ne '' | busybox printf '|%*.*f|
' -23 -12 5.25 2>&1; echo $?
PASS: printf understands %*.*f with negative width/precision
======================
echo -ne '' >input
echo -ne '' | busybox printf '%zd
' -5 2>&1; echo $?
PASS: printf understands %zd
======================
echo -ne '' >input
echo -ne '' | busybox printf '%ld
' -5 2>&1; echo $?
PASS: printf understands %ld
======================
echo -ne '' >input
echo -ne '' | busybox printf '%Ld
' -5 2>&1; echo $?
PASS: printf understands %Ld
======================
echo -ne '' >input
echo -ne '' | busybox printf '%d
' 1 - 2 bad 3 123bad 4 2>&1; echo $?
PASS: printf handles %d bad_input
======================
echo -ne '' >input
echo -ne '' | busybox printf '%' a b c 2>&1; echo $?
PASS: printf aborts on bare %
======================
echo -ne '' >input
echo -ne '' | busybox printf '%r' a b c 2>&1; echo $?
PASS: printf aborts on %r
PASS: pwd-prints-working-directory
======================
echo -ne '' >input
echo -ne '' | readlink ./readlink_testdir/testfile
PASS: readlink on a file
======================
echo -ne '' >input
echo -ne '' | readlink ./testlink
PASS: readlink on a link
======================
echo -ne '' >input
echo -ne '' | readlink -f ./readlink_testdir/testfile
PASS: readlink -f on a file
======================
echo -ne '' >input
echo -ne '' | readlink -f ./testlink
PASS: readlink -f on a link
======================
echo -ne '' >input
echo -ne '' | readlink -f ./readlink_testdir/readlink_testdir/testlink
PASS: readlink -f on an invalid link
======================
echo -ne '' >input
echo -ne '' | readlink -f readlink_testdir/../readlink_testdir/testfile
PASS: readlink -f on a wierd dir
PASS: rm-removes-file
PASS: rmdir-removes-parent-directories
======================
echo -ne '' >input
echo -ne 'hello
' | sed ""
PASS: sed no files (stdin)
======================
echo -ne '' >input
echo -ne 'hello
' | sed "" -
PASS: sed explicit stdin
======================
echo -ne '' >input
echo -ne '
' | sed -e 's/$/@/'
PASS: sed handles empty lines
======================
echo -ne '' >input
echo -ne 'hello' | sed "" - -
PASS: sed stdin twice
======================
echo -ne '' >input
echo -ne '' | sed -e '1 d'
PASS: sed accepts blanks before command
======================
echo -ne '' >input
echo -ne '2
' | sed -e 'i1
a3'
PASS: sed accepts newlines in -e
======================
echo -ne '' >input
echo -ne '2
' | sed -e 'i\' -e '1' -e 'a\' -e '3'
PASS: sed accepts multiple -e
======================
echo -ne '' >input
echo -ne 'foo
' | sed -n -e s/foo/bar/ -e s/bar/baz/
PASS: sed -n
======================
echo -ne '' >input
echo -ne 'string
' | sed 's/z*//g'
PASS: sed with empty match
======================
echo -ne '' >input
echo -ne 'foo
' | sed -e s/foo/bar/p -e s/bar/baz/p
PASS: sed s//p
======================
echo -ne '' >input
echo -ne 'abc
' | sed -ne s/abc/def/p
PASS: sed -n s//p
======================
echo -ne '' >input
echo -ne '12345
' | sed -e 's/[[:space:]]*/,/g'
PASS: sed s//g (exhaustive)
======================
echo -ne '' >input
echo -ne 'woo
' | sed -e 's woo boing '
PASS: sed s arbitrary delimiter
======================
echo -ne '' >input
echo -ne 'foo
' | sed -e s/foo/bar/ -e s/bar/baz/
PASS: sed s chains
======================
echo -ne '' >input
echo -ne 'foo
' | sed -e s/foo/bar/ -e s/baz/nee/
PASS: sed s chains2
======================
echo -ne '' >input
echo -ne 'one@two' | sed -e 's@[@]@@'
PASS: sed s [delimiter]
======================
echo -ne '' >input
echo -ne 'one	two' | sed 's/	/ /'
PASS: sed s with 	 (GNU ext)
======================
echo -ne '' >input
echo -ne 'foo
' | sed -e 'b one;p;: one'
PASS: sed b (branch)
======================
echo -ne '' >input
echo -ne 'foo
' | sed -e 'b;p'
PASS: sed b (branch with no label jumps to end)
======================
echo -ne '' >input
echo -ne 'a
b
c
' | sed -e 's/a/1/;t one;p;: one;p'
PASS: sed t (test/branch)
======================
echo -ne '' >input
echo -ne 'a
b
c
' | sed -e 's/a/b/;:loop;t loop'
PASS: sed t (test/branch clears test bit)
======================
echo -ne '' >input
echo -ne 'a
b
c
' | sed -e 's/a/1/;T notone;p;: notone;p'
PASS: sed T (!test/branch)
======================
echo -ne '' >input
echo -ne 'a
b
c
' | sed -e 'N;p'
PASS: sed N (flushes pattern space (GNU behavior))
======================
echo -ne '' >input
echo -ne 'a
b
c
' | sed ':a;N;s/
/ /;ta'
PASS: sed N test2
======================
echo -ne '' >input
echo -ne 'a
b
c
' | sed 'N;s/
/ /'
PASS: sed N test3
======================
echo -ne '' >input
echo -ne 'a
b
c
d
' | sed "/b/N;/b\nc/i woo"
PASS: sed address match newline
======================
echo -ne '' >input
echo -ne 'a
b
c
' | sed -n 'N;P;p'
PASS: sed N (stops at end of input) and P (prints to first newline only)
======================
echo -ne '' >input
echo -ne 'a
b
c
' | sed G
PASS: sed G (append hold space to pattern space)
======================
echo -ne '' >input
echo -ne 'ook
' | sed -e '/ook/d;s/ook/ping/p;i woot'
PASS: sed d ends script iteration
======================
echo -ne '' >input
echo -ne 'ook
woot
' | sed -e '/ook/d;a\' -e 'bang'
PASS: sed d ends script iteration (2)
======================
echo -ne '' >input
echo -ne 'woo
PASS: sed embedded NUL g
======================
echo -ne 'woo
' >input
echo -ne 'woo
' | sed -e 's/woo/bang/' input -
PASS: sed normal newlines
======================
echo -ne 'woo
' >input
echo -ne 'woo' | sed -e 's/woo/bang/' input -
PASS: sed leave off trailing newline
======================
echo -ne 'woo' >input
echo -ne 'woo' | sed -e 's/woo/bang/' input -
PASS: sed autoinsert newline
======================
echo -ne '' >input
echo -ne 'one
two' | sed -e 's/nohit//' input -
PASS: sed empty file plus cat
======================
echo -ne 'one
two' >input
echo -ne '' | sed -e 's/nohit//' input -
PASS: sed cat plus empty file
======================
echo -ne '' >input
echo -ne 'woot' | sed -e '/woot/i woo' -
PASS: sed insert doesn't autoinsert newline
======================
echo -ne '' >input
echo -ne 'one' | sed -e 'p' -
PASS: sed print autoinsert newlines
======================
echo -ne 'one' >input
echo -ne 'two' | sed -e 'p' input -
PASS: sed print autoinsert newlines two files
======================
echo -ne 'no
' >input
echo -ne '' | sed -ne 's/woo/bang/' input
PASS: sed noprint, no match, no newline
======================
echo -ne 'a woo
b no' >input
echo -ne 'c woo
d no' | sed -ne 's/woo/bang/p' input -
PASS: sed selective matches with one nl
======================
echo -ne 'a woo
b woo' >input
echo -ne 'c no
d woo' | sed -ne 's/woo/bang/p' input -
PASS: sed selective matches insert newline
======================
echo -ne 'a woo
b woo' >input
echo -ne 'c no
d no' | sed -ne 's/woo/bang/p' input -
PASS: sed selective matches noinsert newline
======================
echo -ne 'one' >input
echo -ne 'two' | sed -e '/one/a 111' -e '/two/i 222' -e p input -
PASS: sed clusternewline
======================
echo -ne 'thingy' >input
echo -ne 'again' | sed -e 's/i/z/' -e 'woutputw' input -; /usr/src/debian-busybox/git/busybox/build/deb/testsuite/echo-ne -n X; cat outputw
PASS: sed subst+write
======================
echo -ne 'a
echo -ne 'c' | sed 's/i/z/' input -
PASS: sed trailing NUL
======================
echo -ne 'a' >input
echo -ne '' | sed 's/a/z\
z/' input
PASS: sed escaped newline in command
======================
echo -ne '' >input
echo -ne 'hello
there' | sed -e '$p'
PASS: sed match EOF
======================
echo -ne 'one
two' >input
echo -ne 'three
four' | sed -e '$p' input -
PASS: sed match EOF two files
======================
echo -ne 'one
two' >input
echo -ne '' | sed -e '$i ook' -i input input2 && cat input input2
PASS: sed match EOF inline
======================
echo -ne '' >input
echo -ne '' | sed --version | grep -o 'GNU sed version '
PASS: sed lie-to-autoconf
======================
echo -ne '' >input
echo -ne 'woot' | sed -e '/woot/s//eep 
PASS: sed backref from empty s uses range regex
======================
echo -ne '' >input
echo -ne 'woot
' | sed -e '/woot/s//eep 
PASS: sed backref from empty s uses range regex with newline
======================
echo -ne '' >input
echo -ne '' | sed -e '' -i 2> /dev/null || echo yes
PASS: sed -i with no arg [GNUFAIL]
======================
echo -ne '' >input
echo -ne 'xxx
' | sed -e 's/xxx/[/'
PASS: sed s/xxx/[/
======================
echo -ne '' >input
echo -ne '0
1
2
3
' | sed 's/1/x/;T;n;: next;s/3/y/;t quit;n;b next;: quit;q'
PASS: sed n command must reset 'substituted' bit
======================
echo -ne '' >input
echo -ne 'first
second
third
fourth
' | sed -n '1d;1,3p'
PASS: sed d does not break n,m matching
======================
echo -ne '' >input
echo -ne 'first
second
third
fourth
' | sed -n '1d;1,/hir/p'
PASS: sed d does not break n,regex matching
======================
echo -ne '' >input
echo -ne 'first
second
third
fourth
first2
second2
third2
fourth2
' | sed -n '1,5d;1,/hir/p'
PASS: sed d does not break n,regex matching #2
======================
echo -ne '' >input
echo -ne 'first
second
third
fourth
' | sed -n '2d;2,1p'
PASS: sed 2d;2,1p (gnu compat)
======================
echo -ne '' >input
echo -ne '/usr/lib
' | sed 's,\(^/\|\)[^/][^/]*,>
PASS: sed beginning (^) matches only once
======================
echo -ne '' >input
echo -ne 'first
second
' | sed 'crepl'
PASS: sed c
======================
echo -ne '' >input
echo -ne 'qwe
asd
zxc
' | sed '/asd/ { p; /s/ { s/s/c/ }; p; q }'
PASS: sed nested {}s
======================
echo -ne '' >input
echo -ne '	| one \
	| two \
' | sed -e '/| one /a \
	| three \' -e '/| one-/a \
	| three-* \'
PASS: sed a cmd ended by double backslash
======================
echo -ne '' >input
echo -ne '1
2
3
4
' | sed -n '1{N;N;d};1p;2,3p;3p;4p'
PASS: sed with N skipping lines past ranges on next cmds
======================
echo -ne 'foo
' >input
echo -ne '' | cp input input2; sed -i -e '1s/foo/bar/' input input2 && cat input input2; rm input2
PASS: sed -i with address modifies all files, not only first
======================
echo -ne '' >input
echo -ne 'rrr
' | sed 's/r/
/'
PASS: sed understands 
======================
echo -ne '1
2
3
4
' >input
echo -ne '' | sed '1,2d' -i input; echo $?; cat input
PASS: sed -i finishes ranges correctly
======================
echo -ne '' >input
echo -ne 'helllo
' | sed 's/l*/@/g'
PASS: sed zero chars match/replace advances correctly 1
======================
echo -ne '' >input
echo -ne ' a.b
' | sed 's [^ .]* x g'
PASS: sed zero chars match/replace advances correctly 2
======================
echo -ne '' >input
echo -ne '_aaa1aa
' | sed 's/a/A/g'
PASS: sed zero chars match/replace logic must not falsely trigger here 1
======================
echo -ne '' >input
echo -ne 'qwerty
' | sed 's/ *$/_/g'
PASS: sed zero chars match/replace logic must not falsely trigger here 2
======================
echo -ne '' >input
echo -ne 'this is a regular line
line with \
continuation
more regular lines
line with \
continuation
' | sed ': testcont; /\$/{ =; N; b testcont }'
PASS: sed /$_in_regex/ should not match newlines, only end-of-line
======================
echo -ne '' >input
echo -ne '' | seq 2> /dev/null || echo yes
PASS: seq (exit with error)
======================
echo -ne '' >input
echo -ne '' | seq 1 2 3 4 2> /dev/null || echo yes
PASS: seq (exit with error)
======================
echo -ne '' >input
echo -ne '' | seq 3
PASS: seq one argument
======================
echo -ne '' >input
echo -ne '' | seq 5 7
PASS: seq two arguments
======================
echo -ne '' >input
echo -ne '' | seq 7 5
PASS: seq two arguments reversed
======================
echo -ne '' >input
echo -ne '' | seq 3 3
PASS: seq two arguments equal
======================
echo -ne '' >input
echo -ne '' | seq 1 -15 1
PASS: seq two arguments equal, arbitrary negative step
======================
echo -ne '' >input
echo -ne '' | seq 1 +15 1
PASS: seq two arguments equal, arbitrary positive step
======================
echo -ne '' >input
echo -ne '' | seq 4 2 8
PASS: seq count up by 2
======================
echo -ne '' >input
echo -ne '' | seq 8 -2 4
PASS: seq count down by 2
======================
echo -ne '' >input
echo -ne '' | seq 4 -2 8
PASS: seq count wrong way #1
======================
echo -ne '' >input
echo -ne '' | seq 8 2 4
PASS: seq count wrong way #2
======================
echo -ne '' >input
echo -ne '' | seq 3 .3 4
PASS: seq count by .3
======================
echo -ne '' >input
echo -ne '' | seq 3 .30 4
PASS: seq count by .30
======================
echo -ne '' >input
echo -ne '' | seq 3 .30 4.000
PASS: seq count by .30 to 4.000
======================
echo -ne '' >input
echo -ne '' | seq .7 -.9 -2.2
PASS: seq count by -.9
======================
echo -ne '' >input
echo -ne '' | seq 4 0 8 | head -n 10
PASS: seq count by zero
======================
echo -ne '' >input
echo -ne '' | seq -w 003
PASS: seq one argument with padding
======================
echo -ne '' >input
echo -ne '' | seq -w 005 7
PASS: seq two arguments with padding
======================
echo -ne '' >input
echo -ne '' | seq -w 8 -3 04
PASS: seq count down by 3 with padding
======================
echo -ne '' >input
echo -ne '' | seq -w 09 .3 11
PASS: seq count by .3 with padding 1
======================
echo -ne '' >input
echo -ne '' | seq -w 03 .3 0004
PASS: seq count by .3 with padding 2
PASS: md5sum
PASS: md5sum
PASS: md5sum
======================
echo -ne 'c
a
b
' >input
echo -ne '' | sort input
PASS: sort
======================
echo -ne '3
1
010
' >input
echo -ne '' | sort input
PASS: sort #2
======================
echo -ne '' >input
echo -ne 'b
a
c
' | sort
PASS: sort stdin
======================
echo -ne '3
1
010
' >input
echo -ne '' | sort -n input
PASS: sort numeric
======================
echo -ne 'point
wook
pabst
aargh
walrus
' >input
echo -ne '' | sort -r input
PASS: sort reverse
======================
echo -ne '42	1	3	woot
42	1	010	zoology
egg	1	2	papyrus
7	3	42	soup
999	3	0	algebra
' >input
echo -ne '' | sort -k4,4 input
PASS: sort one key
======================
echo -ne '42	1	3	woot
42	1	010	zoology
egg	1	2	papyrus
7	3	42	soup
999	3	0	algebra
' >input
echo -ne '' | sort -k2,3n input
PASS: sort key range with numeric option
======================
echo -ne 'c 3
b 2
d 2
' >input
echo -ne '' | sort -k 2,2n -k 1,1r input
PASS: sort key range with two -k options
======================
echo -ne '/a/2
/b/1
' >input
echo -ne '' | sort -n -k2 -t/ input
PASS: sort with non-default leading delim 1
======================
echo -ne '/b/1
/a/2
' >input
echo -ne '' | sort -n -k3 -t/ input
PASS: sort with non-default leading delim 2
======================
echo -ne '//a/2
//b/1
' >input
echo -ne '' | sort -n -k3 -t/ input
PASS: sort with non-default leading delim 3
======================
echo -ne 'a c
b c
' >input
echo -ne '' | sort -u -k2 input
PASS: sort -u should consider field only when discarding
======================
echo -ne 'one
echo -ne '' | sort -z input
PASS: sort -z outputs NUL terminated lines
======================
echo -ne '' >input
echo -ne ' 2 
 1 
 a 
' | sort -n -k2 -t ' '
PASS: sort key doesn't strip leading blanks, disables fallback global sort
======================
echo -ne '222
111
' >input
echo -ne '' | sort -o input input && cat input
PASS: sort file in place
======================
echo -ne '' >input
echo -ne '' | start-stop-daemon -S -x true 2>&1; echo $?
PASS: start-stop-daemon -x without -a
======================
echo -ne '' >input
echo -ne '' | start-stop-daemon -S -a false 2>&1; echo $?
PASS: start-stop-daemon -a without -x
PASS: strings-works-like-GNU
PASS: tail-n-works
PASS: tail-works
======================
echo -ne '' >input
echo -ne 'qw' | tail -c +55 2>&1; echo $?
PASS: tail: +N with N > file length
======================
echo -ne '' >input
echo -ne '' | 
	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;
	
PASS: tail: -c +N with largish N
PASS: tar-archives-multiple-files
PASS: tar-complains-about-missing-file
PASS: tar-demands-at-least-one-ctx
PASS: tar-demands-at-most-one-ctx
PASS: tar-extracts-all-subdirs
PASS: tar-extracts-file
PASS: tar-extracts-from-standard-input
PASS: tar-extracts-multiple-files
PASS: tar-extracts-to-standard-output
PASS: tar-handles-cz-options
UNTESTED: tar-handles-empty-include-and-non-empty-exclude-list
UNTESTED: tar-handles-exclude-and-extract-lists
UNTESTED: tar-handles-multiple-X-options
UNTESTED: tar-handles-nested-exclude
PASS: tar_with_link_with_size
PASS: tar_with_prefix_fields
======================
echo -ne '' >input
echo -ne '' | \
tar xvf - 2>&1; echo $?

PASS: Empty file is not a tarball
======================
echo -ne '' >input
echo -ne '' | \
{ tar xvzf - 2>&1; echo $?; } | grep -Fv "invalid magic"

PASS: Empty file is not a tarball.tar.gz
======================
echo -ne '' >input
echo -ne '' | \
dd if=/dev/zero bs=512 count=2 2>/dev/null | tar xvf - 2>&1; echo $?

PASS: Two zeroed blocks is a ('truncated') empty tarball
======================
echo -ne '' >input
echo -ne '' | \
dd if=/dev/zero bs=512 count=20 2>/dev/null | tar xvf - 2>&1; echo $?

PASS: Twenty zeroed blocks is an empty tarball
======================
echo -ne '' >input
echo -ne '' | \
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/"

PASS: tar hardlinks and repeated files
======================
echo -ne '' >input
echo -ne '' | \
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/"

PASS: tar hardlinks mode
======================
echo -ne '' >input
echo -ne '' | \
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/"

PASS: tar symlinks mode
======================
echo -ne 'Ok
' >input
echo -ne '' | 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

PASS: tar --overwrite
======================
echo -ne '' >input
echo -ne '' | 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

PASS: tar extract tgz
SKIPPED: tar extract txz
======================
echo -ne '' >input
echo -ne '' | 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

PASS: tar strips /../ on extract
======================
echo -ne '' >input
echo -ne '' | taskset -p 1 >/dev/null;echo $?
PASS: taskset (get from pid 1)
======================
echo -ne '' >input
echo -ne '' | taskset -p 0 >/dev/null 2>&1;echo $?
PASS: taskset (invalid pid)
======================
echo -ne '' >input
echo -ne '' | taskset 0x1 /bin/bash -c 'taskset -p $$ | grep "current affinity mask: 1" >/dev/null'; echo $?
PASS: taskset (set_aff, needs CAP_SYS_NICE)
PASS: tee-appends-input
PASS: tee-tees-input
======================
echo -ne '' >input
echo -ne '' | busybox test; echo $?
PASS: test: should be false (1)
======================
echo -ne '' >input
echo -ne '' | busybox test ''; echo $?
PASS: test '': should be false (1)
======================
echo -ne '' >input
echo -ne '' | busybox test !; echo $?
PASS: test !: should be true (0)
======================
echo -ne '' >input
echo -ne '' | busybox test a; echo $?
PASS: test a: should be true (0)
======================
echo -ne '' >input
echo -ne '' | busybox test --help; echo $?
PASS: test --help: should be true (0)
======================
echo -ne '' >input
echo -ne '' | busybox test -f; echo $?
PASS: test -f: should be true (0)
======================
echo -ne '' >input
echo -ne '' | busybox test ! -f; echo $?
PASS: test ! -f: should be false (1)
======================
echo -ne '' >input
echo -ne '' | busybox test a = a; echo $?
PASS: test a = a: should be true (0)
======================
echo -ne '' >input
echo -ne '' | busybox test -lt = -gt; echo $?
PASS: test -lt = -gt: should be false (1)
======================
echo -ne '' >input
echo -ne '' | busybox test a -a !; echo $?
PASS: test a -a !: should be true (0)
======================
echo -ne '' >input
echo -ne '' | busybox test -f = a -o b; echo $?
PASS: test -f = a -o b: should be true (0)
======================
echo -ne '' >input
echo -ne '' | busybox test ! a = b -a ! c = c; echo $?
PASS: test ! a = b -a ! c = c: should be false (1)
======================
echo -ne '' >input
echo -ne '' | busybox test ! a = b -a ! c = d; echo $?
PASS: test ! a = b -a ! c = d: should be true (0)
PASS: touch-creates-file
PASS: touch-does-not-create-file
PASS: touch-touches-files-after-non-existent-file
UNTESTED: tr-d-alnum-works
PASS: tr-d-works
PASS: tr-non-gnu
UNTESTED: tr-rejects-wrong-class
UNTESTED: tr-works
======================
echo -ne '' >input
echo -ne '[qwe]' | tr '[q-z]' '_Q-Z+'
PASS: tr does not treat [] in [a-z] as special
======================
echo -ne '' >input
echo -ne '19AFH
' | tr -cd '[0-9A-F]'
PASS: tr understands 0-9A-F
SKIPPED: tr understands [:xdigit:]
SKIPPED: tr does not stop after [:digit:]
SKIPPED: tr has correct xdigit sequence
PASS: true-is-silent
PASS: true-returns-success
======================
echo -ne '' >input
echo -ne '\x1f\x9d\x90' | uncompress 2>&1 1>/dev/null; echo $?
PASS: uncompress < \x1f\x9d\x90 \x01 x N
PASS: unexpand-works-like-GNU
======================
echo -ne '' >input
echo -ne '        12345678
' | unexpand
PASS: unexpand case 1
======================
echo -ne '' >input
echo -ne '         12345678
' | unexpand
PASS: unexpand case 2
======================
echo -ne '' >input
echo -ne '          12345678
' | unexpand
PASS: unexpand case 3
======================
echo -ne '' >input
echo -ne '       	12345678
' | unexpand
PASS: unexpand case 4
======================
echo -ne '' >input
echo -ne '      	12345678
' | unexpand
PASS: unexpand case 5
======================
echo -ne '' >input
echo -ne '     	12345678
' | unexpand
PASS: unexpand case 6
======================
echo -ne '' >input
echo -ne '123 	 45678
' | unexpand
PASS: unexpand case 7
======================
echo -ne '' >input
echo -ne 'a b
' | unexpand
PASS: unexpand case 8
======================
echo -ne '' >input
echo -ne '1ΔΔΔ5   99999
' | unexpand
FAIL: unexpand with unicode characher 0x394
--- expected
+++ actual
@@ -1 +1 @@
-1ΔΔΔ5	99999
+1ΔΔΔ5   99999
======================
echo -ne '' >input
echo -ne '' | uniq nonexistent 2> /dev/null || echo yes
PASS: uniq (exit with error)
======================
echo -ne '' >input
echo -ne '' | uniq /dev/null && echo yes
PASS: uniq (exit success)
======================
echo -ne '' >input
echo -ne 'one
two
two
three
three
three
' | uniq
PASS: uniq (default to stdin)
======================
echo -ne '' >input
echo -ne 'one
two
two
three
three
three
' | uniq -
PASS: uniq - (specify stdin)
======================
echo -ne 'one
two
two
three
three
three
' >input
echo -ne '' | uniq input
PASS: uniq input (specify file)
======================
echo -ne 'one
two
two
three
three
three
' >input
echo -ne '' | uniq input actual > /dev/null
PASS: uniq input outfile (two files)
======================
echo -ne '' >input
echo -ne 'one
two
two
three
three
three
' | uniq - actual
PASS: uniq (stdin) outfile
======================
echo -ne 'one
two
two
three
three
three
' >input
echo -ne '' | uniq input -
PASS: uniq input - (specify stdout)
======================
echo -ne '' >input
echo -ne 'one
two
two
three
three
three
' | uniq -c | sed 's/^[ 	]*//'
PASS: uniq -c (occurrence count)
======================
echo -ne '' >input
echo -ne 'one
two
two
three
three
three
' | uniq -d
PASS: uniq -d (dups only)
======================
echo -ne '' >input
echo -ne 'cc	dd	ee8
bb	cc	dd8
aa	bb	cc9
' | uniq -f2 -s 3
PASS: uniq -f -s (skip fields and chars)
======================
echo -ne '' >input
echo -ne 'cc1
cc2
cc3
' | uniq -w 2
PASS: uniq -w (compare max characters)
======================
echo -ne '' >input
echo -ne 'aaccaa
aaccbb
bbccaa
' | uniq -s 2 -w 2
PASS: uniq -s -w (skip fields and compare max chars)
======================
echo -ne '' >input
echo -ne 'one
two
two
three
three
three
' | uniq -d -u
PASS: uniq -u and -d produce no output
======================
echo -ne '' >input
echo -ne '' | unzip -q foo.zip foo/ && test -d foo && test ! -f foo/bar && echo yes
PASS: unzip (subdir only)
PASS: uptime-works
======================
echo -ne '' >input
echo -ne '' | uuencode foo </dev/null | head -n 1 | grep -q 666 && echo yes
PASS: uuencode sets standard input mode correctly
======================
echo -ne '' >input
echo -ne 'The fast grey fox jumped over the lazy brown dog.
' | uuencode bb_uuenc_test.out
PASS: uuencode correct encoding
======================
echo -ne '' >input
echo -ne 'The fast grey fox jumped over the lazy brown dog.
' | uuencode -m bb_uuenc_test.out
PASS: uuencode correct base64 encoding
======================
echo -ne '' >input
echo -ne '' | r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;
PASS: uuencode empty file
======================
echo -ne '' >input
echo -ne '' | r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;
PASS: uuencode -m empty file
======================
echo -ne '' >input
echo -ne 'A' | r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;
PASS: uuencode file 'A'
======================
echo -ne '' >input
echo -ne 'A' | r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;
PASS: uuencode -m file 'A'
======================
echo -ne '' >input
echo -ne 'AB' | r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;
PASS: uuencode file 'AB'
======================
echo -ne '' >input
echo -ne 'AB' | r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;
PASS: uuencode -m file 'AB'
======================
echo -ne '' >input
echo -ne 'ABC' | r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;
PASS: uuencode file 'ABC'
======================
echo -ne '' >input
echo -ne 'ABC' | r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;
PASS: uuencode -m file 'ABC'
======================
echo -ne '' >input
echo -ne 'ABCD' | r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;
PASS: uuencode file 'ABCD'
======================
echo -ne '' >input
echo -ne 'ABCD' | r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;
PASS: uuencode -m file 'ABCD'
======================
echo -ne '' >input
echo -ne 'ABCDE' | r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;
PASS: uuencode file 'ABCDE'
======================
echo -ne '' >input
echo -ne 'ABCDE' | r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;
PASS: uuencode -m file 'ABCDE'
======================
echo -ne '' >input
echo -ne 'ABCDEF' | r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;
PASS: uuencode file 'ABCDEF'
======================
echo -ne '' >input
echo -ne 'ABCDEF' | r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;
PASS: uuencode -m file 'ABCDEF'
======================
echo -ne '' >input
echo -ne 'A\x0\xffZ' | r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;
PASS: uuencode file 'A<NUL><0xff>Z'
======================
echo -ne '' >input
echo -ne 'A\x0\xffZ' | r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;
PASS: uuencode -m file 'A<NUL><0xff>Z'
PASS: wc-counts-all
PASS: wc-counts-characters
PASS: wc-counts-lines
PASS: wc-counts-words
PASS: wc-prints-longest-line-length
FAIL: wget--O-overrides--P
+ test x != x
+ mkdir foo
+ busybox wget -q -O index.html -P foo http://www.google.com/
wget: server returned error: HTTP/1.1 406 Usage Information
FAIL: wget-handles-empty-path
+ test x != x
+ busybox wget http://www.google.com
Connecting to 192.168.2.14:3142 (192.168.2.14:3142)
wget: server returned error: HTTP/1.1 406 Usage Information
FAIL: wget-retrieves-google-index
+ test x != x
+ busybox wget -q -O foo http://www.google.com/
wget: server returned error: HTTP/1.1 406 Usage Information
FAIL: wget-supports--P
+ test x != x
+ mkdir foo
+ busybox wget -q -P foo http://www.google.com/
wget: server returned error: HTTP/1.1 406 Usage Information
PASS: which-uses-default-path
PASS: xargs-works
======================
echo -ne '' >input
echo -ne 'a
_
b
' | xargs -E _
PASS: xargs -E _ stops on underscore
======================
echo -ne '' >input
echo -ne 'a
_
b
' | xargs -E ''
PASS: xargs -E ''
======================
echo -ne '' >input
echo -ne 'a
_
b
' | xargs -e
PASS: xargs -e without param
======================
echo -ne '' >input
echo -ne 'a
_
b
' | xargs
PASS: xargs does not stop on underscore ('new' GNU behavior)
======================
echo -ne '' >input
echo -ne 'a
' | xargs -s7 echo
PASS: xargs -s7 can take one-char input
======================
echo -ne '' >input
echo -ne '1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 00
' | xargs -ts25 echo 2>&1 >/dev/null
PASS: xargs -sNUM test 1
======================
echo -ne '' >input
echo -ne '2 3 4 5 6 7 8 9 0 2 3 4 5 6 7 8 9 00
' | xargs -ts25 echo 1 2>&1 >/dev/null
PASS: xargs -sNUM test 2
debian/rules:125: recipe for target 'build/deb/.stamp-test' failed
make: *** [build/deb/.stamp-test] Error 1
dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2

-----8<----------8<----------8<----------8<----------8<----------8<-----

Regards,
Karsten
-- 
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.
>From bec6ce158d5100c3521172de810f9a3a4b872914 Mon Sep 17 00:00:00 2001
From: Karsten Merker <merker@debian.org>
Date: Thu, 3 Mar 2016 19:06:05 +0100
Subject: [PATCH] Fix DEB_BUILD_OPTIONS=nocheck handling.

The debian/rules logic for conditionally running the busybox testsuite
during the build process - depending on whether "nocheck" has been
passed in ${DEB_BUILD_OPTIONS} or not - is currently the wrong way
round, i.e. the testsuite isn't run by default and instead gets run
when "nocheck" is set.  Fix this by reversing the corresponding
conditional.
---
 debian/rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index d3613a2..7aff363 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,7 +7,7 @@ DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 PKGVERSION := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p')
 VENDOR := $(shell dpkg-vendor --query vendor)
 
-ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 RUN_TESTSUITE = y
 endif
 TESTSUITE_ENV = SKIP_KNOWN_BUGS=y VERBOSE=y
-- 
2.1.4


Reply to: