bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do likewise?

2018-07-14 Thread L A Walsh




Paul Eggert wrote:

On 07/12/2018 02:16 AM, L A Walsh wrote:

I'm asking why does 'ln' bother to tell the user that they are
wrong and do nothing useful?  Why not just go ahead and create a symlink


The user didn't ask for a symlink,

User didn't ask for a physical or hardlink (-P) either.  Just asked
for a link, kind unspecified.


and it sounds unwise for ln to be
second-guessing that.

---
 True - should **probably** have given them *SOME* link.  Since
they didn't specify Physical or Symlink...either would be fine.



Sometimes, reporting an error and exiting is a
better thing to do.

---
Unless they claim to want one or the other (-P or -l), unless
it is an "undo-able" operation (like one that deletes data), why would
you guarantee ln doing the wrong thing, rather than having a better than
50% chance of doing the right thing?








bug#29886: tests/rm/rm-readdir-fail is failing with SIGBUS on Gentoo sparc

2018-07-14 Thread Pádraig Brady
On 11/07/18 10:05, Paul Eggert wrote:
> Thomas Deutschmann wrote:
> 
>> Not sure if this is a kernel problem. Isn't test suite using
>> LD_PRELOAD to pull in additional libraries which could cause
>> such a breakage?
> 
> You're right, it could be a library problem. The test suite's LD_PRELOAD 
> library 
> just returns what the C library gives it, though. Perhaps LD_PRELOAD usage is 
> messing up malloc on your platform, so that it returns improperly-aligned 
> pointers? You might try something like the attached patch to see whether the 
> C 
> library is doing that.
> 
>> And wouldn't "rm" show any failure during normal use?
> 
> Yes, one would think so.
> 
> In any case, this is not sounding like a bug in coreutils itself.

This could be due to my hack for 32 bit in:
https://git.sv.gnu.org/cgit/coreutils.git/commit/?id=v8.25-43-g54c1397
which fails due to the alignment requirement on sparc

This is using a 32 bit userland right?

We can skip this test on 32 bit, as there really
is nothing arch specific that we're testing here.

Does this skip the test for you?

diff --git a/tests/rm/rm-readdir-fail.sh b/tests/rm/rm-readdir-fail.sh
index 75fa339..580d8ec 100755
--- a/tests/rm/rm-readdir-fail.sh
+++ b/tests/rm/rm-readdir-fail.sh
@@ -27,9 +27,9 @@ mkdir -p dir/notempty || framework_failure_
 cat > k.c <<\EOF || framework_failure_
 #define _GNU_SOURCE

-/* Setup so we don't have to worry about readdir64.  */
+/* Avoid having to also handle readdir64.  */
 #ifndef __LP64__
-# define _FILE_OFFSET_BITS 64
+# error skipping test on 32 bit
 #endif

 #include