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
19static const char* path = "/data/tests/libc-test/src";
20static const char* dllName = "libdlopen_ns_dso.so";
21static const char* dllNamePath = "/data/tests/libc-test/src/libdlopen_ns_dso.so";
22static const char* errdllNamePath = "/etc/test/libdlopen_ns_dso.so";
23static const char* dllName2 = "libdlopen_dso.so";
24static const char* dllNamePath2 = "/data/tests/libc-test/src/libdlopen_dso.so";
25static const char* errPath_ns = "src/test";
26
27static const char* sharedLib = "sharedlibtest.so";
28static const char* pathA = "/data/tests/libc-test/src/A";
29static const char* pathB = "/data/tests/libc-test/src/B";
30static const char* pathC = "/data/tests/libc-test/src/C";
31static const char* pathD = "/data/tests/libc-test/src/D";
32
33static const char* libB = "libB.so";
34static const char* libC = "libC.so";
35static const char* libD = "libD.so";
36
37static const char* dllName_sep_009 = "separated_0900.so";
38static const char* dllName_set_002 = "set_lib_path_0200.so";
39static const char* dllName_inh_003 = "inherit_0300.so";
40static const char* dllName_inh_007 = "inherit_0700.so";
41static const char* dllName_inh_008 = "inherit_0800.so";
42static const char* dllName_inh_011 = "inherit_1100.so";
43
44#if defined(MUSL_ARM)
45static const char* dllAcePath = "/system/lib/platformsdk/libace.z.so";
46static const char* dllDylibPath = "/system/lib/libstd.dylib.so";
47#else
48static const char* dllAcePath = "/system/lib64/platformsdk/libace.z.so";
49static const char* dllDylibPath = "/system/lib64/libstd.dylib.so";
50#endif
51
52static const char* dllHashsysvPath = "/data/tests/libc-test/src/libdlopen_hash_sysv.so";
53static const char* dllHashsysv = "libdlopen_hash_sysv.so";
54static const char* dllFillRandom = "/data/tests/libc-test/src/libdlopen_fill_random.so";
55
56typedef void(*TEST_FUN)(void);
57
58static const int EOK = 0;
59
60static const int test_result_1 = 1;
61static const int test_result_2 = 2;
62static const int test_result_3 = 3;
63static const int test_result_4 = 4;
64#endif