[Mesa-dev] [PATCH mesa 5/5] egl: add symbol checking script for the glvnd case

Eric Engestrom eric.engestrom at imgtec.com
Wed Mar 28 17:07:50 UTC 2018


Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
Am I reading it right [1], that no other symbol should be exposed?
If so, we're not doing that and should fix it (before landing this patch).

[1] https://github.com/NVIDIA/libglvnd/blob/f6d236e8dc8efbdf117fb3016d7815c96917a3e4/include/glvnd/libeglabi.h#L425
---
 src/egl/Makefile.am             |  2 +-
 src/egl/egl-glvnd-symbols-check | 12 ++++++++++++
 src/egl/meson.build             |  6 +++++-
 3 files changed, 18 insertions(+), 2 deletions(-)
 create mode 100755 src/egl/egl-glvnd-symbols-check

diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
index 1cab3ee231e800baafb7..46580e09d511dbf65f96 100644
--- a/src/egl/Makefile.am
+++ b/src/egl/Makefile.am
@@ -215,7 +215,7 @@ egl_HEADERS = \
 TESTS = egl-entrypoint-check
 
 if USE_LIBGLVND
-#TODO: glvnd symbol check
+TESTS += egl-glvnd-symbols-check
 else
 TESTS += egl-symbols-check
 endif
diff --git a/src/egl/egl-glvnd-symbols-check b/src/egl/egl-glvnd-symbols-check
new file mode 100755
index 00000000000000000000..021cc5107d637f9bd1dc
--- /dev/null
+++ b/src/egl/egl-glvnd-symbols-check
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -eu
+
+LIB=.libs/libEGL_mesa.so
+
+# Official ABI, taken from the header.
+REQ_FUNCS="
+__egl_Main
+"
+
+# Run the checks
+source "$top_srcdir"/scripts/symbols-check
diff --git a/src/egl/meson.build b/src/egl/meson.build
index 6537e4bdee61a49e5ae8..f55d1d9a12332adf5a36 100644
--- a/src/egl/meson.build
+++ b/src/egl/meson.build
@@ -203,7 +203,11 @@ endif
 
 if with_tests
   if with_glvnd
-    # TODO: add glvnd symbol check
+    test('egl-glvnd-symbols-check',
+      find_program('egl-glvnd-symbols-check'),
+      env : env_test,
+      args : libegl
+    )
   else
     test('egl-symbols-check',
       find_program('egl-symbols-check'),
-- 
Cheers,
  Eric



More information about the mesa-dev mailing list