autotest: set FreeBSD kern.ipc.maxsockbuf to 4k

unittest_sock unit tests fail on FreeBSD due to
ENOBUFS. Increase to buffer size to 4k for tests
to pass.

Fixes #2943

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I55d1164d49edb2d90ebfe5f720a615f052ee52d9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17370
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This commit is contained in:
Karol Latecki 2023-03-29 07:39:42 +02:00 committed by Konrad Sztyber
parent 45dc5f12ff
commit a7d3e1068e
2 changed files with 10 additions and 0 deletions

View File

@ -60,6 +60,7 @@ out=$output_dir
cd $src
freebsd_update_contigmem_mod
freebsd_set_maxsock_buf
# lcov takes considerable time to process clang coverage.
# Disabling lcov allow us to do this.

View File

@ -1411,6 +1411,15 @@ function freebsd_update_contigmem_mod() {
fi
}
function freebsd_set_maxsock_buf() {
# FreeBSD needs 4MB maxsockbuf size to pass socket unit tests.
# Otherwise tests fail due to ENOBUFS when trying to do setsockopt(SO_RCVBUF|SO_SNDBUF).
# See https://github.com/spdk/spdk/issues/2943
if [[ $(uname) = FreeBSD ]] && (($(sysctl -n kern.ipc.maxsockbuf) < 4194304)); then
sysctl kern.ipc.maxsockbuf=4194304
fi
}
function get_nvme_name_from_bdf() {
blkname=()