Mercurial > hg > orthanc
comparison UnitTestsSources/PluginsTests.cpp @ 3035:3254b36a5f9b
fix lsb compatibility
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 19 Dec 2018 14:35:55 +0100 |
parents | be5c0f4155f6 |
children | 4e43e67f8ecf |
comparison
equal
deleted
inserted
replaced
3028:ff65c925f57a | 3035:3254b36a5f9b |
---|---|
63 // For Linux Standard Base, we use a low-level shared library coming | 63 // For Linux Standard Base, we use a low-level shared library coming |
64 // with glibc: | 64 // with glibc: |
65 // http://www.linuxfromscratch.org/lfs/view/6.5/chapter06/glibc.html | 65 // http://www.linuxfromscratch.org/lfs/view/6.5/chapter06/glibc.html |
66 SharedLibrary l("libSegFault.so"); | 66 SharedLibrary l("libSegFault.so"); |
67 ASSERT_THROW(l.GetFunction("world"), OrthancException); | 67 ASSERT_THROW(l.GetFunction("world"), OrthancException); |
68 ASSERT_TRUE(l.GetFunction("_init") != NULL); | |
69 ASSERT_TRUE(l.HasFunction("_init")); | |
70 ASSERT_FALSE(l.HasFunction("world")); | 68 ASSERT_FALSE(l.HasFunction("world")); |
71 | 69 |
70 /** | |
71 * On the Docker image "debian:buster-slim", the "libSegFault.so" | |
72 * library does exist, but does not contain any public symbol: | |
73 * | |
74 * $ sudo docker run -i -t --rm --entrypoint=bash debian:buster-slim | |
75 * # apt-get update && apt-get install -y binutils | |
76 * # nm -C /lib/x86_64-linux-gnu/libSegFault.so | |
77 * nm: /lib/x86_64-linux-gnu/libSegFault.so: no symbols | |
78 * | |
79 * As a consequence, this part of the test is disabled since Orthanc | |
80 * 1.5.1, until we locate another shared library that is widely | |
81 * spread. Reference: | |
82 * https://groups.google.com/d/msg/orthanc-users/v-QFzpOzgJY/4Hm5NgxKBwAJ | |
83 **/ | |
84 | |
85 //ASSERT_TRUE(l.GetFunction("_init") != NULL); | |
86 //ASSERT_TRUE(l.HasFunction("_init")); | |
87 | |
72 #elif defined(__linux__) || defined(__FreeBSD_kernel__) | 88 #elif defined(__linux__) || defined(__FreeBSD_kernel__) |
73 SharedLibrary l("libdl.so"); | 89 SharedLibrary l("libdl.so"); |
74 ASSERT_THROW(l.GetFunction("world"), OrthancException); | 90 ASSERT_THROW(l.GetFunction("world"), OrthancException); |
75 ASSERT_TRUE(l.GetFunction("dlopen") != NULL); | 91 ASSERT_TRUE(l.GetFunction("dlopen") != NULL); |
76 ASSERT_TRUE(l.HasFunction("dlclose")); | 92 ASSERT_TRUE(l.HasFunction("dlclose")); |