• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
3  * Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without modification,
6  * are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice, this list of
9  * conditions and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice, this list
12  * of conditions and the following disclaimer in the documentation and/or other materials
13  * provided with the distribution.
14  *
15  * 3. Neither the name of the copyright holder nor the names of its contributors may be used
16  * to endorse or promote products derived from this software without specific prior written
17  * permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
23  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
26  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  */
31 #include <climits>
32 #include <gtest/gtest.h>
33 
34 #include "it_test_vm.h"
35 
36 using namespace testing::ext;
37 namespace OHOS {
38 class MemVmTest : public testing::Test {
39 public:
SetUpTestCase(void)40     static void SetUpTestCase(void) {}
TearDownTestCase(void)41     static void TearDownTestCase(void) {}
42 };
43 
44 #if defined(LOSCFG_USER_TEST_SMOKE)
45 /* *
46  * @tc.name: it_test_mmap_001
47  * @tc.desc: function for MemVmTest
48  * @tc.type: FUNC
49  * @tc.require: AR000EEMQ9
50  */
51 HWTEST_F(MemVmTest, ItTestMmap001, TestSize.Level0)
52 {
53     ItTestMmap001();
54 }
55 #if 0 // need tmpfs
56 /* *
57  * @tc.name: it_test_mmap_002
58  * @tc.desc: function for MemVmTest
59  * @tc.type: FUNC
60  * @tc.require: AR000EEMQ9
61  */
62 HWTEST_F(MemVmTest, ItTestMmap002, TestSize.Level0)
63 {
64     ItTestMmap002();
65 }
66 
67 /* *
68  * @tc.name: it_test_mmap_003
69  * @tc.desc: function for MemVmTest
70  * @tc.type: FUNC
71  * @tc.require: AR000EEMQ9
72  */
73 HWTEST_F(MemVmTest, ItTestMmap003, TestSize.Level0)
74 {
75     ItTestMmap003();
76 }
77 
78 /* *
79  * @tc.name: it_test_mmap_004
80  * @tc.desc: function for MemVmTest
81  * @tc.type: FUNC
82  * @tc.require: AR000EEMQ9
83  */
84 HWTEST_F(MemVmTest, ItTestMmap004, TestSize.Level0)
85 {
86     ItTestMmap004();
87 }
88 #endif
89 
90 /* *
91  * @tc.name: it_test_mmap_005
92  * @tc.desc: function for MemVmTest
93  * @tc.type: FUNC
94  * @tc.require: AR000EEMQ9
95  */
96 HWTEST_F(MemVmTest, ItTestMmap005, TestSize.Level0)
97 {
98     ItTestMmap005();
99 }
100 
101 /* *
102  * @tc.name: it_test_mmap_006
103  * @tc.desc: function for MemVmTest
104  * @tc.type: FUNC
105  * @tc.require: AR000EEMQ9
106  */
107 HWTEST_F(MemVmTest, ItTestMmap006, TestSize.Level0)
108 {
109     ItTestMmap006();
110 }
111 
112 /* *
113  * @tc.name: it_test_mmap_007
114  * @tc.desc: function for MemVmTest
115  * @tc.type: FUNC
116  * @tc.require: AR000EEMQ9
117  */
118 HWTEST_F(MemVmTest, ItTestMmap007, TestSize.Level0)
119 {
120     ItTestMmap007();
121 }
122 
123 /* *
124  * @tc.name: it_test_mmap_008
125  * @tc.desc: function for MemVmTest
126  * @tc.type: FUNC
127  * @tc.require: AR000EEMQ9
128  */
129 HWTEST_F(MemVmTest, ItTestMmap008, TestSize.Level0)
130 {
131     ItTestMmap008();
132 }
133 
134 /* *
135  * @tc.name: it_test_mmap_009
136  * @tc.desc: function for MemVmTest
137  * @tc.type: FUNC
138  * @tc.require: AR000EEMQ9
139  */
140 HWTEST_F(MemVmTest, ItTestMmap009, TestSize.Level0)
141 {
142     ItTestMmap009();
143 }
144 
145 /* *
146  * @tc.name: it_test_mmap_010
147  * @tc.desc: function for MemVmTest
148  * @tc.type: FUNC
149  * @tc.require: DTS202101220LSHEDP1100
150  */
151 HWTEST_F(MemVmTest, ItTestMmap010, TestSize.Level0)
152 {
153     ItTestMmap010();
154 }
155 
156 /* *
157  * @tc.name: it_test_mprotect_001
158  * @tc.desc: function for MemVmTest
159  * @tc.type: FUNC
160  * @tc.require: AR000EEMQ9
161  */
162 HWTEST_F(MemVmTest, ItTestMprotect001, TestSize.Level0)
163 {
164     ItTestMprotect001();
165 }
166 
167 #ifndef LOSCFG_USER_TEST_SMP
168 /* *
169  * @tc.name: it_test_oom_001
170  * @tc.desc: function for MemVmTest
171  * @tc.type: FUNC
172  * @tc.require: AR000EEMQ9
173  */
174 HWTEST_F(MemVmTest, ItTestOom001, TestSize.Level0)
175 {
176     ItTestOom001();
177 }
178 
179 #endif
180 /* *
181  * @tc.name: it_test_mremap_001
182  * @tc.desc: function for MemVmTest
183  * @tc.type: FUNC
184  * @tc.require: AR000EEMQ9
185  */
186 HWTEST_F(MemVmTest, ItTestMremap001, TestSize.Level0)
187 {
188     ItTestMremap001();
189 }
190 
191 /* *
192  * @tc.name: it_test_user_copy_001
193  * @tc.desc: function for MemVmTest
194  * @tc.type: FUNC
195  * @tc.require: AR000EEMQ9
196  */
197 HWTEST_F(MemVmTest, ItTestUserCopy001, TestSize.Level0)
198 {
199     ItTestUserCopy001();
200 }
201 
202 /* *
203  * @tc.name: open_wmemstream_test_001
204  * @tc.desc: function for open_wmemstream
205  * @tc.type: FUNC
206  * @tc.require: AR000EEMQ9
207  */
208 HWTEST_F(MemVmTest, open_wmemstream_test_001, TestSize.Level0)
209 {
210     open_wmemstream_test_001();
211 }
212 #endif
213 } // namespace OHOS
214