a65aafd006
Change-Id: Ie929debaaa74b0d8460b508199e842a244e090fa Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
54 lines
982 B
Bash
Executable File
54 lines
982 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
rootdir=$(readlink -f $(dirname $0))
|
|
source "$rootdir/scripts/autotest_common.sh"
|
|
|
|
set -xe
|
|
|
|
if [ $EUID -ne 0 ]; then
|
|
echo "$0 must be run as root"
|
|
exit 1
|
|
fi
|
|
|
|
timing_enter autotest
|
|
|
|
src=$(readlink -f $(dirname $0))
|
|
out=$PWD
|
|
cd $src
|
|
|
|
# set up huge pages
|
|
timing_enter afterboot
|
|
./scripts/configure_hugepages.sh 3072
|
|
timing_exit afterboot
|
|
|
|
lsmod | grep -q ^nvme && rmmod nvme || true
|
|
|
|
#####################
|
|
# Unit Tests
|
|
#####################
|
|
|
|
timing_enter lib
|
|
|
|
time test/lib/nvme/nvme.sh
|
|
time test/lib/memory/memory.sh
|
|
|
|
timing_exit lib
|
|
|
|
# detach pci devices from uio driver
|
|
grep -q "^uio_pci_generic" /proc/modules && rmmod uio_pci_generic
|
|
|
|
# bind NVMe devices to NVMe driver if no kernel device
|
|
if [ -d "/sys/bus/pci/drivers/nvme" ]; then
|
|
device=`find /sys/bus/pci/drivers/nvme -name "0000*" -print`
|
|
if [ -z "$device" ]; then
|
|
rmmod nvme
|
|
modprobe nvme
|
|
fi
|
|
fi
|
|
|
|
timing_exit autotest
|
|
chmod a+r $output_dir/timing.txt
|
|
|
|
# catch any stray core files
|
|
process_core
|