gavinhoward/bc

another mksh/bash difference?

Closed this issue · 7 comments

trying to update AOSP to 6.2.4 (https://android-review.googlesource.com/c/platform/external/bc/+/2433072) i hit:

tests/: 413 files pushed, 0 skipped. 6.5 MB/s (1197549 bytes in 0.175s)
scripts/functions.sh: 1 file pushed, 0 skipped. 60.6 MB/s (14190 bytes in 0.000s)
***********************************************************************

Running bc tests...

Running bc decimal...pass
Skipping bc print test
Skipping bc parse test
Skipping bc lib2
Running bc print2...pass
Running bc length...pass
Running bc scale...pass
Skipping bc shift
Running bc add...pass
Running bc subtract...pass
Running bc multiply...pass
Running bc divide...pass
Running bc modulus...pass
Running bc power...pass
Running bc sqrt...pass
Skipping bc trunc
Skipping bc places
Running bc vars...pass
Running bc boolean...pass
Running bc comp...pass
Running bc abs...pass
Running bc assignments...pass
Running bc functions...pass
Skipping bc scientific
Skipping bc engineering
Running bc globals...pass
Running bc strings...pass
Skipping bc strings2 test
Running bc letters...pass
Running bc exponent...pass
Running bc log...pass
Running bc pi...pass
Running bc arctangent...pass
Running bc sine...pass
Running bc cosine...pass
Skipping bc bessel test
Running bc arrays...pass
Running bc misc...pass
Running bc misc1...pass
Running bc misc2...pass
Running bc misc3...pass
Running bc misc4...pass
Running bc misc5...pass
Running bc misc6...pass
Running bc misc7...pass
Running bc misc8...pass
Running bc void...pass
Skipping bc rand
Running bc recursive_arrays...pass
Running bc divmod...pass
Running bc modexp...pass
Skipping bc bitfuncs
Skipping bc leadingzero
Running bc is_number...pass
Running bc is_string...pass
Running bc asciify_array...pass
Running bc line_by_line1...pass
Running bc line_by_line2...pass
Running bc line_loop_quit1...pass
Running bc line_loop_quit2...pass
Running bc stdin tests...pass
/data/local/tmp/bc-tests/tests/scripts.sh[66]: check_d_arg: inaccessible or not found

Exit Code: 127

looking at scripts.sh, it doesn't source functions.sh where the preceding scripts do. i'm not sure why that works with bash? i didn't think bash exported functions by default, but maybe it's doing so?

anyway, i tested the obvious fix (https://android-review.googlesource.com/c/platform/external/bc/+/2433072/2/tests/scripts.sh).

Whoops. That's a bug.

I tried clicking your links, but they complained that I wasn't signed in our didn't have permission.

I presume your obvious fix was to source functions.sh? I'll do that in my repo when I get home. Do you want a tagged release?

I tried clicking your links, but they complained that I wasn't signed in our didn't have permission.

gah, don't get me started ... the powers that be inflicted a stupid url rewriter on us recently that mean we can't give working urls to anyone. i'd tried to manually fix these, but didn't test them. fixed now (retconned above).

I presume your obvious fix was to source functions.sh?

exactly.

I'll do that in my repo when I get home. Do you want a tagged release?

yes please... our tooling isn't yet clever enough to get us back on to the next tagged release if we switch to a sha, so until we implement that, it's quite a bit more convenient if there's another tag. (especially if i happen to go under a bus :-) )

Fixed in 714782c, which should also preemptively fix any other occurrences of this same bug.

I'm running a basic release process to ensure that the release still builds and tests, but I should have a tag out tomorrow morning (US time).

I'm running a basic release process to ensure that the release still builds and tests, but I should have a tag out tomorrow morning (US time).

thanks! no hurry...

It's out! Because I haven't been able to get an Android environment going yet, I'm still not sure this will work for you. If it does, though, please close this issue. Otherwise, I'll try something else.

merged! thanks for your help :-)