bugfindutils - Bugs: bug #48135, samefile-p-brokenlink.exp fails on...

 
 

bug #48135: samefile-p-brokenlink.exp fails on Hurd and BSD

Submitted by:  Andreas Metzler <ametzler>
Submitted on:  Sun 05 Jun 2016 09:55:53 AM UTC  
 
Category:  find Severity:  3 - Normal
Item Group:  Test suite failure Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  4.6.0 Fixed Release:  None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 05 Jun 2016 09:55:53 AM UTC, original submission:

Hello,

this was originally submitted as http://bugs.debian.org/826357 by Samuel Thibault:
------------------
kfreebsd & hurd both get the following issue in the testsuite:

Running ./find.gnu/samefile-p-brokenlink.exp ...
ERROR: tcl error sourcing ./find.gnu/samefile-p-brokenlink.exp.
ERROR: ln: failed to access 'tmp/broken': No such file or directory
while executing
"exec ln tmp/broken tmp/blink"
(file "./find.gnu/samefile-p-brokenlink.exp" line 8)
invoked from within
"source ./find.gnu/samefile-p-brokenlink.exp"
("uplevel" body line 1)
invoked from within
"uplevel #0 source ./find.gnu/samefile-p-brokenlink.exp"
invoked from within
"catch "uplevel #0 source $test_file_name""

Here is the script:

exec rm -rf tmp
exec mkdir tmp
exec touch tmp/file1
exec ln tmp/file1 tmp/link
exec ln -s tmp/file1 tmp/symlink
exec ln -s tmp/file2 tmp/broken
exec ln tmp/broken tmp/blink

That last ln is failing, because both BSD and Hurd's link() follow symlinks (here broken, thus the error), while Linux doesn't. POSIX says that it is implementation-defined whether link() follows symlinks, so findutils should not assume one way or the other.
------------------

Find attached a simple patch to fix, passing -P to ln. In this patch I have also changed

exec ln -s tmp/file1 tmp/symlink
to
exec ln -s file1 tmp/symlink

because afaiu from the naming this command should generate a vaild, non broken symlink.

cu Andreas

Andreas Metzler <ametzler>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2016-06-05 ametzler Carbon-CopyRemoved 20807 => -
2016-06-05 ametzler Attached File- => Added 0001-Fix-testsuite-error-on-hurd-and-BSD-related-to-ln.patch, #37393

Back to the top


Powered by Savane 3.3