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 #include <sys/stat.h>
17 #include <poll.h>
18 #include <time.h>
19 #include <fcntl.h>
20 #include "functionalext.h"
21
22 extern int __ppoll_time64(struct pollfd *, nfds_t, const struct timespec *, const sigset_t *);
23
24 /**
25 * @tc.name : ppoll_time64_0300
26 * @tc.desc : Listen for readable file event (illegal parameter)
27 * @tc.level : Level 2
28 */
ppoll_time64_0300(void)29 void ppoll_time64_0300(void)
30 {
31 struct timespec timeout;
32 timeout.tv_sec = 1;
33 timeout.tv_nsec = 0;
34
35 int ret = __ppoll_time64(NULL, 1, &timeout, NULL);
36 EXPECT_EQ("ppoll_time64_0300", ret, ERREXPECT);
37 }
38
main(void)39 int main(void)
40 {
41 ppoll_time64_0300();
42 return t_status;
43 }