Commit c9655427 authored by Darek Stojaczyk's avatar Darek Stojaczyk Committed by Tomasz Zawadzki
Browse files

test/external_code: use default HUGEMEM in setup.sh



Fixes #1382

System memory gets fragmented over time and repeated hugepage
allocations fail, giving us intermittent failures on CI. Linux
allocates those pages only when requested hugepage count is bigger
than current hugepage count, so in order to prevent any additional
allocations just stick to a single count all the time.

autotest_common.sh already exports HUGEMEM=8G for Linux systems
and 2G for BSD ones. `setup.sh reset` doesn't touch the hugepages,
so practically only the first `setup.sh` will allocate memory now.

The two setup.sh calls are run with sudo, so they need
HUGEMEM="$HUGEMEM" to work.

Change-Id: I48b4a720bad4e1da14e78313b4db0eb60a177c38
Signed-off-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2374


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarSeth Howell <seth.howell@intel.com>
parent 477761a2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ set -e
SPDK_DIR=$1

# Skip all pci devices. These tests don't rely on them.
sudo PCI_WHITELIST="NONE" HUGEMEM=1024 $SPDK_DIR/scripts/setup.sh
sudo PCI_WHITELIST="NONE" HUGEMEM="$HUGEMEM" $SPDK_DIR/scripts/setup.sh

$SPDK_DIR/configure --with-shared --without-isal --without-ocf --disable-asan
make -C $SPDK_DIR -j$(nproc)
@@ -65,4 +65,4 @@ LD_LIBRARY_PATH=$SPDK_LIB_DIR:$DPDK_LIB_DIR run_test "external_run_tc6" $test_ro
make -C $test_root clean
make -C $SPDK_DIR -j$(nproc) clean

sudo PCI_WHITELIST="NONE" $SPDK_DIR/scripts/setup.sh reset
sudo PCI_WHITELIST="NONE" HUGEMEM="$HUGEMEM" $SPDK_DIR/scripts/setup.sh reset