• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright (c) 2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *   http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef LIBC_TEST_SRC_FUNCTIONALEXT_DLNS_DLNS_TEST_H
17 #define LIBC_TEST_SRC_FUNCTIONALEXT_DLNS_DLNS_TEST_H
18 
19 static const char* path = "/data/tests/libc-test/src";
20 static const char* dllName = "libdlopen_ns_dso.so";
21 static const char* dllNamePath = "/data/tests/libc-test/src/libdlopen_ns_dso.so";
22 static const char* errdllNamePath = "/etc/test/libdlopen_ns_dso.so";
23 static const char* dllName2 = "libdlopen_dso.so";
24 static const char* dllNamePath2 = "/data/tests/libc-test/src/libdlopen_dso.so";
25 static const char* errPath_ns = "src/test";
26 
27 static const char* sharedLib = "sharedlibtest.so";
28 static const char* pathA = "/data/tests/libc-test/src/A";
29 static const char* pathB = "/data/tests/libc-test/src/B";
30 static const char* pathC = "/data/tests/libc-test/src/C";
31 static const char* pathD = "/data/tests/libc-test/src/D";
32 
33 static const char* libB = "libB.so";
34 static const char* libC = "libC.so";
35 static const char* libD = "libD.so";
36 
37 static const char* dllName_sep_009 = "separated_0900.so";
38 static const char* dllName_set_002 = "set_lib_path_0200.so";
39 static const char* dllName_inh_003 = "inherit_0300.so";
40 static const char* dllName_inh_007 = "inherit_0700.so";
41 static const char* dllName_inh_008 = "inherit_0800.so";
42 static const char* dllName_inh_011 = "inherit_1100.so";
43 
44 #if defined(MUSL_ARM)
45 static const char* dllAcePath = "/system/lib/platformsdk/libace.z.so";
46 static const char* dllDylibPath = "/system/lib/libstd.dylib.so";
47 #else
48 static const char* dllAcePath = "/system/lib64/platformsdk/libace.z.so";
49 static const char* dllDylibPath = "/system/lib64/libstd.dylib.so";
50 #endif
51 
52 static const char* dllHashsysvPath = "/data/tests/libc-test/src/libdlopen_hash_sysv.so";
53 static const char* dllHashsysv = "libdlopen_hash_sysv.so";
54 static const char* dllFillRandom = "/data/tests/libc-test/src/libdlopen_fill_random.so";
55 
56 typedef void(*TEST_FUN)(void);
57 
58 static const int EOK = 0;
59 
60 static const int test_result_1 = 1;
61 static const int test_result_2 = 2;
62 static const int test_result_3 = 3;
63 static const int test_result_4 = 4;
64 #endif