Prepare tests ...
+ mkdir d d/d2
+ touch f
+ touch d/f2
+ touch d/d2/f3
+ ln -s d dirlink
+ ln -s f filelink
+ ln -s nowhere danglink
+ ln -s f2 d/fl
+ ln -s d2 d/dl
+ find f filelink d danglink dirlink -exec ls -ldogi '{}' +
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537364 lrwxrwxrwx 1    7 Nov  4 23:39 danglink -> nowhere
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537347 -rw-r--r-- 1    0 Nov  4 23:39 f
537363 lrwxrwxrwx 1    1 Nov  4 23:39 filelink -> f
+ set +x
Starting tests ...

========================================
Test: cp     filelink ...
+ ./cp-8.21 filelink OLD
+ rc_old=0
+ ./cp-new filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 -rw-r--r-- 1 0 Nov  4 23:39 OLD
537371 -rw-r--r-- 1 0 Nov  4 23:39 NEW
=== OK


========================================
Test: cp    --preserve=links filelink ...
+ ./cp-8.21 --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 -rw-r--r-- 1 0 Nov  4 23:39 OLD
537371 -rw-r--r-- 1 0 Nov  4 23:39 NEW
=== OK


========================================
Test: cp   -R  filelink ...
+ ./cp-8.21 -R filelink OLD
+ rc_old=0
+ ./cp-new -R filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 1 Nov  4 23:39 OLD -> f
537371 lrwxrwxrwx 1 1 Nov  4 23:39 NEW -> f
=== OK


========================================
Test: cp   -R --preserve=links filelink ...
+ ./cp-8.21 -R --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -R --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 1 Nov  4 23:39 OLD -> f
537371 lrwxrwxrwx 1 1 Nov  4 23:39 NEW -> f
=== OK


========================================
Test: cp  -l   filelink ...
+ ./cp-8.21 -l filelink OLD
+ rc_old=0
+ ./cp-new -l filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 2 0 Nov  4 23:39 f
537347 -rw-r--r-- 2 0 Nov  4 23:39 NEW
537363 lrwxrwxrwx 2 1 Nov  4 23:39 filelink -> f
537363 lrwxrwxrwx 2 1 Nov  4 23:39 OLD -> f
=== DIFFERENCE in Test: cp  -l   filelink ...


========================================
Test: cp  -l  --preserve=links filelink ...
+ ./cp-8.21 -l --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -l --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 2 0 Nov  4 23:39 f
537347 -rw-r--r-- 2 0 Nov  4 23:39 NEW
537363 lrwxrwxrwx 2 1 Nov  4 23:39 filelink -> f
537363 lrwxrwxrwx 2 1 Nov  4 23:39 OLD -> f
=== DIFFERENCE in Test: cp  -l  --preserve=links filelink ...


========================================
Test: cp  -l -R  filelink ...
+ ./cp-8.21 -l -R filelink OLD
+ rc_old=0
+ ./cp-new -l -R filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 2 0 Nov  4 23:39 f
537347 -rw-r--r-- 2 0 Nov  4 23:39 NEW
537363 lrwxrwxrwx 2 1 Nov  4 23:39 filelink -> f
537363 lrwxrwxrwx 2 1 Nov  4 23:39 OLD -> f
=== DIFFERENCE in Test: cp  -l -R  filelink ...


========================================
Test: cp  -l -R --preserve=links filelink ...
+ ./cp-8.21 -l -R --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -l -R --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 2 0 Nov  4 23:39 f
537347 -rw-r--r-- 2 0 Nov  4 23:39 NEW
537363 lrwxrwxrwx 2 1 Nov  4 23:39 filelink -> f
537363 lrwxrwxrwx 2 1 Nov  4 23:39 OLD -> f
=== DIFFERENCE in Test: cp  -l -R --preserve=links filelink ...


========================================
Test: cp  -s   filelink ...
+ ./cp-8.21 -s filelink OLD
+ rc_old=0
+ ./cp-new -s filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> filelink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> filelink
=== OK


========================================
Test: cp  -s  --preserve=links filelink ...
+ ./cp-8.21 -s --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -s --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> filelink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> filelink
=== OK


========================================
Test: cp  -s -R  filelink ...
+ ./cp-8.21 -s -R filelink OLD
+ rc_old=0
+ ./cp-new -s -R filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> filelink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> filelink
=== OK


========================================
Test: cp  -s -R --preserve=links filelink ...
+ ./cp-8.21 -s -R --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -s -R --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> filelink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> filelink
=== OK


========================================
Test: cp -P    filelink ...
+ ./cp-8.21 -P filelink OLD
+ rc_old=0
+ ./cp-new -P filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 1 Nov  4 23:39 OLD -> f
537371 lrwxrwxrwx 1 1 Nov  4 23:39 NEW -> f
=== OK


========================================
Test: cp -P   --preserve=links filelink ...
+ ./cp-8.21 -P --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -P --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 1 Nov  4 23:39 OLD -> f
537371 lrwxrwxrwx 1 1 Nov  4 23:39 NEW -> f
=== OK


========================================
Test: cp -P  -R  filelink ...
+ ./cp-8.21 -P -R filelink OLD
+ rc_old=0
+ ./cp-new -P -R filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 1 Nov  4 23:39 OLD -> f
537371 lrwxrwxrwx 1 1 Nov  4 23:39 NEW -> f
=== OK


========================================
Test: cp -P  -R --preserve=links filelink ...
+ ./cp-8.21 -P -R --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -P -R --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 1 Nov  4 23:39 OLD -> f
537371 lrwxrwxrwx 1 1 Nov  4 23:39 NEW -> f
=== OK


========================================
Test: cp -P -l   filelink ...
+ ./cp-8.21 -P -l filelink OLD
+ rc_old=0
+ ./cp-new -P -l filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 3 1 Nov  4 23:39 filelink -> f
537363 lrwxrwxrwx 3 1 Nov  4 23:39 NEW -> f
537363 lrwxrwxrwx 3 1 Nov  4 23:39 OLD -> f
=== OK


========================================
Test: cp -P -l  --preserve=links filelink ...
+ ./cp-8.21 -P -l --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -P -l --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 3 1 Nov  4 23:39 filelink -> f
537363 lrwxrwxrwx 3 1 Nov  4 23:39 NEW -> f
537363 lrwxrwxrwx 3 1 Nov  4 23:39 OLD -> f
=== OK


========================================
Test: cp -P -l -R  filelink ...
+ ./cp-8.21 -P -l -R filelink OLD
+ rc_old=0
+ ./cp-new -P -l -R filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 3 1 Nov  4 23:39 filelink -> f
537363 lrwxrwxrwx 3 1 Nov  4 23:39 NEW -> f
537363 lrwxrwxrwx 3 1 Nov  4 23:39 OLD -> f
=== OK


========================================
Test: cp -P -l -R --preserve=links filelink ...
+ ./cp-8.21 -P -l -R --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -P -l -R --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 3 1 Nov  4 23:39 filelink -> f
537363 lrwxrwxrwx 3 1 Nov  4 23:39 NEW -> f
537363 lrwxrwxrwx 3 1 Nov  4 23:39 OLD -> f
=== OK


========================================
Test: cp -P -s   filelink ...
+ ./cp-8.21 -P -s filelink OLD
+ rc_old=0
+ ./cp-new -P -s filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> filelink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> filelink
=== OK


========================================
Test: cp -P -s  --preserve=links filelink ...
+ ./cp-8.21 -P -s --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -P -s --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> filelink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> filelink
=== OK


========================================
Test: cp -P -s -R  filelink ...
+ ./cp-8.21 -P -s -R filelink OLD
+ rc_old=0
+ ./cp-new -P -s -R filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> filelink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> filelink
=== OK


========================================
Test: cp -P -s -R --preserve=links filelink ...
+ ./cp-8.21 -P -s -R --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -P -s -R --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> filelink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> filelink
=== OK


========================================
Test: cp -L    filelink ...
+ ./cp-8.21 -L filelink OLD
+ rc_old=0
+ ./cp-new -L filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 -rw-r--r-- 1 0 Nov  4 23:39 OLD
537371 -rw-r--r-- 1 0 Nov  4 23:39 NEW
=== OK


========================================
Test: cp -L   --preserve=links filelink ...
+ ./cp-8.21 -L --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -L --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 -rw-r--r-- 1 0 Nov  4 23:39 OLD
537371 -rw-r--r-- 1 0 Nov  4 23:39 NEW
=== OK


========================================
Test: cp -L  -R  filelink ...
+ ./cp-8.21 -L -R filelink OLD
+ rc_old=0
+ ./cp-new -L -R filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 -rw-r--r-- 1 0 Nov  4 23:39 OLD
537371 -rw-r--r-- 1 0 Nov  4 23:39 NEW
=== OK


========================================
Test: cp -L  -R --preserve=links filelink ...
+ ./cp-8.21 -L -R --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -L -R --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 -rw-r--r-- 1 0 Nov  4 23:39 OLD
537371 -rw-r--r-- 1 0 Nov  4 23:39 NEW
=== OK


========================================
Test: cp -L -l   filelink ...
+ ./cp-8.21 -L -l filelink OLD
+ rc_old=0
+ ./cp-new -L -l filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 2 0 Nov  4 23:39 f
537347 -rw-r--r-- 2 0 Nov  4 23:39 NEW
537363 lrwxrwxrwx 2 1 Nov  4 23:39 filelink -> f
537363 lrwxrwxrwx 2 1 Nov  4 23:39 OLD -> f
=== DIFFERENCE in Test: cp -L -l   filelink ...


========================================
Test: cp -L -l  --preserve=links filelink ...
+ ./cp-8.21 -L -l --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -L -l --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 2 0 Nov  4 23:39 f
537347 -rw-r--r-- 2 0 Nov  4 23:39 NEW
537363 lrwxrwxrwx 2 1 Nov  4 23:39 filelink -> f
537363 lrwxrwxrwx 2 1 Nov  4 23:39 OLD -> f
=== DIFFERENCE in Test: cp -L -l  --preserve=links filelink ...


========================================
Test: cp -L -l -R  filelink ...
+ ./cp-8.21 -L -l -R filelink OLD
+ rc_old=0
+ ./cp-new -L -l -R filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 2 0 Nov  4 23:39 f
537347 -rw-r--r-- 2 0 Nov  4 23:39 NEW
537363 lrwxrwxrwx 2 1 Nov  4 23:39 filelink -> f
537363 lrwxrwxrwx 2 1 Nov  4 23:39 OLD -> f
=== DIFFERENCE in Test: cp -L -l -R  filelink ...


========================================
Test: cp -L -l -R --preserve=links filelink ...
+ ./cp-8.21 -L -l -R --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -L -l -R --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 2 0 Nov  4 23:39 f
537347 -rw-r--r-- 2 0 Nov  4 23:39 NEW
537363 lrwxrwxrwx 2 1 Nov  4 23:39 filelink -> f
537363 lrwxrwxrwx 2 1 Nov  4 23:39 OLD -> f
=== DIFFERENCE in Test: cp -L -l -R --preserve=links filelink ...


========================================
Test: cp -L -s   filelink ...
+ ./cp-8.21 -L -s filelink OLD
+ rc_old=0
+ ./cp-new -L -s filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> filelink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> filelink
=== OK


========================================
Test: cp -L -s  --preserve=links filelink ...
+ ./cp-8.21 -L -s --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -L -s --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> filelink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> filelink
=== OK


========================================
Test: cp -L -s -R  filelink ...
+ ./cp-8.21 -L -s -R filelink OLD
+ rc_old=0
+ ./cp-new -L -s -R filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> filelink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> filelink
=== OK


========================================
Test: cp -L -s -R --preserve=links filelink ...
+ ./cp-8.21 -L -s -R --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -L -s -R --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> filelink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> filelink
=== OK


========================================
Test: cp -H    filelink ...
+ ./cp-8.21 -H filelink OLD
+ rc_old=0
+ ./cp-new -H filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 -rw-r--r-- 1 0 Nov  4 23:39 OLD
537371 -rw-r--r-- 1 0 Nov  4 23:39 NEW
=== OK


========================================
Test: cp -H   --preserve=links filelink ...
+ ./cp-8.21 -H --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -H --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 -rw-r--r-- 1 0 Nov  4 23:39 OLD
537371 -rw-r--r-- 1 0 Nov  4 23:39 NEW
=== OK


========================================
Test: cp -H  -R  filelink ...
+ ./cp-8.21 -H -R filelink OLD
+ rc_old=0
+ ./cp-new -H -R filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 -rw-r--r-- 1 0 Nov  4 23:39 OLD
537371 -rw-r--r-- 1 0 Nov  4 23:39 NEW
=== OK


========================================
Test: cp -H  -R --preserve=links filelink ...
+ ./cp-8.21 -H -R --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -H -R --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 -rw-r--r-- 1 0 Nov  4 23:39 OLD
537371 -rw-r--r-- 1 0 Nov  4 23:39 NEW
=== OK


========================================
Test: cp -H -l   filelink ...
+ ./cp-8.21 -H -l filelink OLD
+ rc_old=0
+ ./cp-new -H -l filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 2 0 Nov  4 23:39 f
537347 -rw-r--r-- 2 0 Nov  4 23:39 NEW
537363 lrwxrwxrwx 2 1 Nov  4 23:39 filelink -> f
537363 lrwxrwxrwx 2 1 Nov  4 23:39 OLD -> f
=== DIFFERENCE in Test: cp -H -l   filelink ...


========================================
Test: cp -H -l  --preserve=links filelink ...
+ ./cp-8.21 -H -l --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -H -l --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 2 0 Nov  4 23:39 f
537347 -rw-r--r-- 2 0 Nov  4 23:39 NEW
537363 lrwxrwxrwx 2 1 Nov  4 23:39 filelink -> f
537363 lrwxrwxrwx 2 1 Nov  4 23:39 OLD -> f
=== DIFFERENCE in Test: cp -H -l  --preserve=links filelink ...


========================================
Test: cp -H -l -R  filelink ...
+ ./cp-8.21 -H -l -R filelink OLD
+ rc_old=0
+ ./cp-new -H -l -R filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 2 0 Nov  4 23:39 f
537347 -rw-r--r-- 2 0 Nov  4 23:39 NEW
537363 lrwxrwxrwx 2 1 Nov  4 23:39 filelink -> f
537363 lrwxrwxrwx 2 1 Nov  4 23:39 OLD -> f
=== DIFFERENCE in Test: cp -H -l -R  filelink ...


========================================
Test: cp -H -l -R --preserve=links filelink ...
+ ./cp-8.21 -H -l -R --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -H -l -R --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 2 0 Nov  4 23:39 f
537347 -rw-r--r-- 2 0 Nov  4 23:39 NEW
537363 lrwxrwxrwx 2 1 Nov  4 23:39 filelink -> f
537363 lrwxrwxrwx 2 1 Nov  4 23:39 OLD -> f
=== DIFFERENCE in Test: cp -H -l -R --preserve=links filelink ...


========================================
Test: cp -H -s   filelink ...
+ ./cp-8.21 -H -s filelink OLD
+ rc_old=0
+ ./cp-new -H -s filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> filelink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> filelink
=== OK


========================================
Test: cp -H -s  --preserve=links filelink ...
+ ./cp-8.21 -H -s --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -H -s --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> filelink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> filelink
=== OK


========================================
Test: cp -H -s -R  filelink ...
+ ./cp-8.21 -H -s -R filelink OLD
+ rc_old=0
+ ./cp-new -H -s -R filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> filelink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> filelink
=== OK


========================================
Test: cp -H -s -R --preserve=links filelink ...
+ ./cp-8.21 -H -s -R --preserve=links filelink OLD
+ rc_old=0
+ ./cp-new -H -s -R --preserve=links filelink NEW
+ rc_new=0
+ set +x
537347 -rw-r--r-- 1 0 Nov  4 23:39 f
537363 lrwxrwxrwx 1 1 Nov  4 23:39 filelink -> f
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> filelink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> filelink
=== OK


========================================
Test: cp     dirlink ...
+ ./cp-8.21 dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp    --preserve=links dirlink ...
+ ./cp-8.21 --preserve=links dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new --preserve=links dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp   -R  dirlink ...
+ ./cp-8.21 -R dirlink OLD
+ rc_old=0
+ ./cp-new -R dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 lrwxrwxrwx 1    1 Nov  4 23:39 OLD -> d
537371 lrwxrwxrwx 1    1 Nov  4 23:39 NEW -> d
=== OK


========================================
Test: cp   -R --preserve=links dirlink ...
+ ./cp-8.21 -R --preserve=links dirlink OLD
+ rc_old=0
+ ./cp-new -R --preserve=links dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 lrwxrwxrwx 1    1 Nov  4 23:39 OLD -> d
537371 lrwxrwxrwx 1    1 Nov  4 23:39 NEW -> d
=== OK


========================================
Test: cp  -l   dirlink ...
+ ./cp-8.21 -l dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new -l dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp  -l  --preserve=links dirlink ...
+ ./cp-8.21 -l --preserve=links dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new -l --preserve=links dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp  -l -R  dirlink ...
+ ./cp-8.21 -l -R dirlink OLD
+ rc_old=0
+ ./cp-new -l -R dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 3    0 Nov  4 23:39 d/f2
537359 -rw-r--r-- 3    0 Nov  4 23:39 NEW/f2
537359 -rw-r--r-- 3    0 Nov  4 23:39 NEW/fl
537361 -rw-r--r-- 3    0 Nov  4 23:39 d/d2/f3
537361 -rw-r--r-- 3    0 Nov  4 23:39 NEW/d2/f3
537361 -rw-r--r-- 3    0 Nov  4 23:39 NEW/dl/f3
537362 lrwxrwxrwx 2    1 Nov  4 23:39 dirlink -> d
537362 lrwxrwxrwx 2    1 Nov  4 23:39 OLD -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 drwxr-xr-x 4 4096 Nov  4 23:39 NEW
537371 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/d2
537373 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/dl
=== DIFFERENCE in Test: cp  -l -R  dirlink ...


========================================
Test: cp  -l -R --preserve=links dirlink ...
+ ./cp-8.21 -l -R --preserve=links dirlink OLD
+ rc_old=0
+ ./cp-new -l -R --preserve=links dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 3    0 Nov  4 23:39 d/f2
537359 -rw-r--r-- 3    0 Nov  4 23:39 NEW/f2
537359 -rw-r--r-- 3    0 Nov  4 23:39 NEW/fl
537361 -rw-r--r-- 3    0 Nov  4 23:39 d/d2/f3
537361 -rw-r--r-- 3    0 Nov  4 23:39 NEW/d2/f3
537361 -rw-r--r-- 3    0 Nov  4 23:39 NEW/dl/f3
537362 lrwxrwxrwx 2    1 Nov  4 23:39 dirlink -> d
537362 lrwxrwxrwx 2    1 Nov  4 23:39 OLD -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 drwxr-xr-x 4 4096 Nov  4 23:39 NEW
537371 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/d2
537373 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/dl
=== DIFFERENCE in Test: cp  -l -R --preserve=links dirlink ...


========================================
Test: cp  -s   dirlink ...
+ ./cp-8.21 -s dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new -s dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp  -s  --preserve=links dirlink ...
+ ./cp-8.21 -s --preserve=links dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new -s --preserve=links dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp  -s -R  dirlink ...
+ ./cp-8.21 -s -R dirlink OLD
+ rc_old=0
+ ./cp-new -s -R dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 lrwxrwxrwx 1    7 Nov  4 23:39 OLD -> dirlink
537371 lrwxrwxrwx 1    7 Nov  4 23:39 NEW -> dirlink
=== OK


========================================
Test: cp  -s -R --preserve=links dirlink ...
+ ./cp-8.21 -s -R --preserve=links dirlink OLD
+ rc_old=0
+ ./cp-new -s -R --preserve=links dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 lrwxrwxrwx 1    7 Nov  4 23:39 OLD -> dirlink
537371 lrwxrwxrwx 1    7 Nov  4 23:39 NEW -> dirlink
=== OK


========================================
Test: cp -P    dirlink ...
+ ./cp-8.21 -P dirlink OLD
+ rc_old=0
+ ./cp-new -P dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 lrwxrwxrwx 1    1 Nov  4 23:39 OLD -> d
537371 lrwxrwxrwx 1    1 Nov  4 23:39 NEW -> d
=== OK


========================================
Test: cp -P   --preserve=links dirlink ...
+ ./cp-8.21 -P --preserve=links dirlink OLD
+ rc_old=0
+ ./cp-new -P --preserve=links dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 lrwxrwxrwx 1    1 Nov  4 23:39 OLD -> d
537371 lrwxrwxrwx 1    1 Nov  4 23:39 NEW -> d
=== OK


========================================
Test: cp -P  -R  dirlink ...
+ ./cp-8.21 -P -R dirlink OLD
+ rc_old=0
+ ./cp-new -P -R dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 lrwxrwxrwx 1    1 Nov  4 23:39 OLD -> d
537371 lrwxrwxrwx 1    1 Nov  4 23:39 NEW -> d
=== OK


========================================
Test: cp -P  -R --preserve=links dirlink ...
+ ./cp-8.21 -P -R --preserve=links dirlink OLD
+ rc_old=0
+ ./cp-new -P -R --preserve=links dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 lrwxrwxrwx 1    1 Nov  4 23:39 OLD -> d
537371 lrwxrwxrwx 1    1 Nov  4 23:39 NEW -> d
=== OK


========================================
Test: cp -P -l   dirlink ...
+ ./cp-8.21 -P -l dirlink OLD
+ rc_old=0
+ ./cp-new -P -l dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 3    1 Nov  4 23:39 dirlink -> d
537362 lrwxrwxrwx 3    1 Nov  4 23:39 NEW -> d
537362 lrwxrwxrwx 3    1 Nov  4 23:39 OLD -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp -P -l  --preserve=links dirlink ...
+ ./cp-8.21 -P -l --preserve=links dirlink OLD
+ rc_old=0
+ ./cp-new -P -l --preserve=links dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 3    1 Nov  4 23:39 dirlink -> d
537362 lrwxrwxrwx 3    1 Nov  4 23:39 NEW -> d
537362 lrwxrwxrwx 3    1 Nov  4 23:39 OLD -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp -P -l -R  dirlink ...
+ ./cp-8.21 -P -l -R dirlink OLD
+ rc_old=0
+ ./cp-new -P -l -R dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 3    1 Nov  4 23:39 dirlink -> d
537362 lrwxrwxrwx 3    1 Nov  4 23:39 NEW -> d
537362 lrwxrwxrwx 3    1 Nov  4 23:39 OLD -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp -P -l -R --preserve=links dirlink ...
+ ./cp-8.21 -P -l -R --preserve=links dirlink OLD
+ rc_old=0
+ ./cp-new -P -l -R --preserve=links dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 3    1 Nov  4 23:39 dirlink -> d
537362 lrwxrwxrwx 3    1 Nov  4 23:39 NEW -> d
537362 lrwxrwxrwx 3    1 Nov  4 23:39 OLD -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp -P -s   dirlink ...
+ ./cp-8.21 -P -s dirlink OLD
+ rc_old=0
+ ./cp-new -P -s dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 lrwxrwxrwx 1    7 Nov  4 23:39 OLD -> dirlink
537371 lrwxrwxrwx 1    7 Nov  4 23:39 NEW -> dirlink
=== OK


========================================
Test: cp -P -s  --preserve=links dirlink ...
+ ./cp-8.21 -P -s --preserve=links dirlink OLD
+ rc_old=0
+ ./cp-new -P -s --preserve=links dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 lrwxrwxrwx 1    7 Nov  4 23:39 OLD -> dirlink
537371 lrwxrwxrwx 1    7 Nov  4 23:39 NEW -> dirlink
=== OK


========================================
Test: cp -P -s -R  dirlink ...
+ ./cp-8.21 -P -s -R dirlink OLD
+ rc_old=0
+ ./cp-new -P -s -R dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 lrwxrwxrwx 1    7 Nov  4 23:39 OLD -> dirlink
537371 lrwxrwxrwx 1    7 Nov  4 23:39 NEW -> dirlink
=== OK


========================================
Test: cp -P -s -R --preserve=links dirlink ...
+ ./cp-8.21 -P -s -R --preserve=links dirlink OLD
+ rc_old=0
+ ./cp-new -P -s -R --preserve=links dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 lrwxrwxrwx 1    7 Nov  4 23:39 OLD -> dirlink
537371 lrwxrwxrwx 1    7 Nov  4 23:39 NEW -> dirlink
=== OK


========================================
Test: cp -L    dirlink ...
+ ./cp-8.21 -L dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new -L dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp -L   --preserve=links dirlink ...
+ ./cp-8.21 -L --preserve=links dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new -L --preserve=links dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp -L  -R  dirlink ...
+ ./cp-8.21 -L -R dirlink OLD
+ rc_old=0
+ ./cp-new -L -R dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 drwxr-xr-x 4 4096 Nov  4 23:39 OLD
537371 -rw-r--r-- 1    0 Nov  4 23:39 OLD/f2
537373 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/d2
537376 -rw-r--r-- 1    0 Nov  4 23:39 OLD/d2/f3
537377 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/dl
537378 -rw-r--r-- 1    0 Nov  4 23:39 OLD/dl/f3
537379 -rw-r--r-- 1    0 Nov  4 23:39 OLD/fl
537380 drwxr-xr-x 4 4096 Nov  4 23:39 NEW
537381 -rw-r--r-- 1    0 Nov  4 23:39 NEW/f2
537382 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/d2
537383 -rw-r--r-- 1    0 Nov  4 23:39 NEW/d2/f3
537384 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/dl
537385 -rw-r--r-- 1    0 Nov  4 23:39 NEW/dl/f3
537386 -rw-r--r-- 1    0 Nov  4 23:39 NEW/fl
=== OK


========================================
Test: cp -L  -R --preserve=links dirlink ...
+ ./cp-8.21 -L -R --preserve=links dirlink OLD
+ rc_old=0
+ ./cp-new -L -R --preserve=links dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 drwxr-xr-x 4 4096 Nov  4 23:39 OLD
537371 -rw-r--r-- 2    0 Nov  4 23:39 OLD/f2
537371 -rw-r--r-- 2    0 Nov  4 23:39 OLD/fl
537373 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/d2
537376 -rw-r--r-- 2    0 Nov  4 23:39 OLD/d2/f3
537376 -rw-r--r-- 2    0 Nov  4 23:39 OLD/dl/f3
537377 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/dl
537378 drwxr-xr-x 4 4096 Nov  4 23:39 NEW
537379 -rw-r--r-- 2    0 Nov  4 23:39 NEW/f2
537379 -rw-r--r-- 2    0 Nov  4 23:39 NEW/fl
537380 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/d2
537381 -rw-r--r-- 2    0 Nov  4 23:39 NEW/d2/f3
537381 -rw-r--r-- 2    0 Nov  4 23:39 NEW/dl/f3
537382 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/dl
=== OK


========================================
Test: cp -L -l   dirlink ...
+ ./cp-8.21 -L -l dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new -L -l dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp -L -l  --preserve=links dirlink ...
+ ./cp-8.21 -L -l --preserve=links dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new -L -l --preserve=links dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp -L -l -R  dirlink ...
+ ./cp-8.21 -L -l -R dirlink OLD
+ rc_old=0
+ ./cp-new -L -l -R dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 4    0 Nov  4 23:39 d/f2
537359 -rw-r--r-- 4    0 Nov  4 23:39 NEW/f2
537359 -rw-r--r-- 4    0 Nov  4 23:39 NEW/fl
537359 -rw-r--r-- 4    0 Nov  4 23:39 OLD/f2
537361 -rw-r--r-- 5    0 Nov  4 23:39 d/d2/f3
537361 -rw-r--r-- 5    0 Nov  4 23:39 NEW/d2/f3
537361 -rw-r--r-- 5    0 Nov  4 23:39 NEW/dl/f3
537361 -rw-r--r-- 5    0 Nov  4 23:39 OLD/d2/f3
537361 -rw-r--r-- 5    0 Nov  4 23:39 OLD/dl/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 2    2 Nov  4 23:39 d/fl -> f2
537365 lrwxrwxrwx 2    2 Nov  4 23:39 OLD/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 drwxr-xr-x 4 4096 Nov  4 23:39 OLD
537371 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/d2
537373 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/dl
537376 drwxr-xr-x 4 4096 Nov  4 23:39 NEW
537377 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/d2
537378 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/dl
=== OK


========================================
Test: cp -L -l -R --preserve=links dirlink ...
+ ./cp-8.21 -L -l -R --preserve=links dirlink OLD
+ rc_old=0
+ ./cp-new -L -l -R --preserve=links dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 4    0 Nov  4 23:39 d/f2
537359 -rw-r--r-- 4    0 Nov  4 23:39 NEW/f2
537359 -rw-r--r-- 4    0 Nov  4 23:39 NEW/fl
537359 -rw-r--r-- 4    0 Nov  4 23:39 OLD/f2
537361 -rw-r--r-- 5    0 Nov  4 23:39 d/d2/f3
537361 -rw-r--r-- 5    0 Nov  4 23:39 NEW/d2/f3
537361 -rw-r--r-- 5    0 Nov  4 23:39 NEW/dl/f3
537361 -rw-r--r-- 5    0 Nov  4 23:39 OLD/d2/f3
537361 -rw-r--r-- 5    0 Nov  4 23:39 OLD/dl/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 2    2 Nov  4 23:39 d/fl -> f2
537365 lrwxrwxrwx 2    2 Nov  4 23:39 OLD/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 drwxr-xr-x 4 4096 Nov  4 23:39 OLD
537371 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/d2
537373 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/dl
537376 drwxr-xr-x 4 4096 Nov  4 23:39 NEW
537377 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/d2
537378 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/dl
=== OK


========================================
Test: cp -L -s   dirlink ...
+ ./cp-8.21 -L -s dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new -L -s dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp -L -s  --preserve=links dirlink ...
+ ./cp-8.21 -L -s --preserve=links dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new -L -s --preserve=links dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp -L -s -R  dirlink ...
+ ./cp-8.21 -L -s -R dirlink OLD
./cp-8.21: ‘OLD/f2’: can make relative symbolic links only in current directory
./cp-8.21: ‘OLD/d2/f3’: can make relative symbolic links only in current directory
./cp-8.21: ‘OLD/dl/f3’: can make relative symbolic links only in current directory
./cp-8.21: ‘OLD/fl’: can make relative symbolic links only in current directory
+ rc_old=1
+ ./cp-new -L -s -R dirlink NEW
./cp-new: ‘NEW/f2’: can make relative symbolic links only in current directory
./cp-new: ‘NEW/d2/f3’: can make relative symbolic links only in current directory
./cp-new: ‘NEW/dl/f3’: can make relative symbolic links only in current directory
./cp-new: ‘NEW/fl’: can make relative symbolic links only in current directory
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 drwxr-xr-x 4 4096 Nov  4 23:39 OLD
537371 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/d2
537373 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/dl
537376 drwxr-xr-x 4 4096 Nov  4 23:39 NEW
537377 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/d2
537378 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/dl
=== OK


========================================
Test: cp -L -s -R --preserve=links dirlink ...
+ ./cp-8.21 -L -s -R --preserve=links dirlink OLD
./cp-8.21: ‘OLD/f2’: can make relative symbolic links only in current directory
./cp-8.21: ‘OLD/d2/f3’: can make relative symbolic links only in current directory
./cp-8.21: ‘OLD/dl/f3’: can make relative symbolic links only in current directory
./cp-8.21: ‘OLD/fl’: can make relative symbolic links only in current directory
+ rc_old=1
+ ./cp-new -L -s -R --preserve=links dirlink NEW
./cp-new: ‘NEW/f2’: can make relative symbolic links only in current directory
./cp-new: ‘NEW/d2/f3’: can make relative symbolic links only in current directory
./cp-new: ‘NEW/dl/f3’: can make relative symbolic links only in current directory
./cp-new: ‘NEW/fl’: can make relative symbolic links only in current directory
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 drwxr-xr-x 4 4096 Nov  4 23:39 OLD
537371 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/d2
537373 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/dl
537376 drwxr-xr-x 4 4096 Nov  4 23:39 NEW
537377 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/d2
537378 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/dl
=== OK


========================================
Test: cp -H    dirlink ...
+ ./cp-8.21 -H dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new -H dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp -H   --preserve=links dirlink ...
+ ./cp-8.21 -H --preserve=links dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new -H --preserve=links dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp -H  -R  dirlink ...
+ ./cp-8.21 -H -R dirlink OLD
+ rc_old=0
+ ./cp-new -H -R dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 drwxr-xr-x 3 4096 Nov  4 23:39 OLD
537371 -rw-r--r-- 1    0 Nov  4 23:39 OLD/f2
537373 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/d2
537376 -rw-r--r-- 1    0 Nov  4 23:39 OLD/d2/f3
537377 lrwxrwxrwx 1    2 Nov  4 23:39 OLD/dl -> d2
537378 lrwxrwxrwx 1    2 Nov  4 23:39 OLD/fl -> f2
537379 drwxr-xr-x 3 4096 Nov  4 23:39 NEW
537380 -rw-r--r-- 1    0 Nov  4 23:39 NEW/f2
537381 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/d2
537382 -rw-r--r-- 1    0 Nov  4 23:39 NEW/d2/f3
537383 lrwxrwxrwx 1    2 Nov  4 23:39 NEW/dl -> d2
537384 lrwxrwxrwx 1    2 Nov  4 23:39 NEW/fl -> f2
=== OK


========================================
Test: cp -H  -R --preserve=links dirlink ...
+ ./cp-8.21 -H -R --preserve=links dirlink OLD
+ rc_old=0
+ ./cp-new -H -R --preserve=links dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 drwxr-xr-x 3 4096 Nov  4 23:39 OLD
537371 -rw-r--r-- 1    0 Nov  4 23:39 OLD/f2
537373 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/d2
537376 -rw-r--r-- 1    0 Nov  4 23:39 OLD/d2/f3
537377 lrwxrwxrwx 1    2 Nov  4 23:39 OLD/dl -> d2
537378 lrwxrwxrwx 1    2 Nov  4 23:39 OLD/fl -> f2
537379 drwxr-xr-x 3 4096 Nov  4 23:39 NEW
537380 -rw-r--r-- 1    0 Nov  4 23:39 NEW/f2
537381 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/d2
537382 -rw-r--r-- 1    0 Nov  4 23:39 NEW/d2/f3
537383 lrwxrwxrwx 1    2 Nov  4 23:39 NEW/dl -> d2
537384 lrwxrwxrwx 1    2 Nov  4 23:39 NEW/fl -> f2
=== OK


========================================
Test: cp -H -l   dirlink ...
+ ./cp-8.21 -H -l dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new -H -l dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp -H -l  --preserve=links dirlink ...
+ ./cp-8.21 -H -l --preserve=links dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new -H -l --preserve=links dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp -H -l -R  dirlink ...
+ ./cp-8.21 -H -l -R dirlink OLD
+ rc_old=0
+ ./cp-new -H -l -R dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 3    0 Nov  4 23:39 d/f2
537359 -rw-r--r-- 3    0 Nov  4 23:39 NEW/f2
537359 -rw-r--r-- 3    0 Nov  4 23:39 OLD/f2
537361 -rw-r--r-- 3    0 Nov  4 23:39 d/d2/f3
537361 -rw-r--r-- 3    0 Nov  4 23:39 NEW/d2/f3
537361 -rw-r--r-- 3    0 Nov  4 23:39 OLD/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 3    2 Nov  4 23:39 d/fl -> f2
537365 lrwxrwxrwx 3    2 Nov  4 23:39 NEW/fl -> f2
537365 lrwxrwxrwx 3    2 Nov  4 23:39 OLD/fl -> f2
537369 lrwxrwxrwx 3    2 Nov  4 23:39 d/dl -> d2
537369 lrwxrwxrwx 3    2 Nov  4 23:39 NEW/dl -> d2
537369 lrwxrwxrwx 3    2 Nov  4 23:39 OLD/dl -> d2
537370 drwxr-xr-x 3 4096 Nov  4 23:39 OLD
537371 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/d2
537373 drwxr-xr-x 3 4096 Nov  4 23:39 NEW
537376 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/d2
=== OK


========================================
Test: cp -H -l -R --preserve=links dirlink ...
+ ./cp-8.21 -H -l -R --preserve=links dirlink OLD
+ rc_old=0
+ ./cp-new -H -l -R --preserve=links dirlink NEW
+ rc_new=0
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 3    0 Nov  4 23:39 d/f2
537359 -rw-r--r-- 3    0 Nov  4 23:39 NEW/f2
537359 -rw-r--r-- 3    0 Nov  4 23:39 OLD/f2
537361 -rw-r--r-- 3    0 Nov  4 23:39 d/d2/f3
537361 -rw-r--r-- 3    0 Nov  4 23:39 NEW/d2/f3
537361 -rw-r--r-- 3    0 Nov  4 23:39 OLD/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 3    2 Nov  4 23:39 d/fl -> f2
537365 lrwxrwxrwx 3    2 Nov  4 23:39 NEW/fl -> f2
537365 lrwxrwxrwx 3    2 Nov  4 23:39 OLD/fl -> f2
537369 lrwxrwxrwx 3    2 Nov  4 23:39 d/dl -> d2
537369 lrwxrwxrwx 3    2 Nov  4 23:39 NEW/dl -> d2
537369 lrwxrwxrwx 3    2 Nov  4 23:39 OLD/dl -> d2
537370 drwxr-xr-x 3 4096 Nov  4 23:39 OLD
537371 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/d2
537373 drwxr-xr-x 3 4096 Nov  4 23:39 NEW
537376 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/d2
=== OK


========================================
Test: cp -H -s   dirlink ...
+ ./cp-8.21 -H -s dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new -H -s dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp -H -s  --preserve=links dirlink ...
+ ./cp-8.21 -H -s --preserve=links dirlink OLD
./cp-8.21: omitting directory ‘dirlink’
+ rc_old=1
+ ./cp-new -H -s --preserve=links dirlink NEW
./cp-new: omitting directory ‘dirlink’
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
=== OK


========================================
Test: cp -H -s -R  dirlink ...
+ ./cp-8.21 -H -s -R dirlink OLD
./cp-8.21: ‘OLD/f2’: can make relative symbolic links only in current directory
./cp-8.21: ‘OLD/d2/f3’: can make relative symbolic links only in current directory
./cp-8.21: ‘OLD/dl’: can make relative symbolic links only in current directory
./cp-8.21: ‘OLD/fl’: can make relative symbolic links only in current directory
+ rc_old=1
+ ./cp-new -H -s -R dirlink NEW
./cp-new: ‘NEW/f2’: can make relative symbolic links only in current directory
./cp-new: ‘NEW/d2/f3’: can make relative symbolic links only in current directory
./cp-new: ‘NEW/dl’: can make relative symbolic links only in current directory
./cp-new: ‘NEW/fl’: can make relative symbolic links only in current directory
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 drwxr-xr-x 3 4096 Nov  4 23:39 OLD
537371 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/d2
537373 drwxr-xr-x 3 4096 Nov  4 23:39 NEW
537376 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/d2
=== OK


========================================
Test: cp -H -s -R --preserve=links dirlink ...
+ ./cp-8.21 -H -s -R --preserve=links dirlink OLD
./cp-8.21: ‘OLD/f2’: can make relative symbolic links only in current directory
./cp-8.21: ‘OLD/d2/f3’: can make relative symbolic links only in current directory
./cp-8.21: ‘OLD/dl’: can make relative symbolic links only in current directory
./cp-8.21: ‘OLD/fl’: can make relative symbolic links only in current directory
+ rc_old=1
+ ./cp-new -H -s -R --preserve=links dirlink NEW
./cp-new: ‘NEW/f2’: can make relative symbolic links only in current directory
./cp-new: ‘NEW/d2/f3’: can make relative symbolic links only in current directory
./cp-new: ‘NEW/dl’: can make relative symbolic links only in current directory
./cp-new: ‘NEW/fl’: can make relative symbolic links only in current directory
+ rc_new=1
+ set +x
537251 drwxr-xr-x 3 4096 Nov  4 23:39 d
537257 drwxr-xr-x 2 4096 Nov  4 23:39 d/d2
537359 -rw-r--r-- 1    0 Nov  4 23:39 d/f2
537361 -rw-r--r-- 1    0 Nov  4 23:39 d/d2/f3
537362 lrwxrwxrwx 1    1 Nov  4 23:39 dirlink -> d
537365 lrwxrwxrwx 1    2 Nov  4 23:39 d/fl -> f2
537369 lrwxrwxrwx 1    2 Nov  4 23:39 d/dl -> d2
537370 drwxr-xr-x 3 4096 Nov  4 23:39 OLD
537371 drwxr-xr-x 2 4096 Nov  4 23:39 OLD/d2
537373 drwxr-xr-x 3 4096 Nov  4 23:39 NEW
537376 drwxr-xr-x 2 4096 Nov  4 23:39 NEW/d2
=== OK


========================================
Test: cp     danglink ...
+ ./cp-8.21 danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp    --preserve=links danglink ...
+ ./cp-8.21 --preserve=links danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new --preserve=links danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp   -R  danglink ...
+ ./cp-8.21 -R danglink OLD
+ rc_old=0
+ ./cp-new -R danglink NEW
+ rc_new=0
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
537370 lrwxrwxrwx 1 7 Nov  4 23:39 OLD -> nowhere
537371 lrwxrwxrwx 1 7 Nov  4 23:39 NEW -> nowhere
=== OK


========================================
Test: cp   -R --preserve=links danglink ...
+ ./cp-8.21 -R --preserve=links danglink OLD
+ rc_old=0
+ ./cp-new -R --preserve=links danglink NEW
+ rc_new=0
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
537370 lrwxrwxrwx 1 7 Nov  4 23:39 OLD -> nowhere
537371 lrwxrwxrwx 1 7 Nov  4 23:39 NEW -> nowhere
=== OK


========================================
Test: cp  -l   danglink ...
+ ./cp-8.21 -l danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -l danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp  -l  --preserve=links danglink ...
+ ./cp-8.21 -l --preserve=links danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -l --preserve=links danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp  -l -R  danglink ...
+ ./cp-8.21 -l -R danglink OLD
+ rc_old=0
+ ./cp-new -l -R danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 2 7 Nov  4 23:39 danglink -> nowhere
537364 lrwxrwxrwx 2 7 Nov  4 23:39 OLD -> nowhere
=== DIFFERENCE in Test: cp  -l -R  danglink ...


========================================
Test: cp  -l -R --preserve=links danglink ...
+ ./cp-8.21 -l -R --preserve=links danglink OLD
+ rc_old=0
+ ./cp-new -l -R --preserve=links danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 2 7 Nov  4 23:39 danglink -> nowhere
537364 lrwxrwxrwx 2 7 Nov  4 23:39 OLD -> nowhere
=== DIFFERENCE in Test: cp  -l -R --preserve=links danglink ...


========================================
Test: cp  -s   danglink ...
+ ./cp-8.21 -s danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -s danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp  -s  --preserve=links danglink ...
+ ./cp-8.21 -s --preserve=links danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -s --preserve=links danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp  -s -R  danglink ...
+ ./cp-8.21 -s -R danglink OLD
+ rc_old=0
+ ./cp-new -s -R danglink NEW
+ rc_new=0
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> danglink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> danglink
=== OK


========================================
Test: cp  -s -R --preserve=links danglink ...
+ ./cp-8.21 -s -R --preserve=links danglink OLD
+ rc_old=0
+ ./cp-new -s -R --preserve=links danglink NEW
+ rc_new=0
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> danglink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> danglink
=== OK


========================================
Test: cp -P    danglink ...
+ ./cp-8.21 -P danglink OLD
+ rc_old=0
+ ./cp-new -P danglink NEW
+ rc_new=0
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
537370 lrwxrwxrwx 1 7 Nov  4 23:39 OLD -> nowhere
537371 lrwxrwxrwx 1 7 Nov  4 23:39 NEW -> nowhere
=== OK


========================================
Test: cp -P   --preserve=links danglink ...
+ ./cp-8.21 -P --preserve=links danglink OLD
+ rc_old=0
+ ./cp-new -P --preserve=links danglink NEW
+ rc_new=0
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
537370 lrwxrwxrwx 1 7 Nov  4 23:39 OLD -> nowhere
537371 lrwxrwxrwx 1 7 Nov  4 23:39 NEW -> nowhere
=== OK


========================================
Test: cp -P  -R  danglink ...
+ ./cp-8.21 -P -R danglink OLD
+ rc_old=0
+ ./cp-new -P -R danglink NEW
+ rc_new=0
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
537370 lrwxrwxrwx 1 7 Nov  4 23:39 OLD -> nowhere
537371 lrwxrwxrwx 1 7 Nov  4 23:39 NEW -> nowhere
=== OK


========================================
Test: cp -P  -R --preserve=links danglink ...
+ ./cp-8.21 -P -R --preserve=links danglink OLD
+ rc_old=0
+ ./cp-new -P -R --preserve=links danglink NEW
+ rc_new=0
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
537370 lrwxrwxrwx 1 7 Nov  4 23:39 OLD -> nowhere
537371 lrwxrwxrwx 1 7 Nov  4 23:39 NEW -> nowhere
=== OK


========================================
Test: cp -P -l   danglink ...
+ ./cp-8.21 -P -l danglink OLD
+ rc_old=0
+ ./cp-new -P -l danglink NEW
+ rc_new=0
+ set +x
537364 lrwxrwxrwx 3 7 Nov  4 23:39 danglink -> nowhere
537364 lrwxrwxrwx 3 7 Nov  4 23:39 NEW -> nowhere
537364 lrwxrwxrwx 3 7 Nov  4 23:39 OLD -> nowhere
=== OK


========================================
Test: cp -P -l  --preserve=links danglink ...
+ ./cp-8.21 -P -l --preserve=links danglink OLD
+ rc_old=0
+ ./cp-new -P -l --preserve=links danglink NEW
+ rc_new=0
+ set +x
537364 lrwxrwxrwx 3 7 Nov  4 23:39 danglink -> nowhere
537364 lrwxrwxrwx 3 7 Nov  4 23:39 NEW -> nowhere
537364 lrwxrwxrwx 3 7 Nov  4 23:39 OLD -> nowhere
=== OK


========================================
Test: cp -P -l -R  danglink ...
+ ./cp-8.21 -P -l -R danglink OLD
+ rc_old=0
+ ./cp-new -P -l -R danglink NEW
+ rc_new=0
+ set +x
537364 lrwxrwxrwx 3 7 Nov  4 23:39 danglink -> nowhere
537364 lrwxrwxrwx 3 7 Nov  4 23:39 NEW -> nowhere
537364 lrwxrwxrwx 3 7 Nov  4 23:39 OLD -> nowhere
=== OK


========================================
Test: cp -P -l -R --preserve=links danglink ...
+ ./cp-8.21 -P -l -R --preserve=links danglink OLD
+ rc_old=0
+ ./cp-new -P -l -R --preserve=links danglink NEW
+ rc_new=0
+ set +x
537364 lrwxrwxrwx 3 7 Nov  4 23:39 danglink -> nowhere
537364 lrwxrwxrwx 3 7 Nov  4 23:39 NEW -> nowhere
537364 lrwxrwxrwx 3 7 Nov  4 23:39 OLD -> nowhere
=== OK


========================================
Test: cp -P -s   danglink ...
+ ./cp-8.21 -P -s danglink OLD
+ rc_old=0
+ ./cp-new -P -s danglink NEW
+ rc_new=0
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> danglink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> danglink
=== OK


========================================
Test: cp -P -s  --preserve=links danglink ...
+ ./cp-8.21 -P -s --preserve=links danglink OLD
+ rc_old=0
+ ./cp-new -P -s --preserve=links danglink NEW
+ rc_new=0
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> danglink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> danglink
=== OK


========================================
Test: cp -P -s -R  danglink ...
+ ./cp-8.21 -P -s -R danglink OLD
+ rc_old=0
+ ./cp-new -P -s -R danglink NEW
+ rc_new=0
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> danglink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> danglink
=== OK


========================================
Test: cp -P -s -R --preserve=links danglink ...
+ ./cp-8.21 -P -s -R --preserve=links danglink OLD
+ rc_old=0
+ ./cp-new -P -s -R --preserve=links danglink NEW
+ rc_new=0
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
537370 lrwxrwxrwx 1 8 Nov  4 23:39 OLD -> danglink
537371 lrwxrwxrwx 1 8 Nov  4 23:39 NEW -> danglink
=== OK


========================================
Test: cp -L    danglink ...
+ ./cp-8.21 -L danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -L danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -L   --preserve=links danglink ...
+ ./cp-8.21 -L --preserve=links danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -L --preserve=links danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -L  -R  danglink ...
+ ./cp-8.21 -L -R danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -L -R danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -L  -R --preserve=links danglink ...
+ ./cp-8.21 -L -R --preserve=links danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -L -R --preserve=links danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -L -l   danglink ...
+ ./cp-8.21 -L -l danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -L -l danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -L -l  --preserve=links danglink ...
+ ./cp-8.21 -L -l --preserve=links danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -L -l --preserve=links danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -L -l -R  danglink ...
+ ./cp-8.21 -L -l -R danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -L -l -R danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -L -l -R --preserve=links danglink ...
+ ./cp-8.21 -L -l -R --preserve=links danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -L -l -R --preserve=links danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -L -s   danglink ...
+ ./cp-8.21 -L -s danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -L -s danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -L -s  --preserve=links danglink ...
+ ./cp-8.21 -L -s --preserve=links danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -L -s --preserve=links danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -L -s -R  danglink ...
+ ./cp-8.21 -L -s -R danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -L -s -R danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -L -s -R --preserve=links danglink ...
+ ./cp-8.21 -L -s -R --preserve=links danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -L -s -R --preserve=links danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -H    danglink ...
+ ./cp-8.21 -H danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -H danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -H   --preserve=links danglink ...
+ ./cp-8.21 -H --preserve=links danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -H --preserve=links danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -H  -R  danglink ...
+ ./cp-8.21 -H -R danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -H -R danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -H  -R --preserve=links danglink ...
+ ./cp-8.21 -H -R --preserve=links danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -H -R --preserve=links danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -H -l   danglink ...
+ ./cp-8.21 -H -l danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -H -l danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -H -l  --preserve=links danglink ...
+ ./cp-8.21 -H -l --preserve=links danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -H -l --preserve=links danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -H -l -R  danglink ...
+ ./cp-8.21 -H -l -R danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -H -l -R danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -H -l -R --preserve=links danglink ...
+ ./cp-8.21 -H -l -R --preserve=links danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -H -l -R --preserve=links danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -H -s   danglink ...
+ ./cp-8.21 -H -s danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -H -s danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -H -s  --preserve=links danglink ...
+ ./cp-8.21 -H -s --preserve=links danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -H -s --preserve=links danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -H -s -R  danglink ...
+ ./cp-8.21 -H -s -R danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -H -s -R danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


========================================
Test: cp -H -s -R --preserve=links danglink ...
+ ./cp-8.21 -H -s -R --preserve=links danglink OLD
./cp-8.21: cannot stat ‘danglink’: No such file or directory
+ rc_old=1
+ ./cp-new -H -s -R --preserve=links danglink NEW
./cp-new: cannot stat ‘danglink’: No such file or directory
+ rc_new=1
+ set +x
537364 lrwxrwxrwx 1 7 Nov  4 23:39 danglink -> nowhere
=== OK


=== Cleanup
