Re: [PATCH] tests: dd: replace LD_PRELOAD of fail-ftruncate-fstat.sh by
From:
Collin Funk
Subject:
Re: [PATCH] tests: dd: replace LD_PRELOAD of fail-ftruncate-fstat.sh by strace
Date:
Sat, 22 Aug 2026 12:13:34 -0700
User-agent:
Gnus/5.13 (Gnus v5.13)
Bernhard Voelker <mail@bernhard-voelker.de> writes:
> On 8/21/26 12:07, PƔdraig Brady wrote:
>> On 21/08/2026 07:29, Bernhard Voelker wrote:
>>> On 8/20/26 17:25, PƔdraig Brady wrote:
>>>> * tests/dd/fail-ftruncate-fstat.sh: Replace LD_PRELOAD by strace
>>>> to support static executables.
>>>
>>> Doesn't this decrease coverage considerably on systems or platforms
>>> where strace does not work/exist?
>> A fair point, though gcc + LD_PRELOAD limits portability also,
>> essentially restricting to Linux.
>> Also this test is more a dev focused test than a system focused one.
>> I.e. focused on the behavior of the source, rather than
>> some sytem behavioral test.
>
> alright, fair enough.
Specifically, I added the test upon noticing a bug from viewing the
source code [1]. I don't think you could easily reproduce it without
LD_PRELOAD and/or strace. But I didn't want to fix a bug without adding
a test for it in case it is re-introduced in the future.
>> Also strace is installed by default on OpenSuse,
>> and through the c-development group or developer-workstation-environment on
>> Fedora,
>> or directly by folks trying to minimize skips.
>
> I wasn't thinking about any GNU/Linux based system, but rather other
> OSes we as GNU are supporting.
Yes, I generally agree it would be nice to check those. In this case I
am indifferent, though, since I don't expect any platforms to differ in
behavior here.
Collin
[1]
https://github.com/coreutils/coreutils/commit/b12593d1249b3369a177bc84c93f54239b965e4a