test/setup: check open files limit

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I0826c93934025a5ec7126f0f6223d42177054f06
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462010
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Maciej Wawryk 2019-07-16 08:09:14 +02:00 committed by Darek Stojaczyk
parent 45dd91af39
commit 0abee610f0

View File

@ -365,6 +365,21 @@ function configure_linux {
exit 1
fi
CURENT_SOFT_ULIMIT=$(ulimit -n)
if [ "$CURENT_SOFT_ULIMIT" != "unlimited" ]; then
echo ""
echo "WARNING: soft ulimit for max open files is set to $CURENT_SOFT_ULIMIT."
echo "SPDK won't be able to use more than $CURENT_SOFT_ULIMIT hugepages if run as current user."
echo ""
fi
CURENT_HARD_ULIMIT=$(ulimit -Hn)
if [ "$CURENT_HARD_ULIMIT" != "unlimited" ]; then
echo ""
echo "WARNING: hard ulimit for max open files is set to $CURENT_HARD_ULIMIT."
echo "SPDK won't be able to use more than $CURENT_HARD_ULIMIT hugepages even if run as root."
echo ""
fi
if [ "$driver_name" = "vfio-pci" ]; then
if [ -n "$TARGET_USER" ]; then
for mount in $hugetlbfs_mounts; do