Re: [PATCH 0/3] fix failing t4301 test and &&-chain breakage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Elijah & Eric,

On Mon, 29 Aug 2022, Elijah Newren wrote:

> On Sat, Aug 27, 2022 at 10:18 PM Eric Sunshine via GitGitGadget
> <gitgitgadget@xxxxxxxxx> wrote:
> >
> > This series fixes a failing test in t4301 due to 'sed' behavioral
> > differences between implementations. It also fixes a couple broken &&-chains
> > and adds missing explicit loop termination.
> >
> > The third patch is entirely subjective and can be dropped if unwanted. I
> > spent more than a few minutes puzzling over the script's use of 'printf
> > "\\n"' rather than the more typical 'printf "\n"' or even a simple 'echo',
> > wondering if there was some subtlety I was missing or whether Elijah had
> > encountered an unusual situation in which '\\n' was needed over '\n'. The
> > third patch chooses to replace 'printf "\\n"' with 'echo' which I find more
> > idiomatic, but I can see value in using 'printf "\n"' as perhaps being
> > clearer that it is adding a newline where one is missing.
>
> I can't actually provide the reasoning for it; I took Dscho's testcase
> from [1] and used it as a basis for adding several other testcases.
> When I was copying & pasting and adjusting, I just didn't notice the
> 'printf "\\n"'.  But using a simple echo makes sense.
>
> [1] https://lore.kernel.org/git/3b4ed8bb1bb615277ee51a7b2af5fc53bae0a6e4.1660892256.git.gitgitgadget@xxxxxxxxx/

No other reason than that I _seem_ to recall having run into some issues
where _some_ POSIX shell (was it BusyBox' ash?) did not like the
single-escape form "\n".

I have no firm recollection, though, and am fine with converting all of
the double backslashes to single backslashes (read: I am very indifferent
to this issue).

Ciao,
Dscho




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux