Skip to contentSkip to conversation

icmp_rate_limit01: Require CONFIG_VETH

PATCH New Richard Palethorpe 3 participants 3 messages Jun 15, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 icmp_rate_limit01: Require CONFIG_VETH

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

---

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(+)
testcases/cve/icmp_rate_limit01.c +1 -0
index 0c2ac44df..f24ea5bf9 100644
@@ -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
Signature · 1 line
2.31.1
#1 lore raw

PATCH 1/1 icmp_rate_limit01: Require CONFIG_VETH

Hi Richie,

Quoted 2 lines

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

#2 lore raw

PATCH 1/1 icmp_rate_limit01: Require CONFIG_VETH

In reply to Richard Palethorpe

Hi,
looks good.

Quoted 10 lines · Richard Palethorpe

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

---

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.

Quoted 6 lines

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.

Signature · 7 lines
Martin Doucha   [email protected]
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic