(self)
| 2917 | @needs_dylink |
| 2918 | @no_js_math('JS_MATH is not compatible with MAIN_MODULE=1') |
| 2919 | def test_dlfcn_missing(self): |
| 2920 | self.set_setting('MAIN_MODULE') |
| 2921 | self.set_setting('ASSERTIONS') |
| 2922 | src = r''' |
| 2923 | #include <dlfcn.h> |
| 2924 | #include <stdio.h> |
| 2925 | #include <assert.h> |
| 2926 | |
| 2927 | int main() { |
| 2928 | void* lib_handle = dlopen("libfoo.so", RTLD_NOW); |
| 2929 | assert(!lib_handle); |
| 2930 | printf("error: %s\n", dlerror()); |
| 2931 | return 0; |
| 2932 | } |
| 2933 | ''' |
| 2934 | |
| 2935 | if self.get_current_js_engine() == config.V8_ENGINE: |
| 2936 | expected = "error: could not load dynamic lib: libfoo.so\nError: Error reading file" |
| 2937 | else: |
| 2938 | expected = "error: could not load dynamic lib: libfoo.so\nError: ENOENT: no such file or directory" |
| 2939 | self.do_run(src, expected) |
| 2940 | |
| 2941 | @needs_dylink |
| 2942 | @parameterized({ |
nothing calls this directly
no test coverage detected