lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ea07cb5a-da1e-4ba9-b895-1a12be224962@huawei.com>
Date: Tue, 2 Jul 2024 19:57:21 +0800
From: Pu Lehui <pulehui@...wei.com>
To: Jiri Olsa <olsajiri@...il.com>, Pu Lehui <pulehui@...weicloud.com>
CC: <bpf@...r.kernel.org>, <linux-riscv@...ts.infradead.org>,
	<netdev@...r.kernel.org>, Björn Töpel
	<bjorn@...nel.org>, Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann
	<daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau
	<martin.lau@...ux.dev>, Eduard Zingerman <eddyz87@...il.com>, Song Liu
	<song@...nel.org>, Yonghong Song <yonghong.song@...ux.dev>, John Fastabend
	<john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>, Stanislav Fomichev
	<sdf@...gle.com>, Hao Luo <haoluo@...gle.com>, Puranjay Mohan
	<puranjay@...nel.org>, Palmer Dabbelt <palmer@...belt.com>
Subject: Re: [PATCH bpf-next v5 2/3] selftests/bpf: Factor out many args tests
 from tracing_struct



On 2024/7/2 19:06, Jiri Olsa wrote:
> On Tue, Jul 02, 2024 at 01:37:29AM +0000, Pu Lehui wrote:
> 
> SNIP
> 
>> +
>> +static void test_struct_many_args(void)
>> +{
>> +	struct tracing_struct_many_args *skel;
>> +	int err;
>> +
>> +	skel = tracing_struct_many_args__open_and_load();
>> +	if (!ASSERT_OK_PTR(skel, "tracing_struct_many_args__open_and_load"))
>> +		return;
>> +
>> +	err = tracing_struct_many_args__attach(skel);
>> +	if (!ASSERT_OK(err, "tracing_struct_many_args__attach"))
>> +		goto destroy_skel;
>> +
>> +	ASSERT_OK(trigger_module_test_read(256), "trigger_read");
>> +
>>   	ASSERT_EQ(skel->bss->t7_a, 16, "t7:a");
>>   	ASSERT_EQ(skel->bss->t7_b, 17, "t7:b");
>>   	ASSERT_EQ(skel->bss->t7_c, 18, "t7:c");
>> @@ -74,12 +95,15 @@ static void test_fentry(void)
>>   	ASSERT_EQ(skel->bss->t8_g, 23, "t8:g");
>>   	ASSERT_EQ(skel->bss->t8_ret, 156, "t8 ret");
>>   
>> -	tracing_struct__detach(skel);
>> +	tracing_struct_many_args__detach(skel);
> 
> nit, I know it's in the current code, but tracing_struct_many_args__destroy
> will take care of the detach, so no need to call it explicitly

Alright, will resend a new version. Thanks

> 
> jirka
> 
> 
>>   destroy_skel:
>> -	tracing_struct__destroy(skel);
>> +	tracing_struct_many_args__destroy(skel);
>>   }
>>   
> 
> SNIP

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ