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.