2 * Copyright (c) 2019-2020, Samsung Electronics Co., Ltd. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include "fd_info_wrap.c"
21 struct fd_ops fops = {
22 .destroy = test_destroy,
23 .extract_entry = test_extract,
24 .should_filter = true,
28 assert(NULL == fdi_create(&fops, 27));
29 fdi_free(NULL); // shouldn't explode
32 G_fdi = (struct fd_info) {
34 .priv_data = (void *) 0x16180339,
36 .ops = (struct fd_ops *) 0x31415926,
38 assert(&G_fdi == fdi_create(&fops, 78));
40 struct sort_vector sv;
41 dlogutil_entry_s *flushee = NULL;
44 assert(-ENOMEM == fdi_push_log(&G_fdi, &sv, false, &flushee, (struct log_filter *) 404));
46 use_real_malloc = true;
48 use_real_close = true;