add failing test case for overly-strict sandbox violation

pull/2551/head
Adam C. Foltzer 7 years ago committed by Jussi Pakkanen
parent 12df9c46f5
commit f21034dfea
  1. 13
      test cases/common/162 subproject dir name collision/a.c
  2. 20
      test cases/common/162 subproject dir name collision/custom_subproject_dir/B/b.c
  3. 4
      test cases/common/162 subproject dir name collision/custom_subproject_dir/B/meson.build
  4. 14
      test cases/common/162 subproject dir name collision/custom_subproject_dir/C/c.c
  5. 2
      test cases/common/162 subproject dir name collision/custom_subproject_dir/C/meson.build
  6. 12
      test cases/common/162 subproject dir name collision/meson.build
  7. 19
      test cases/common/162 subproject dir name collision/other_subdir/custom_subproject_dir/other.c
  8. 1
      test cases/common/162 subproject dir name collision/other_subdir/meson.build

@ -0,0 +1,13 @@
#include<assert.h>
char func_b();
char func_c();
int main(int argc, char **argv) {
if(func_b() != 'b') {
return 1;
}
if(func_c() != 'c') {
return 2;
}
return 0;
}

@ -0,0 +1,20 @@
#include<stdlib.h>
char func_c();
#if defined _WIN32 || defined __CYGWIN__
#define DLL_PUBLIC __declspec(dllexport)
#else
#if defined __GNUC__
#define DLL_PUBLIC __attribute__ ((visibility("default")))
#else
#pragma message ("Compiler does not support symbol visibility.")
#define DLL_PUBLIC
#endif
#endif
char DLL_PUBLIC func_b() {
if(func_c() != 'c') {
exit(3);
}
return 'b';
}

@ -0,0 +1,4 @@
project('B', 'c')
C = subproject('C')
c = C.get_variable('c')
b = shared_library('b', 'b.c', link_with : c)

@ -0,0 +1,14 @@
#if defined _WIN32 || defined __CYGWIN__
#define DLL_PUBLIC __declspec(dllexport)
#else
#if defined __GNUC__
#define DLL_PUBLIC __attribute__ ((visibility("default")))
#else
#pragma message ("Compiler does not support symbol visibility.")
#define DLL_PUBLIC
#endif
#endif
char DLL_PUBLIC func_c() {
return 'c';
}

@ -0,0 +1,12 @@
project('A', 'c', subproject_dir:'custom_subproject_dir')
B = subproject('B')
b = B.get_variable('b')
C = subproject('C')
c = C.get_variable('c')
subdir('other_subdir')
a = executable('a', 'a.c', link_with : [b, c])
test('a test', a)

@ -0,0 +1,19 @@
#include<stdlib.h>
#if defined _WIN32 || defined __CYGWIN__
#define DLL_PUBLIC __declspec(dllexport)
#else
#if defined __GNUC__
#define DLL_PUBLIC __attribute__ ((visibility("default")))
#else
#pragma message ("Compiler does not support symbol visibility.")
#define DLL_PUBLIC
#endif
#endif
char DLL_PUBLIC func_b() {
if('c' != 'c') {
exit(3);
}
return 'b';
}

@ -0,0 +1 @@
other = shared_library('other', 'custom_subproject_dir/other.c')
Loading…
Cancel
Save