File: btf_dump_test_case_multidim.c

package info (click to toggle)
linux 5.10.13-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,182,916 kB
  • sloc: ansic: 19,488,074; asm: 263,676; sh: 73,873; makefile: 44,685; perl: 34,640; python: 32,386; cpp: 6,070; yacc: 4,755; lex: 2,742; awk: 1,214; ruby: 25; sed: 5
file content (35 lines) | stat: -rw-r--r-- 623 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)

/*
 * BTF-to-C dumper test for multi-dimensional array output.
 *
 * Copyright (c) 2019 Facebook
 */
/* ----- START-EXPECTED-OUTPUT ----- */
typedef int arr_t[2];

typedef int multiarr_t[3][4][5];

typedef int *ptr_arr_t[6];

typedef int *ptr_multiarr_t[7][8][9][10];

typedef int * (*fn_ptr_arr_t[11])();

typedef int * (*fn_ptr_multiarr_t[12][13])();

struct root_struct {
	arr_t _1;
	multiarr_t _2;
	ptr_arr_t _3;
	ptr_multiarr_t _4;
	fn_ptr_arr_t _5;
	fn_ptr_multiarr_t _6;
};

/* ------ END-EXPECTED-OUTPUT ------ */

int f(struct root_struct *s)
{
	return 0;
}