<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 30, 2022 at 1:54 PM Rob Landley <<a href="mailto:rob@landley.net">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 11/28/22 12:41, enh via Toybox wrote:<br>
> github CI caught a few failures<br>
<br>
Sigh. There's a reason this has been on the todo list for literally years. It's<br>
corner cases all the way down and I don't have a mac test environment. (Works on<br>
linux not on mac means a libc function is returning something different,<br>
possibly because a syscall did, possibly because the VFS did something funky...)<br>
<br>
> (<a href="https://github.com/landley/toybox/actions/runs/3561813808/jobs/5983047254" rel="noreferrer" target="_blank">https://github.com/landley/toybox/actions/runs/3561813808/jobs/5983047254</a>):<br>
> <br>
> PASS: realpath -s<br>
> ............................................................................<br>
> ................................................<br>
> realpath: dos/three: Not a directory<br>
<br>
Not a directory? Up top we did:<br>
<br>
  mkdir -p one/two/three<br>
  ln -s ./one uno<br>
  ln -s one/two dos<br>
<br>
I don't THINK anything's done a cd or filesystem write since then?<br>
(one/two/three is a directory and dos points to "one/two"...)<br>
<br>
> FAIL: realpath -s link/..<br>
> echo -ne '' | "/Users/runner/work/toybox/toybox/generated/testdir/realpath" -es<br>
> dos/three<br>
> --- expected 2022-11-28 04:54:16.000000000 +0000<br>
> +++ actual 2022-11-28 04:54:16.000000000 +0000<br>
> @@ -1 +0,0 @@<br>
> -/Users/runner/work/toybox/toybox/generated/testdir/testdir/dos/three<br>
<br>
Debris from that failure...<br>
<br>
> PASS: realpath -s .. eats symlink<br>
> PASS: realpath -s .. eats symlink in $PWD<br>
<br>
Neither of those actually looks at the filesystem because -s (don't expand<br>
symlinks) so there's potentially a getcwd() prepend then the .. cancellation is<br>
entirely string based...<br>
<br>
> FAIL: realpath -es dangling symlink<br>
> echo -ne '' | "/Users/runner/work/toybox/toybox/generated/testdir/realpath" -es<br>
> dangling 2>/dev/null || echo ok<br>
> --- expected 2022-11-28 04:54:16.000000000 +0000<br>
> +++ actual 2022-11-28 04:54:16.000000000 +0000<br>
> @@ -1 +1 @@<br>
> -ok<br>
> +/Users/runner/work/toybox/toybox/generated/testdir/testdir/dangling<br>
<br>
Adding -e however checks if the result exists. And the failure here is it<br>
SHOULDN'T, but MacOS thinks it DOES. (How do you even...?)<br>
<br>
> PASS: realpath -ms<br>
> realpath: one/two/ichi/two/ichi/two: Not a directory<br>
<br>
Our old friend again...<br>
<br>
> FAIL: realpath -es<br>
> echo -ne '' | "/Users/runner/work/toybox/toybox/generated/testdir/realpath" -es<br>
> one/two/ichi/two/ichi/two<br>
> --- expected 2022-11-28 04:54:16.000000000 +0000<br>
> +++ actual 2022-11-28 04:54:17.000000000 +0000<br>
> @@ -1 +0,0 @@<br>
> -/Users/runner/work/toybox/toybox/generated/testdir/testdir/one/two/ichi/two/ichi/two<br>
<br>
Sigh. If I stick printfs into a commit and push to a branch it'll _sometimes_<br>
run the tests on the new commit based on github server load, correct?<br></blockquote><div><br></div><div>yeah, if it doesn't fire, let me know and i'll run it locally. my latency's poor too, but unlike github i'm not one-shot, and will get to it when things are quiet again :-)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Lemme finish fixing cp -s first (I.E. the rest of my relative path untangling<br>
todo item)...<br></blockquote><div><br></div><div>yeah, no hurry, just explaining in advance why i'm not looking at a post-thanksgiving update yet :-)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Rob<br>
_______________________________________________<br>
Toybox mailing list<br>
<a href="mailto:Toybox@lists.landley.net" target="_blank">Toybox@lists.landley.net</a><br>
<a href="http://lists.landley.net/listinfo.cgi/toybox-landley.net" rel="noreferrer" target="_blank">http://lists.landley.net/listinfo.cgi/toybox-landley.net</a><br>
</blockquote></div></div>