[igt-dev] Scripting language for igt

Chris Wilson chris at chris-wilson.co.uk
Thu Aug 23 22:21:47 UTC 2018


Quoting Joonas Lahtinen (2018-08-21 12:43:21)
> Quoting Chris Wilson (2018-08-20 13:11:15)
> 
> <SNIP>
> 
> > In both cases it was easy to extend the test beyond the original. Joonas
> > who is more familiar with the later declarative ECMAScript, says he can
> > reduce the boilerplate code even further. (Some of the verbosity is on
> > purpose, since these tests are negative tests and so want to need to dig
> > beneath the usual layers of convenience api, but still the plan should
> > be to autogenerate as much of the ioctl breaking as possible.)
> > 
> > TLDR; I want to rewrite BAT and use a script interpreter for speed of
> > execution, ease of test writing, and for automating test generation. 
> > I would like to drop duktape into igt/shell, but the initial code drop
> > may be too big to post/review... So I would like to present it as fait
> > accompli and then work on the smaller patches to make the magic happen.
> 
> We exchanged some further ideas about this, and my suggestions:
> 
> Use v8, for the sake of having a large user base (and the modern
> language features) and JIT for speed.

So I have my v8-shell handling ioctls now (so roughly the same
proof-of-concept level as duktape), and as was expected it is
much much faster than using a plain interpreter. v8 is a much steeper
learning cliff than duktape, and definitely pushes one toward
implementing everything in js. It is fast enough that it doesn't matter.

https://cgit.freedesktop.org/~ickle/intel-gpu-tools/log/?h=v8-shell

Still very much a work-in-progress.
-Chris


More information about the igt-dev mailing list