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

Emil Velikov emil.l.velikov at gmail.com
Mon Feb 20 19:49:59 UTC 2017


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) \

> 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 ?

Thanks to the cleanup Eric !
Emil


More information about the mesa-dev mailing list