busybox testsuite on non-linux
Michael Tokarev
mjt at tls.msk.ru
Mon Dec 9 13:51:41 UTC 2013
Hello.
Here are a few tests from the testsuite which fails on debian-hurd and
debian-kfreebsd.
awk handles non-existing file correctly
on hurd ENOENT is 0x40000002, the test expects 2.
It is not portable to expect certain errno values. Different OSes may
use different values for the same error, that's what <errno.h> is for.
I'm not sure what this test should be testing. 2 possible solutions:
1) test for ERRNO!=0 instead of ERRNO itself, or
2) print value of ENOENT using a tiny C program and compare with that.
pidof this does not print its own pid on hurd or freebsd
testing "pidof this" "pidof pidof.tests | grep -o -w $$" "$$\n" "" ""
most likely the process is named 'sh pidof.tests', not pidof.tests
This test fails on both kfreebsd and hurd systems - it does not print
its own pid, `pidof pidof.tests' prints nothig.
tar symlinks mode (both kfreebsd and hurd)
--- expected
+++ actual
@@ -1,9 +1,9 @@
input_dir/input_file
-input_dir/input_soft -> input_file
+input_dir/input_soft -> input_dir/input_file
input_file -> input_dir/input_file
-input_soft -> input_dir/input_soft
+input_soft -> input_file
Ok: 0
-rwxr----x input_dir/input_file
-lrwxrwxrwx input_file
+-rwxr----x input_dir/input_soft
-rwxr----x input_file
-lrwxrwxrwx input_file
+lrwxr-xr-x input_file
kfreebsd: group on files is inherited from parent dir. cpio tests fail.
FAIL: cpio extracts zero-sized hardlinks
--- expected
+++ actual
@@ -1,4 +1,4 @@
1 blocks
0
--rw-r--r-- 2 2952 1009 0 x
--rw-r--r-- 2 2952 1009 0 y
+-rw-r--r-- 2 2952 112 0 x
+-rw-r--r-- 2 2952 112 0 y
Mabe remove (using sed, in $FILTER_LS) the group column for testing?
Note the same may happen on linux too, depending on the filesystem in
use and even filesystem mount options (-o grpid or -o bsdgroups for a
few linux filesystems).
du tests fail on kfreebsd filesystems:
du-k-works
16+64Kb files in a dir, `du -k .' is expected
to be one of 80, 84 or 88, actual is 82.
du-l-works - same issue,
result expected to be 144, 148, 152 or 156, actual is 146
I'm not sure why these sizes are multiple of 4Kb. As you can see,
on a bsd system the directory size is different. Maybe any number
between, say, 80 and 88 should be ok?
That's all for now, but I haven't enabled all applets.
Thanks,
/mjt
More information about the busybox
mailing list