[Toybox] Kernighan's awk repo

enh enh at google.com
Wed Jul 20 11:51:19 PDT 2016


On Wed, Jul 20, 2016 at 11:08 AM, Andy Chu <andychup at gmail.com> wrote:
> On Mon, Jul 18, 2016 at 12:17 PM, Rob Landley <rob at landley.net> wrote:
>> Let's see... https://www.cs.princeton.edu/~bwk/btl.mirror/awktest.a is
>> an ar archive, ar x awktest.a gives  a directory full of files,
>> README.TESTS says REGRESS controls the testing process, running that does...
>>
>>   $ sh ./REGRESS
>>   Linux driftwood 4.2.0-38-generic #45~14.04.1-Ubuntu SMP Thu Jun 9
>>    09:27:51 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
>>   echo compiled
>>   oldawk=awk, awk=../a.out
>>   ./REGRESS: 11: ./REGRESS: Compare.t: not found
>>   167 tests
>>
>>   ./REGRESS: 14: ./REGRESS: Compare.p: not found
>>   58 tests
>>
>>   ./REGRESS: 17: ./REGRESS: Compare.T: not found
>>   252 tests
>>
>>   ./REGRESS: 20: ./REGRESS: Compare.tt: not found
>>   21 tests
>>
>> Right, maybe I'll dig into this later but it's not obvious to me how to
>> get it to work.
>
> OK, I published the work I did here: https://github.com/andychu/bwk
>
> The problem was that the tests assumed '.' was in $PATH.  There were a
> few other things I fixed (see README).
>
> I cleaned up the commit history a little bit -- it should be readable.
>
> The README describes how to run it on Ubuntu -- let me know if it works for you.
>
> IMO the interesting thing here is not actually awk, but the LLVM
> sanitizers.

yeah, i'd like to see asan support in toybox's makefile; i'm starting
to get a small pile of bug reports from the folks running asan Android
system images, but it's going to be inconvenient to have to deal with
them on the device rather than just on the host.

>  Here is one bug (there were others):
>
> https://github.com/andychu/bwk/blob/master/test-results/asan.log
>
> As mentioned, I think if you were building a minimal Unix system like
> Aboriginal, this code would probably suffice as is.  (Although I
> actually have no idea how close this is to POSIX awk.  As mentioned
> Android NDK does use a 2007 copy of this code rather than system awk.

but that's not really exposed to the users --- it basically has to run
one awk script :-)

> That could be good or bad.)
>
> I will reply to the rest of this message later, possibly starting some
> new threads... I think some info has gotten lost in these threads.
>
> Andy
> _______________________________________________
> Toybox mailing list
> Toybox at lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net



-- 
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Android native code/tools questions? Mail me/drop by/add me as a reviewer.



More information about the Toybox mailing list