Commit bf927b44 authored by Changpeng Liu's avatar Changpeng Liu Committed by Gerrit Code Review
Browse files

spdk: add the ioat_kperf test tool to autobuild system



Change-Id: If45a7fd3d6d3a7a52e71595de32ea4cf04e23d36
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 3f7cfd21
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -17,6 +17,10 @@ timing_enter check_format
./scripts/check_format.sh
timing_exit check_format

timing_enter build_kmod
./scripts/build_kmod.sh build
timing_exit build_kmod

scanbuild=''
if hash scan-build; then
	scanbuild="scan-build -o $out/scan-build-tmp --status-bugs"
+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ time test/lib/ioat/ioat.sh
timing_exit lib

./scripts/cleanup.sh
./scripts/build_kmod.sh clean

timing_exit autotest
chmod a+r $output_dir/timing.txt
+4 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ Building & Usage
1. Compile and load the kernel test module first.

    modprobe -v ioatdma
    cd kmod && make && insmod dmaperf.ko
    ./scripts/build_kmod.sh build && insmod dmaperf.ko

2. Run the test application.

@@ -37,6 +37,9 @@ Building & Usage
    Channel 3 Performance Data 1415 MB/s
    Total Channel Performance Data 5655 MB/s

3. Cleanup
    ./scripts/build_kmod.sh clean

OS Support
==========
We have tested several Linux distributions, currently Fedora 21/22 with kernel

scripts/build_kmod.sh

0 → 100755
+33 −0
Original line number Diff line number Diff line
#!/usr/bin/env bash

readonly BASEDIR=$(readlink -f $(dirname $0))/..

set -e

function build_ioat_kmod() {
	if [ -d $BASEDIR/examples/ioat/kperf/kmod ]; then
		echo "Build Linux Ioat Test Module ..."
		cd $BASEDIR/examples/ioat/kperf/kmod
		make
	fi
}

function clean_ioat_kmod() {
	# remove dmaperf test module
	grep -q "^dmaperf" /proc/modules && rmmod dmaperf
	# cleanup build
	if [ -d $BASEDIR/examples/ioat/kperf/kmod ]; then
		echo "Cleanup Linux Ioat Test Module ..."
		cd $BASEDIR/examples/ioat/kperf/kmod
		make clean
	fi
}

if [ `uname` = Linux ]; then
	if [ "$1" = "build" ]; then
		build_ioat_kmod
	fi
	if [ "$1" = "clean" ]; then
		clean_ioat_kmod
	fi
fi