aboutsummaryrefslogtreecommitdiffstats
path: root/radeon
diff options
context:
space:
mode:
authorEmil Velikov2015-04-05 09:51:28 -0500
committerEmil Velikov2015-04-28 05:18:43 -0500
commit552de225bf2740ba0cb52312c21353d71d934b8c (patch)
treeb1cd7f7f8965a983fdba4c9402bc304ba23428a5 /radeon
parentab84a95e85eb88a4f6020100526ddfbd667d00a2 (diff)
downloadexternal-libdrm-552de225bf2740ba0cb52312c21353d71d934b8c.tar.gz
external-libdrm-552de225bf2740ba0cb52312c21353d71d934b8c.tar.xz
external-libdrm-552de225bf2740ba0cb52312c21353d71d934b8c.zip
radeon: add symbols test
Will allow us to catch when the library exports more symbols than the ones in the public headers. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'radeon')
-rw-r--r--radeon/Makefile.am2
-rwxr-xr-xradeon/radeon-symbol-check61
2 files changed, 62 insertions, 1 deletions
diff --git a/radeon/Makefile.am b/radeon/Makefile.am
index 1e4c8691..d9d0b7ec 100644
--- a/radeon/Makefile.am
+++ b/radeon/Makefile.am
@@ -44,4 +44,4 @@ libdrm_radeoninclude_HEADERS = $(LIBDRM_RADEON_H_FILES)
44pkgconfigdir = @pkgconfigdir@ 44pkgconfigdir = @pkgconfigdir@
45pkgconfig_DATA = libdrm_radeon.pc 45pkgconfig_DATA = libdrm_radeon.pc
46 46
47EXTRA_DIST = Android.mk $(LIBDRM_RADEON_BOF_FILES) 47EXTRA_DIST = Android.mk $(LIBDRM_RADEON_BOF_FILES) $(TESTS)
diff --git a/radeon/radeon-symbol-check b/radeon/radeon-symbol-check
new file mode 100755
index 00000000..0bf2ffcb
--- /dev/null
+++ b/radeon/radeon-symbol-check
@@ -0,0 +1,61 @@
1#!/bin/bash
2
3# The following symbols (past the first five) are taken from the public headers.
4# A list of the latter should be available Makefile.sources/LIBDRM_RADEON_H_FILES
5
6FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_radeon.so} | awk '{print $3}'| while read func; do
7( grep -q "^$func$" || echo $func ) <<EOF
8__bss_start
9_edata
10_end
11_fini
12_init
13radeon_bo_debug
14radeon_bo_get_handle
15radeon_bo_get_src_domain
16radeon_bo_get_tiling
17radeon_bo_is_busy
18radeon_bo_is_referenced_by_cs
19radeon_bo_is_static
20radeon_bo_manager_gem_ctor
21radeon_bo_manager_gem_dtor
22radeon_bo_map
23radeon_bo_open
24radeon_bo_ref
25radeon_bo_set_tiling
26radeon_bo_unmap
27radeon_bo_unref
28radeon_bo_wait
29radeon_cs_begin
30radeon_cs_create
31radeon_cs_destroy
32radeon_cs_emit
33radeon_cs_end
34radeon_cs_erase
35radeon_cs_get_id
36radeon_cs_manager_gem_ctor
37radeon_cs_manager_gem_dtor
38radeon_cs_need_flush
39radeon_cs_print
40radeon_cs_set_limit
41radeon_cs_space_add_persistent_bo
42radeon_cs_space_check
43radeon_cs_space_check_with_bo
44radeon_cs_space_reset_bos
45radeon_cs_space_set_flush
46radeon_cs_write_reloc
47radeon_gem_bo_open_prime
48radeon_gem_get_kernel_name
49radeon_gem_get_reloc_in_cs
50radeon_gem_name_bo
51radeon_gem_prime_share_bo
52radeon_gem_set_domain
53radeon_surface_best
54radeon_surface_init
55radeon_surface_manager_free
56radeon_surface_manager_new
57EOF
58done)
59
60test ! -n "$FUNCS" || echo $FUNCS
61test ! -n "$FUNCS"