kfdtest: Automate the gtest filter name generation

This will emilinate the need of updating the run_kfdtest.sh every time
a new platform is added.

Change-Id: I584d65b462de36a685fa2d29d43962078ba511dc
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
Этот коммит содержится в:
Yong Zhao
2019-09-09 15:57:22 -04:00
родитель baa2957895
Коммит ec1375ac66
2 изменённых файлов: 54 добавлений и 48 удалений
+39 -28
Просмотреть файл
@@ -1,13 +1,27 @@
declare -A FILTER
# Power management tests
PM_TESTS=\
FILTER[pm]=\
"KFDPMTest.SuspendWithActiveProcess:"\
"KFDPMTest.SuspendWithIdleQueue:"\
"KFDPMTest.SuspendWithIdleQueueAfterWork:"\
"KFDPMTest.SuspendWithIdleQueueAfterWork"
# Core tests, used in scenarios like bringup
FILTER[core]=\
"KFDQMTest.CreateDestroyCpQueue:"\
"KFDQMTest.SubmitPacketCpQueue:"\
"KFDQMTest.MultipleCpQueues:"\
"KFDQMTest.CreateDestroySdmaQueue:"\
"KFDQMTest.SubmitPacketSdmaQueue:"\
"KFDQMTest.MultipleSdmaQueues:"\
"KFDCWSRTest.BasicTest:"\
"KFDEventTest.SignalEvent"
# Permanent exclusions
# These tests are included for debugging, but are not executed in normal execution on any ASIC:
# PM_TESTS need human intervention, so put it here. Developers can run them
# FILTER[pm] need human intervention, so put it here. Developers can run them
# manually through "-p pm" option.
#
# Fragmentation test fails intermittently on different systems (see KFD-344). It
@@ -21,7 +35,7 @@ PM_TESTS=\
# clears memory at allocation time.
PERMANENT_BLACKLIST_ALL_ASICS=\
"-KFDEventTest.MeasureInterruptConsumption:"\
"$PM_TESTS:"\
"${FILTER[pm]}:"\
"KFDLocalMemoryTest.Fragmentation:"\
"KFDQMTest.BasicCuMaskingLinear:"\
"RDMATest.GPUDirect:"\
@@ -80,7 +94,7 @@ KV_QUEUE_BLACKLIST=\
# KFDQMTest.CpuWriteCoherence fails. 0 dwordsAvailable (KFD-338)
# KFDMemoryTest.MemoryRegister fails on SDMA queue creation (KFD-337)
KV_TESTS_BLACKLIST=\
FILTER[kaveri]=\
"$BLACKLIST_ALL_ASICS:"\
"$SDMA_BLACKLIST:"\
"$KV_QUEUE_BLACKLIST:"\
@@ -90,13 +104,13 @@ KV_TESTS_BLACKLIST=\
# KFDLocalMemoryTest.BasicTest is failing intermittently (KFD-368)
# KFDMemoryTest.BigBufferStressTest was failing intermittently on 4.9 and hangs when executed twice (KFD-312)
# KFDQMTest.GPUDoorbellWrite fails on Hawaii. Could be HW-related (KFD-342)
HI_TESTS_BLACKLIST=\
FILTER[hawaii]=\
"$BLACKLIST_ALL_ASICS:"\
"KFDLocalMemoryTest.BasicTest:"\
"KFDMemoryTest.BigBufferStressTest:"\
"KFDQMTest.GPUDoorbellWrite"
CZ_TESTS_BLACKLIST=\
FILTER[carrizo]=\
"$BLACKLIST_ALL_ASICS:"\
"$SDMA_BLACKLIST:"\
"KFDExceptionTest.InvalidWriteAddress"
@@ -104,7 +118,7 @@ CZ_TESTS_BLACKLIST=\
# KFDPerfCountersTest.*Trace fail (KFD-339)
# KFDMemoryTest.QueryPointerInfo/MemoryRegister* (KFD-341)
# The remaining tests listed here fail on map memory to GPU with a VA conflict (KFD-340)
TONGA_TESTS_BLACKLIST=\
FILTER[tonga]=\
"$BLACKLIST_ALL_ASICS:"\
"$SDMA_BLACKLIST:"\
"KFDCWSRTest.BasicTest:"\
@@ -112,19 +126,27 @@ TONGA_TESTS_BLACKLIST=\
"KFDQMTest.OverSubscribeCpQueues"
# Since Navi10 was merged, the PM4Event test takes 6min to run
FIJI_TESTS_BLACKLIST=\
FILTER[fiji]=\
"$BLACKLIST_ALL_ASICS:"\
"KFDQMTest.PM4EventInterrupt:"\
"$SDMA_BLACKLIST"
POLARIS_TESTS_BLACKLIST=\
FILTER[polaris10]=\
"$BLACKLIST_ALL_ASICS:"\
"$SDMA_BLACKLIST"
FILTER[polaris11]=\
"$BLACKLIST_ALL_ASICS:"\
"$SDMA_BLACKLIST"
FILTER[polaris12]=\
"$BLACKLIST_ALL_ASICS:"\
"$SDMA_BLACKLIST"
# KFDIPCTest.BasicTest (ROCMOPS-459) .CMABasicTest (ROCMOPS-460) .CrossMemoryAttachTest (ROCMOPS-461)
# KFDEvictTest.BurstyTest (ROCMOPS-464)
# KFDQMTest.MultipleSdmaQueues (ROCMOPS-463)
VEGA10_TESTS_BLACKLIST=\
FILTER[vega10]=\
"$BLACKLIST_ALL_ASICS:"\
"KFDIPCTest.BasicTest:"\
"KFDEvictTest.BurstyTest:"\
@@ -132,12 +154,12 @@ VEGA10_TESTS_BLACKLIST=\
"KFDIPCTest.CrossMemoryAttachTest:"\
"KFDQMTest.MultipleSdmaQueues"
VEGA12_TESTS_BLACKLIST=\
FILTER[vega12]=\
"$BLACKLIST_ALL_ASICS:"\
"$SDMA_BLACKLIST"\
# KFDEvictTest.BurstyTest (ROCMOPS-464)
VEGA20_TESTS_BLACKLIST=\
FILTER[vega20]=\
"$BLACKLIST_ALL_ASICS:"\
"$SDMA_BLACKLIST:"\
"KFDEvictTest.BurstyTest:"\
@@ -145,17 +167,17 @@ VEGA20_TESTS_BLACKLIST=\
"KFDExceptionTest.InvalidWriteAddress:"\
"KFDQMTest.GPUDoorbellWrite"
RAVEN_TESTS_BLACKLIST=\
FILTER[raven]=\
"$BLACKLIST_ALL_ASICS:"\
"KFDQMTest.QueueLatency:"\
"KFDQMTest.SdmaEventInterrupt"
# KFDExceptionTest.* (KFD-435)
ARCT_TESTS_BLACKLIST=\
FILTER[arcturus]=\
"$BLACKLIST_ALL_ASICS:"\
"KFDExceptionTest.FaultStorm"
NAVI10_TESTS_BLACKLIST=\
FILTER[navi10]=\
"$BLACKLIST_ALL_ASICS:"\
"$SDMA_BLACKLIST:"\
"KFDEvictTest.BurstyTest:"\
@@ -164,7 +186,7 @@ NAVI10_TESTS_BLACKLIST=\
"KFDExceptionTest.InvalidWriteAddress:"\
"KFDQMTest.GPUDoorbellWrite"
NAVI14_TESTS_BLACKLIST=\
FILTER[navi14]=\
"$BLACKLIST_ALL_ASICS:"\
"KFDQMTest.BasicCuMaskingEven:"\
"KFDDBGTest.*:"\
@@ -172,14 +194,3 @@ NAVI14_TESTS_BLACKLIST=\
"KFDPerfCountersTest.*:"\
"KFDQMTest.CreateQueueStressSingleThreaded:"\
"KFDPNPTest.DisableWithActiveProcess"
# Core tests, used in scenarios like bringup
CORE_TESTS=\
"KFDQMTest.CreateDestroyCpQueue:"\
"KFDQMTest.SubmitPacketCpQueue:"\
"KFDQMTest.MultipleCpQueues:"\
"KFDQMTest.CreateDestroySdmaQueue:"\
"KFDQMTest.SubmitPacketSdmaQueue:"\
"KFDQMTest.MultipleSdmaQueues:"\
"KFDCWSRTest.BasicTest:"\
"KFDEventTest.SignalEvent"
+15 -20
Просмотреть файл
@@ -40,7 +40,8 @@ printUsage() {
echo
echo "Options:"
echo " -p <platform> , --platform <platform> Only run tests that"\
"pass on the specified platform"
"pass on the specified platform. Usually you"\
"don't need this option"
echo " -g , --gdb Run in debugger"
echo " -n , --node NodeId to test. If"\
"not specified test will be run on all nodes"
@@ -61,27 +62,21 @@ printUsage() {
# pass in Multi GPU environment, this flag can be removed
# param - Platform.
getFilter() {
# For regular platforms such as vega10, this will automatically generate
# the valid variable BLACKLIST based on the variable platform.
local platform=$1;
case "$platform" in
carrizo ) FILTER="--gtest_filter=$CZ_TESTS_BLACKLIST" ;;
hawaii ) FILTER="--gtest_filter=$HI_TESTS_BLACKLIST" ;;
kaveri ) FILTER="--gtest_filter=$KV_TESTS_BLACKLIST" ;;
tonga ) FILTER="--gtest_filter=$TONGA_TESTS_BLACKLIST" ;;
fiji ) FILTER="--gtest_filter=$FIJI_TESTS_BLACKLIST" ;;
polaris10 | polaris11 | polaris12 ) FILTER="--gtest_filter=$POLARIS_TESTS_BLACKLIST" ;;
vega10 ) FILTER="--gtest_filter=$VEGA10_TESTS_BLACKLIST" ;;
vega12 ) FILTER="--gtest_filter=$VEGA12_TESTS_BLACKLIST" ;;
vega20 ) FILTER="--gtest_filter=$VEGA20_TESTS_BLACKLIST" ;;
raven ) FILTER="--gtest_filter=$RAVEN_TESTS_BLACKLIST" ;;
arcturus ) FILTER="--gtest_filter=$ARCT_TESTS_BLACKLIST" ;;
navi10 ) FILTER="--gtest_filter=$NAVI10_TESTS_BLACKLIST" ;;
navi14 ) FILTER="--gtest_filter=$NAVI14_TESTS_BLACKLIST" ;;
core ) FILTER="--gtest_filter=$CORE_TESTS" ;;
pm ) FILTER="--gtest_filter=$PM_TESTS" ;;
all ) FILTER="" ;;
*) die "Unsupported platform $platform. Exiting" ;;
all ) gtestFilter="" ;;
* )
if [ -z "${FILTER[$platform]}" ]; then
echo "Unsupported platform $platform. Exiting"
exit 1
fi
gtestFilter="--gtest_filter=${FILTER[$platform]}"
;;
esac
echo "$FILTER"
}
TOPOLOGY_SYSFS_DIR=/sys/devices/virtual/kfd/kfd/topology/nodes
@@ -136,7 +131,7 @@ runKfdTest() {
nodeName="$PLATFORM"
fi
gtestFilter=$(getFilter $nodeName)
getFilter $nodeName
if [ "$RUN_IN_DOCKER" == "true" ]; then
if [ "$NODE" == "" ]; then