[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [BusyBox] bug#1005: 'cp' doesn't pass the test suite
From: Erik Andersen <andersen () lineo ! com>
Date: 2000-06-26 19:00:11
[Download RAW message or body]
Package: busybox
Version: 0.45
Severity: normal
I think the following speaks for itself:
[andersen@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@lineo.com
--This message was written using 73% post-consumer electrons--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic