All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] icmp_rate_limit01: Require CONFIG_VETH
@ 2021-06-15  7:51 Richard Palethorpe
  2021-06-15  8:06 ` Petr Vorel
  2021-06-15 11:32 ` Martin Doucha
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Palethorpe @ 2021-06-15  7:51 UTC (permalink / raw)
  To: ltp

The test fails with TBROK if it can not create a virtual ethernet
pair. So add it to the kconfigs.

Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---

Just thinking about the config meta data and embedded users. Functions
like tst_create_veth_pair could check needs_kconfigs for the required
config and TBROK if it is not there.

Alternatively (or in addition to) static analyses can be used to check
(or add) missing config.

In either case this may be wrong when a function is only used in a
branch. OTOH then the test needs splitting otherwise the metadata
can't be known ahead of execution.

 testcases/cve/icmp_rate_limit01.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testcases/cve/icmp_rate_limit01.c b/testcases/cve/icmp_rate_limit01.c
index 0c2ac44df..f24ea5bf9 100644
--- a/testcases/cve/icmp_rate_limit01.c
+++ b/testcases/cve/icmp_rate_limit01.c
@@ -260,6 +260,7 @@ static struct tst_test test = {
 	.setup = setup,
 	.cleanup = cleanup,
 	.needs_kconfigs = (const char *[]) {
+		"CONFIG_VETH",
 		"CONFIG_USER_NS=y",
 		"CONFIG_NET_NS=y",
 		NULL
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [LTP] [PATCH] icmp_rate_limit01: Require CONFIG_VETH
  2021-06-15  7:51 [LTP] [PATCH] icmp_rate_limit01: Require CONFIG_VETH Richard Palethorpe
@ 2021-06-15  8:06 ` Petr Vorel
  2021-06-15 11:32 ` Martin Doucha
  1 sibling, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2021-06-15  8:06 UTC (permalink / raw)
  To: ltp

Hi Richie,

> The test fails with TBROK if it can not create a virtual ethernet
> pair. So add it to the kconfigs.

Thanks, merged!

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [LTP] [PATCH] icmp_rate_limit01: Require CONFIG_VETH
  2021-06-15  7:51 [LTP] [PATCH] icmp_rate_limit01: Require CONFIG_VETH Richard Palethorpe
  2021-06-15  8:06 ` Petr Vorel
@ 2021-06-15 11:32 ` Martin Doucha
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Doucha @ 2021-06-15 11:32 UTC (permalink / raw)
  To: ltp

Hi,
looks good.

Reviewed-by: Martin Doucha <mdoucha@suse.cz>

On 15. 06. 21 9:51, Richard Palethorpe wrote:
> The test fails with TBROK if it can not create a virtual ethernet
> pair. So add it to the kconfigs.
> 
> Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
> ---
> 
> Just thinking about the config meta data and embedded users. Functions
> like tst_create_veth_pair could check needs_kconfigs for the required
> config and TBROK if it is not there.
> 
> Alternatively (or in addition to) static analyses can be used to check
> (or add) missing config.
> 
> In either case this may be wrong when a function is only used in a
> branch. OTOH then the test needs splitting otherwise the metadata
> can't be known ahead of execution.

I'll mention the need to check CONFIG_VETH in the docs.

-- 
Martin Doucha   mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-15 11:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15  7:51 [LTP] [PATCH] icmp_rate_limit01: Require CONFIG_VETH Richard Palethorpe
2021-06-15  8:06 ` Petr Vorel
2021-06-15 11:32 ` Martin Doucha

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.