]> granicus.if.org Git - strace/commit
tests: serialize bpf-obj_get_info_by_fd based executables
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 15 Jul 2019 15:54:51 +0000 (15:54 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 15 Jul 2019 17:11:27 +0000 (17:11 +0000)
commit6e1208271af257ed4dd51abfac44f35590da1427
tree47d4387448f113ae8331eaccdb46012a7d5a5ac8
parentd8f95ba4bf13ef96af9e22265b29aad33d391f77
tests: serialize bpf-obj_get_info_by_fd based executables

Concurrent execution of many bpf-obj_get_info_by_fd based tests may
lead to a temporary resource shortage that causes them to fail with
the following error diagnostics:

BPF_MAP_CREATE failed: Operation not permitted

Avoid this issue by serializing execution of all relevant tests.

* tests/lock_file.c: New file.
* tests/Makefile.am (libtests_a_SOURCES): Add lock_file.c
* tests/tests.h (lock_file_by_dirname): New prototype.
* tests/bpf-obj_get_info_by_fd.c (main): Call lock_file_by_dirname
to obtain an exclusive lock on bpf-obj_get_info_by_fd executable.

References: https://github.com/strace/strace/issues/74
References: https://github.com/strace/strace/issues/105
tests/Makefile.am
tests/bpf-obj_get_info_by_fd.c
tests/lock_file.c [new file with mode: 0644]
tests/tests.h