[Mesa-dev] [PATCH mesa 7/8] eglapi: make sure list is always sorted

Eric Engestrom eric at engestrom.ch
Tue Feb 21 23:22:10 UTC 2017


On Monday, 2017-02-20 19:49:59 +0000, Emil Velikov wrote:
> On 19 February 2017 at 23:23, Eric Engestrom <eric at engestrom.ch> wrote:
> > Starting with the next commit, badly sorting this list will break the
> > eglGetProcAddress().
> >
> > Signed-off-by: Eric Engestrom <eric at engestrom.ch>
> > ---
> >  src/egl/Makefile.am          | 3 ++-
> >  src/egl/egl-entrypoint-check | 4 ++++
> >  2 files changed, 6 insertions(+), 1 deletion(-)
> >  create mode 100755 src/egl/egl-entrypoint-check
> >
> > diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
> > index bd8903f666..6c0548d856 100644
> > --- a/src/egl/Makefile.am
> > +++ b/src/egl/Makefile.am
> > @@ -126,7 +126,8 @@ egl_HEADERS = \
> >         $(top_srcdir)/include/EGL/eglmesaext.h \
> >         $(top_srcdir)/include/EGL/eglplatform.h
> >
> > -TESTS = egl-symbols-check
> > +TESTS = egl-symbols-check \
> > +       egl-entrypoint-check
> >
> >  EXTRA_DIST = \
> >         egl-symbols-check \
> Maybe:
> 
> -         egl-symbols-check \
> +        $(TESTS) \

Coming as a separate patch.

> 
> > diff --git a/src/egl/egl-entrypoint-check b/src/egl/egl-entrypoint-check
> > new file mode 100755
> > index 0000000000..d3757aae3c
> > --- /dev/null
> > +++ b/src/egl/egl-entrypoint-check
> > @@ -0,0 +1,4 @@
> > +#!/bin/bash
> Please add a blank line.
> 
> > +entrypoints=$(grep EGL_ENTRYPOINT "$srcdir"/main/eglentrypoint.def)
> > +sorted=$(sort <<< "$entrypoints")
> > +test "$entrypoints" = "$sorted"
> Cannot spot any bashisms here. checkbashisms also cannot find any.
> s|bash|sh| in the shebang ?

Fixed locally; I'll send a v2 later.

> 
> Thanks to the cleanup Eric !
> Emil


More information about the mesa-dev mailing list