• 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 
32 #ifndef _FUZZ_POSIX_H
33 #define _FUZZ_POSIX_H
34 
35 
36 #define RET_FALSE (-1)
37 #define RET_OK 0
38 #define RET_TRUE 1
39 
40 #define NUM_0_INDEX 0
41 #define NUM_1_INDEX 1
42 #define NUM_2_INDEX 2
43 #define NUM_3_INDEX 3
44 #define NUM_4_INDEX 4
45 #define NUM_5_INDEX 5
46 
47 #define ELEMENT_LEN 10
48 
49 void ItSuiteFuzz(void);
50 
51 void IsdigitFuzzTest(void);
52 extern void IslowerFuzzTest(void);
53 extern void IsxdigitFuzzTest(void);
54 extern void TolowerFuzzTest(void);
55 extern void ToupperFuzzTest(void);
56 extern void AtoiFuzzTest(void);
57 extern void AtolFuzzTest(void);
58 extern void AtollFuzzTest(void);
59 extern void StrtolFuzzTest(void);
60 extern void StrtoulFuzzTest(void);
61 extern void StrtoullFuzzTest(void);
62 extern void StrchrFuzzTest(void);
63 extern void StrstrFuzzTest(void);
64 extern void NetFuzzTest(void);
65 
66 extern void ItSuiteRegexFuzz(void);
67 extern void ItSuiteStringsFuzz(void);
68 
69 extern int IsalnumFuzz(void);
70 extern int IsasciiFuzz(void);
71 extern int IsprintFuzz(void);
72 extern int IsspaceFuzz(void);
73 extern int IsupperFuzz(void);
74 extern int StdargFuzz(void);
75 extern void ReallocFuzzTest(void);
76 extern int MemcmpFuzzTest(void);
77 extern int MemcpyFuzzTest(void);
78 extern int MemsetFuzzTest(void);
79 extern int StrcmpFuzzTest(void);
80 extern int StrcspnFuzzTest(void);
81 extern int StrdupFuzzTest(void);
82 extern int StrerrorFuzzTest(void);
83 extern int StrlenFuzz(void);
84 extern int StrncmpFuzz(void);
85 extern int StrrchrFuzz(void);
86 extern int StrncasecmpFuzz(void);
87 extern int StrptimeFuzzTest(void);
88 
89 extern void DirnameFuzzTest(void);
90 extern void LogFuzzTest(void);
91 extern void PowFuzzTest(void);
92 extern void RoundFuzzTest(void);
93 extern void SqrtFuzzTest(void);
94 extern void SemTimedWaitFuzzTest(void);
95 extern void ClearerrFuzzTest(void);
96 extern void FeofFuzzTest(void);
97 extern void PerrorFuzzTest(void);
98 extern void AbsFuzzTest(void);
99 extern void GettimeofdayFuzzTest(void);
100 extern void TimesFuzzTest(void);
101 extern void GmtimeFuzzTest(void);
102 extern void LocaltimeFuzzTest(void);
103 extern void LocaltimerFuzzTest(void);
104 extern void MktimeFuzzTest(void);
105 extern void StrftimeFuzzTest(void);
106 extern void TimeFuzzTest(void);
107 extern void UsleepFuzzTest(void);
108 
109 #endif