Skip to contentSkip to conversation

selftests/bpf/test_tag takes ~30 minutes?

DISCUSSION Michael Ellerman 2 participants 3 messages Apr 30, 2019 – May 7, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi Daniel,

I'm running selftests/bpf/test_tag and it's taking roughly half an hour to complete, is that expected?

I don't really grok what the test is doing TBH, but it does appear to be doing it 5 times :)

	for (i = 0; i < 5; i++) {
		do_test(&tests, 2, -1,     bpf_gen_imm_prog);
		do_test(&tests, 3, fd_map, bpf_gen_map_prog);
	}

Could we make it just do one iteration by default? That would hopefully reduce the runtime by quite a bit. It could take a parameter to run the longer version perhaps?

cheers

maintainer
#1 lore raw
Quoted 8 lines · Michael Ellerman

Hi Daniel,

I'm running selftests/bpf/test_tag and it's taking roughly half an hour to complete, is that expected?

I don't really grok what the test is doing TBH, but it does appear to be doing it 5 times :)

Quoted 8 lines
	for (i = 0; i < 5; i++) {
		do_test(&tests, 2, -1,     bpf_gen_imm_prog);
		do_test(&tests, 3, fd_map, bpf_gen_map_prog);
	}

Could we make it just do one iteration by default? That would hopefully reduce the runtime by quite a bit. It could take a parameter to run the longer version perhaps?

On my 2.5 years old laptop it's taking 16 seconds. ;) I'm okay if we reduce the runs and add a long version via cmdline param. It's basically comparing the sha based tag generation from the BPF core with plain AF_ALG from crypto subsys over the same insn sequence to make sure both match fine.

Thanks,
Daniel

#2 lore raw
Quoted 14 lines · Daniel Borkmann
Quoted 13 lines · Michael Ellerman

Hi Daniel,

I'm running selftests/bpf/test_tag and it's taking roughly half an hour to complete, is that expected?

I don't really grok what the test is doing TBH, but it does appear to be doing it 5 times :)

	for (i = 0; i < 5; i++) {
		do_test(&tests, 2, -1,     bpf_gen_imm_prog);
		do_test(&tests, 3, fd_map, bpf_gen_map_prog);
	}
Quoted 5 lines
Quoted 3 lines

Could we make it just do one iteration by default? That would hopefully reduce the runtime by quite a bit. It could take a parameter to run the longer version perhaps?

On my 2.5 years old laptop it's taking 16 seconds. ;)

Hrm. I guess I need to dig into why it's taking so long then :)

Today it takes 10s on the same machine :/

Is it affected by the BPF JIT being enabled/disabled?

cheers