<html><head></head><body> <div dir="auto"><span style="color: var(--text-color); background: var(--bg-color);">On Fri, Mar 8, 2024 at 19:46, Rob Landley <</span><a class="" href="mailto:On Fri, Mar 8, 2024 at 19:46, Rob Landley <<a href=">rob@landley.net</a><span style="color: var(--text-color); background: var(--bg-color);">> wrote:</span><br></div><blockquote type="cite" class="protonmail_quote" dir="auto"> On 3/7/24 19:39, Oliver Webb via Toybox wrote:<br>> Looking at toysh again since the toybox test suite should run under it<br>> (in mkroot or under a chroot) A problem seems to be that there is no<br>> return command, which breaks runtest.sh to it's core. Dont know how to add one in yet<br>><br>> On my version of bash (5.2.26) TEST_HOST fails on 3 test cases,<br>> and toysh also fails on those cases (Even tho toysh is doing the right<br>> thing, the same as bash) The attached patch changes the test file<br>> so that 3 test cases are resolved. And TEST_HOST works<br><br>Because Chet changed stuff I asked him about, making bash a moving target.</blockquote><div dir="auto">This does bring up the question of what to do with specific edge cases. Since bash can’t even be consistent with itself, most bash scripts don’t rely on them, at least the ones I’ve seen.</div><div dir="auto"><br></div><div dir="auto">Should we set out to implement every specific edge case, and if so what version are we confirming with? Or should we pick what’s most sensible/easiest to deal with and toyonly the test cases for them.</div><div dir="auto"><br></div><div dir="auto">In the end both result in 99.9% of bash scripts being able to run, and the remaining 0.1% that can’t not being able to run on even certain versions of bash. And they are both ”correct“, except one is significantly harder to maintain and decide which sub-approach is _truely_ “correct“.</div><div dir="auto"><br></div><div dir="auto"><(keep in mind) that even though you are a shell maintainer</div><div dir="auto">Who’s read through the bash man page and posix spec and whatnot,</div><div dir="auto">Most people ${havent//} and only use a {small..set} of</div><div dir="auto"><span style="color: var(--text-color); background: var(--bg-color);" dir="auto">bashisms, $</span><span style="color: var(--text-color); background: var(--bg-color);" dir="auto">(read -s <<< „of which“) their behavior is fairly [[ predictable ]] </span><span style="color: var(--text-color); background: var(--bg-color);">and $“constant“.</span></div><div dir="auto"><span style="color: var(--text-color); background: var(--bg-color);" dir="auto"><br></span></div><div dir="auto"><span style="color: var(--text-color); background: var(--bg-color);" dir="auto"><span style="; ; ;San Francisco", Helvetica, Arial, sans-serif; ; font-style: normal; ; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; ; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px; ; text-decoration: none; display: inline !important; float: none;" dir="auto">And thats </span></span><span style="color: var(--text-color); background: var(--bg-color);">when they DON‘T just write POSIX/dash compatible scripts.</span></div><blockquote type="cite" class="protonmail_quote" dir="auto">Breaks test_host on Devuan Bronchitis using bash 5.0.3. Lemme get back to this<br>one from Minneapolis. (Please poke me if I forget next week, I am completely fried.)</blockquote>*poke*<div dir="auto"><br></div><div dir="auto">- Oliver Webb <aquahobbist@proton.me></div></body></html>