1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
#!/bin/bash
set -u
basedir=$(dirname "$0")
. "${basedir}"/check-dpdk-supported-arch.sh
# since these tests really execute dpdk code they have to check for the
# required minimum cpu features
ARCH=$(dpkg --print-architecture)
echo "Check required features on arch: ${ARCH}"
case "${ARCH}" in
amd64)
if ! grep -q '^flags.*sse3' /proc/cpuinfo; then
echo "Missing sse3 on ${ARCH} - not supported, SKIP test"
exit 0
fi
;;
*)
echo "DPDK autotest not supported on ${ARCH}, SKIP test"
exit 0
;;
esac
echo "no known missing feature on ${ARCH}, continue test"
echo "Get required 1G huge pages"
echo 512 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
sleep 5s
realhp=$(cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages)
if [[ "$realhp" != "512" ]]; then
echo "Unable to allocate the huge pages required for the test, SKIP test"
exit 0
fi
# fetch build config
. /usr/share/dpdk/dpdk-sdk-env.sh
# Reasons for not being an dh_autotest
# - needs root and hugepages
# - build environment capabilities too unpredictable
# - certain workarounds needed to get running, needing root for some which is
# not available in the build environment
# blacklist reasons:
# known upstream: http://www.dpdk.org/ml/archives/dev/2016-May/038849.html
# - KNI: we deliver via dkms but test doesn't match
# - power_acpi_cpufreq: in many environments blocked by other cpufreq
# - power_kvm_vm_autotest: no avail in all environments, only for virt power management e.g. /dev/virtio-ports/virtio.serial.port.poweragent.0
# - IVSHMEM fails in virtual environment
# - eal_flags needs at least 8 cpus for lcores test not to fail
# - pci doesn't initialize in all virt env causing command not found issues
# - rather slow performance tests not suited for regular build associated tests: ring_perf,mempool_perf,memcpy_perf,hash_perf,timer_perf
python "${RTE_SDK}/test/autotest.py" \
"${RTE_SDK}/test/test" \
"${RTE_TARGET}" \
"-KNI,power_acpi_cpufreq,power_kvm_vm,IVSHMEM,eal_flags,pci,ring_perf,mempool_perf,memcpy_perf,hash_perf,timer_perf" \
# Pass/Fail
# For now the autotest is too unreliable, so we run it to get some logs in
# different environments, but never (want to) fail until it is stable.
echo "OK"
|