[PATCH wayland v3 1/3] wayland-egl: fail the symbol check if lib is missing
Pekka Paalanen
ppaalanen at gmail.com
Mon Mar 19 09:56:30 UTC 2018
On Fri, 16 Mar 2018 16:18:57 +0000
Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 16 March 2018 at 13:52, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> > On Thu, 15 Mar 2018 14:30:27 +0000
> > Emil Velikov <emil.l.velikov at gmail.com> wrote:
> >
> >> From: Emil Velikov <emil.velikov at collabora.com>
> >>
> >> Based on a similar patch (in Mesa) by Eric Engestrom.
> >>
> >> v2: Rebase on top of $NM patch
> >> v3: Rebase
> >>
> >> Reviewed-by: Eric Engestrom <eric at engestrom.ch> (v1)
> >> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> >> ---
> >> egl/wayland-egl-symbols-check | 10 +++++++++-
> >> 1 file changed, 9 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/egl/wayland-egl-symbols-check b/egl/wayland-egl-symbols-check
> >> index 6ad28f3..8b3d711 100755
> >> --- a/egl/wayland-egl-symbols-check
> >> +++ b/egl/wayland-egl-symbols-check
> >> @@ -1,6 +1,14 @@
> >> #!/bin/sh
> >> +set -eu
> >>
> >> -FUNCS=$($NM -D --defined-only ${WAYLAND_EGL_LIB} | grep -o "T .*" | cut -c 3- | while read func; do
> >> +LIB=${WAYLAND_EGL_LIB}
> >> +
> >> +if [ ! -f "$LIB" ]; then
> >> + echo "The test binary \"$LIB\" does no exist"
> >> + 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
> >> wl_egl_window_resize
> >> wl_egl_window_create
> >
> > Hi Emil,
> >
> > this patch makes distcheck fail with:
> >
> > The test binary "./egl/.libs/libwayland-egl.so" does no exist
> > FAIL egl/wayland-egl-symbols-check (exit status: 1)
> >
> Right - I was aiming to remove the bonkers envvar and forgot about
> this preexisting bug.
> Patch (to be applied before the series) coming in a second.
Hi Emil,
because this set of four patches no longer regresses, and I think they
very much need to be in the release, I have pushed them:
f34af17..5f5945b master -> master
However, I did a quick test: I renamed wl_egl_window_resize() into
wl_egl_window_resize_uu() to try and trigger several kinds of errors:
symbol not present, extra symbol. The test suite still passes with
success.
In egl/wayland-egl-symbols-check.log I have:
./egl/wayland-egl-symbols-check: line 11: NM: unbound variable
ABI break detected - Required symbol(s) no longer exported!
wl_egl_window_resize
wl_egl_window_create
wl_egl_window_destroy
wl_egl_window_get_attached_size
PASS egl/wayland-egl-symbols-check (exit status: 0)
So it seems 'set -u' is not quite effective, and when ABI breaks are
detected, they don't make the test failed.
Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180319/1b695be7/attachment.sig>
More information about the wayland-devel
mailing list