[Mesa-dev] [PATCH mesa 3/5] egl: use new symbols checking script

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


Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
This currently fails on my system (meson), haven't had time to
investigate yet:
  New ABI detected - If intentional, update the test.
  wl_drm_interface
  zwp_linux_buffer_params_v1_interface
  zwp_linux_dmabuf_v1_interface
A priori, these should only be in libwayland-egl, not libEGL, right?
---
 src/egl/Makefile.am                                 |  2 ++
 src/egl/egl-symbols-check                           | 20 ++++++--------------
 .../wayland/wayland-egl/wayland-egl-symbols-check   | 21 ++++++---------------
 3 files changed, 14 insertions(+), 29 deletions(-)

diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
index 086a4a1e63020caa8c05..1cab3ee231e800baafb7 100644
--- a/src/egl/Makefile.am
+++ b/src/egl/Makefile.am
@@ -220,6 +220,8 @@ else
 TESTS += egl-symbols-check
 endif
 
+AM_TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)'
+
 EXTRA_DIST = \
 	$(TESTS) \
 	SConscript \
diff --git a/src/egl/egl-symbols-check b/src/egl/egl-symbols-check
index 460e61a357c7ab6d02c3..a62692e433a1bf70ce85 100755
--- a/src/egl/egl-symbols-check
+++ b/src/egl/egl-symbols-check
@@ -1,15 +1,10 @@
 #!/bin/sh
 set -eu
 
-LIB=${1-.libs/libEGL.so}
+LIB=.libs/libEGL.so
 
-if ! [ -f "$LIB" ]
-then
-  exit 1
-fi
-
-FUNCS=$($NM -D --defined-only $LIB | grep -o "T .*" | cut -c 3- | while read func; do
-( grep -q "^$func$" || echo $func )  <<EOF
+# Official ABI, taken from the header.
+REQ_FUNCS="
 eglBindAPI
 eglBindTexImage
 eglChooseConfig
@@ -56,10 +51,7 @@ eglWaitNative
 eglWaitSync
 MesaGLInteropEGLQueryDeviceInfo
 MesaGLInteropEGLExportObject
-_fini
-_init
-EOF
-done)
+"
 
-test ! -n "$FUNCS" || echo $FUNCS
-test ! -n "$FUNCS"
+# Run the checks
+source "$top_srcdir"/scripts/symbols-check
diff --git a/src/egl/wayland/wayland-egl/wayland-egl-symbols-check b/src/egl/wayland/wayland-egl/wayland-egl-symbols-check
index a5fab775824e78b3bf32..a559642bbe7ea4e4590e 100755
--- a/src/egl/wayland/wayland-egl/wayland-egl-symbols-check
+++ b/src/egl/wayland/wayland-egl/wayland-egl-symbols-check
@@ -1,24 +1,15 @@
 #!/bin/sh
 set -eu
 
-LIB=${1-.libs/libwayland-egl.so}
+LIB=.libs/libwayland-egl.so
 
-if ! [ -f "$LIB" ]
-then
-  exit 1
-fi
-
-FUNCS=$($NM -D --defined-only $LIB | grep -o "T .*" | cut -c 3- | while read func; do
-( grep -q "^$func$" || echo $func )  <<EOF
+# Official ABI, taken from the header.
+REQ_FUNCS="
 wl_egl_window_resize
 wl_egl_window_create
 wl_egl_window_destroy
 wl_egl_window_get_attached_size
-_fini
-_init
-EOF
-done)
-
-test ! -n "$FUNCS" || echo $FUNCS
-test ! -n "$FUNCS"
+"
 
+# Run the checks
+source "$top_srcdir"/scripts/symbols-check
-- 
Cheers,
  Eric



More information about the mesa-dev mailing list