1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright (c) 2024 Meta Platforms, Inc. and affiliates. */ 3 4 #include <test_progs.h> 5 #include "raw_tp_null.skel.h" 6 7 void test_raw_tp_null(void) 8 { 9 struct raw_tp_null *skel; 10 11 skel = raw_tp_null__open_and_load(); 12 if (!ASSERT_OK_PTR(skel, "raw_tp_null__open_and_load")) 13 return; 14 15 skel->bss->tid = sys_gettid(); 16 17 if (!ASSERT_OK(raw_tp_null__attach(skel), "raw_tp_null__attach")) 18 goto end; 19 20 ASSERT_OK(trigger_module_test_read(2), "trigger testmod read"); 21 ASSERT_EQ(skel->bss->i, 3, "invocations"); 22 23 end: 24 raw_tp_null__destroy(skel); 25 } 26