1 /*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * SPDX-License-Identifier: GPL-2.0
4 *
5 * Unless required by applicable law or agreed to in writing, software
6 * distributed under the License is distributed on an "AS IS" BASIS,
7 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 * See the License for the specific language governing permissions and
9 * limitations under the License.
10 */
11
12 #include <cstddef>
13 #include <cstdint>
14 #include "memorycommon.h"
15
16 namespace OHOS {
AnonRefaultSnapshotMinIntervalFuzzer(const uint8_t *data, size_t size)17 bool AnonRefaultSnapshotMinIntervalFuzzer(const uint8_t *data, size_t size)
18 {
19 const char *anonRefaultSnapshotMinInterval = "/dev/memcg/memory.anon_refault_snapshot_min_interval";
20 bool ret = MemoryFuzzTest(data, size, anonRefaultSnapshotMinInterval);
21 return ret;
22 }
23 } // namespace OHOS
24
LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)25 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
26 {
27 OHOS::AnonRefaultSnapshotMinIntervalFuzzer(data, size);
28 return 0;
29 }
30