'cp' doesn't pass the test suite
Erik Andersen
andersen at lineo.com
Mon Jun 26 19:00:11 UTC 2000
Package: busybox
Version: 0.45
Severity: normal
I think the following speaks for itself:
[andersen at slag busybox]$ make test
cd tests && make all
make[1]: Entering directory `/home/andersen/CVS/busybox/tests'
BusyBox Test Suite.
[---------lots of testing snipped-------]
Copy a directory to another directory, without the -a switch.
------------------------------
There should be an error message about cannot cp a dir to a subdir of itself.
cd cp_tests; \
touch a b c; \
mkdir adir; \
ls -lR . > ../cp_a_star_adir.gnu; \
/bin/cp -a * adir; \
ls -lR . >> ../cp_a_star_adir.gnu;
/bin/cp: won't create hard link `adir/adir/adir' to directory `'
There should be an error message about cannot cp a dir to a subdir of itself.
cd cp_tests; \
rm -rf adir; \
mkdir adir; \
ls -lR . > ../cp_a_star_adir.bb; \
/home/andersen/CVS/busybox/tests/cp -a * adir; \
ls -lR . >> ../cp_a_star_adir.bb;
cp: Cannot cp `adir' into a subdirectory of itself, `adir/adir'
diff -u cp_a_star_adir.gnu cp_a_star_adir.bb;
--- cp_a_star_adir.gnu Mon Jun 26 12:58:51 2000
+++ cp_a_star_adir.bb Mon Jun 26 12:58:51 2000
@@ -10,17 +10,12 @@
.:
total 0
-rw-rw-r-- 1 andersen andersen 0 Jun 26 12:58 a
-drwxrwxr-x 3 andersen andersen 106 Jun 26 12:58 adir
+drwxrwxr-x 2 andersen andersen 86 Jun 26 12:58 adir
-rw-rw-r-- 1 andersen andersen 0 Jun 26 12:58 b
-rw-rw-r-- 1 andersen andersen 0 Jun 26 12:58 c
./adir:
total 0
-rw-rw-r-- 1 andersen andersen 0 Jun 26 12:58 a
-drwxrwxr-x 2 andersen andersen 52 Jun 26 12:58 adir
-rw-rw-r-- 1 andersen andersen 0 Jun 26 12:58 b
-rw-rw-r-- 1 andersen andersen 0 Jun 26 12:58 c
-
-./adir/adir:
-total 0
--rw-rw-r-- 1 andersen andersen 0 Jun 26 12:58 a
make[1]: *** [check_cp_dir_to_dir_wo_a] Error 1
make[1]: Leaving directory `/home/andersen/CVS/busybox/tests'
make: *** [test] Error 2
-Erik
--
Erik B. Andersen email: andersen at lineo.com
--This message was written using 73% post-consumer electrons--
---------------------------------------
Received: (at 1005-done) by bugs.lineo.com; 11 Dec 2000 17:36:43 +0000
More information about the busybox
mailing list