linux/tools/testing
KP Singh 15075bb722 selftests/bpf: Fix a compiler warning in local_storage test
Some compilers trigger a warning when tmp_dir_path is allocated
with a fixed size of 64-bytes and used in the following snprintf:

  snprintf(tmp_exec_path, sizeof(tmp_exec_path), "%s/copy_of_rm",
	   tmp_dir_path);

  warning: ‘/copy_of_rm’ directive output may be truncated writing 11
  bytes into a region of size between 1 and 64 [-Wformat-truncation=]

This is because it assumes that tmp_dir_path can be a maximum of 64
bytes long and, therefore, the end-result can get truncated. Fix it by
not using a fixed size in the initialization of tmp_dir_path which
allows the compiler to track actual size of the array better.

Fixes: 2f94ac1918 ("bpf: Update local storage test to check handling of null ptrs")
Signed-off-by: KP Singh <kpsingh@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210202213730.1906931-1-kpsingh@kernel.org
2021-02-02 21:21:55 -08:00
..
fault-injection
ktest Kbuild updates for v5.11 2020-12-22 14:02:39 -08:00
kunit kunit: tool: Force the use of the 'tty' console for UML 2021-01-04 09:18:38 -07:00
nvdimm x86, libnvdimm/test: Remove COPY_MC_TEST 2020-10-26 18:08:35 +01:00
radix-tree ida: Free allocated bitmap in error path 2020-10-07 09:11:33 -04:00
scatterlist RDMA 5.11 pull request 2020-12-16 13:42:26 -08:00
selftests selftests/bpf: Fix a compiler warning in local_storage test 2021-02-02 21:21:55 -08:00
vsock SPDX patches for 5.7-rc1. 2020-04-03 13:12:26 -07:00