numam-spdk/test/spdkcli/common.sh
Michal Berger 227428c3a4 autotest: Don't override default amount of hugepages on Linux to 8GB
This is relevant mostly for the VMs. Allocating that much memory puts
a lot of pressure on remaining pieces of the system as currently we
allocate total of 12GB memory per VM instance in the CI pool. Default of
4GB hp should be enough to cover majority of the tests hence if there's
any suite that requires more memory, setup.sh should be called there
directly with an optimal value.

This is done to make sure we can accomodate proper resources in the CI
by knowing what are the actual requirements rather than just blindly
allocating "as much as possible".

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ie958c518c7ed702b068c7fc9042183fdf41aa816
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8436
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-06-24 17:33:10 +00:00

49 lines
1.2 KiB
Bash

spdkcli_job="$rootdir/test/spdkcli/spdkcli_job.py"
spdk_clear_config_py="$rootdir/test/json_config/clear_config.py"
function on_error_exit() {
set +e
if [ -n "$spdk_tgt_pid" ]; then
killprocess $spdk_tgt_pid
fi
if [ -n "$nvmf_tgt_pid" ]; then
killprocess $nvmf_tgt_pid
fi
if [ -n "$iscsi_tgt_pid" ]; then
killprocess $iscsi_tgt_pid
fi
if [ -n "$vhost_tgt_pid" ]; then
killprocess $vhost_tgt_pid
fi
rm -f $testdir/${MATCH_FILE} $testdir/match_files/spdkcli_details_vhost.test /tmp/sample_aio /tmp/sample_pmem
print_backtrace
exit 1
}
function run_spdk_tgt() {
$SPDK_BIN_DIR/spdk_tgt -m 0x3 -p 0 -s 4096 &
spdk_tgt_pid=$!
waitforlisten $spdk_tgt_pid
}
function run_nvmf_tgt() {
$SPDK_BIN_DIR/nvmf_tgt -m 0x3 -p 0 -s 4096 &
nvmf_tgt_pid=$!
waitforlisten $nvmf_tgt_pid
}
function run_vhost_tgt() {
$SPDK_BIN_DIR/vhost -m 0x3 -p 0 -s 4096 &
vhost_tgt_pid=$!
waitforlisten $vhost_tgt_pid
}
function check_match() {
$rootdir/scripts/spdkcli.py ll $SPDKCLI_BRANCH > $testdir/match_files/${MATCH_FILE}
$rootdir/test/app/match/match $testdir/match_files/${MATCH_FILE}.match
rm -f $testdir/match_files/${MATCH_FILE}
}
# Allocate 5GB of hugepages to have some overhead for run_*()s
HUGEMEM=5120 CLEAR_HUGE=yes "$rootdir/scripts/setup.sh"