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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200313165202.37d921cf@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Fri, 13 Mar 2020 16:52:02 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Kees Cook <keescook@...omium.org>
Cc:     shuah@...nel.org, luto@...capital.net, wad@...omium.org,
        linux-kselftest@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH 4/5] kselftest: add fixture parameters

On Fri, 13 Mar 2020 16:31:25 -0700 Kees Cook wrote:
> > @@ -326,7 +387,8 @@
> >  	} \
> >  	static void fixture_name##_##test_name( \
> >  		struct __test_metadata __attribute__((unused)) *_metadata, \
> > -		FIXTURE_DATA(fixture_name) __attribute__((unused)) *self)
> > +		FIXTURE_DATA(fixture_name) __attribute__((unused)) *self, \
> > +		const FIXTURE_PARAMS(fixture_name) __attribute__((unused)) *params)  
> 
> Could this be done without expanding the function arguments? (i.e. can
> the params just stay attached to the __test_metadata, perhaps having the
> test runner adjust a new "current_param" variable to point to the
> current param? Having everything attached to the single __test_metadata
> makes a lot of things easier, IMO.

Sure! I felt a little awkward dereferencing _metadata in the test,
so I followed the example of self. But I can change.

Can I add a macro like CURRENT_PARAM() that would implicitly use
_metadata?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ