1147997Srwatson// SPDX-License-Identifier: GPL-2.0 2147997Srwatson/* Copyright (c) 2021 Facebook */ 3147997Srwatson#include "vmlinux.h" 4147997Srwatson#include <bpf/bpf_helpers.h> 5147997Srwatson#include <bpf/bpf_tracing.h> 6147997Srwatson 7147997Srwatson#if __has_attribute(btf_type_tag) 8147997Srwatson#define __tag1 __attribute__((btf_type_tag("tag1"))) 9147997Srwatson#define __tag2 __attribute__((btf_type_tag("tag2"))) 10147997Srwatsonvolatile const bool skip_tests = false; 11147997Srwatson#else 12147997Srwatson#define __tag1 13147997Srwatson#define __tag2 14147997Srwatsonvolatile const bool skip_tests = true; 15147997Srwatson#endif 16147997Srwatson 17147997Srwatsonstruct btf_type_tag_test { 18147997Srwatson int __tag1 * __tag1 __tag2 *p; 19147997Srwatson} g; 20147997Srwatson 21147997SrwatsonSEC("fentry/bpf_fentry_test1") 22147997Srwatsonint BPF_PROG(sub, int x) 23147997Srwatson{ 24147997Srwatson return 0; 25147997Srwatson} 26147997Srwatson