summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2016-01-15 17:14:05 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2016-01-15 17:14:05 +0100
commit7456bb37db08a401a05ed06009a9e2b3572787be (patch)
tree1fd6b516decaae83c949d95fa5d7b34e0c378f1a
parent49e3f5a83e0150115261225287385fdd2c93d811 (diff)
downloadmeta-enea-7456bb37db08a401a05ed06009a9e2b3572787be.tar.gz
intial comit for Enea Linux 5.0-ppc
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
-rw-r--r--conf/distro/enea-cgl.conf30
-rw-r--r--images/enea-image-featured.bb21
-rw-r--r--recipes-core/packagegroups/packagegroup-enea-core-boot.bb4
-rw-r--r--recipes-core/packagegroups/packagegroup-enea-sys.bb4
-rw-r--r--recipes-kernel/linux/files/CVE-2014-7825-CVE-2014-7826.patch94
-rw-r--r--recipes-kernel/linux/files/cfg/00026-ltp.cfg1
-rw-r--r--recipes-kernel/linux/files/cfg/00051-sctp.cfg4
-rw-r--r--recipes-kernel/linux/files/cfg/00052-gpio_pcf857x.cfg1
-rw-r--r--recipes-kernel/linux/files/cfg/00053-nfsdv3.cfg2
-rw-r--r--recipes-kernel/linux/files/cfg/00054-nls_cp437.cfg3
-rw-r--r--recipes-kernel/linux/files/cfg/00055-openvswitch.cfg7
-rw-r--r--recipes-kernel/linux/files/cfg/00056-uio_fsl_srio.cfg4
-rw-r--r--recipes-kernel/linux/files/dts/p2041rdb-usdpaa-enea.dts109
-rw-r--r--recipes-kernel/linux/files/dts/p3041ds-usdpaa-enea.dts123
-rw-r--r--recipes-kernel/linux/files/dts/t4240rdb-usdpaa-enea.dts207
-rw-r--r--recipes-kernel/linux/files/eCryptfs-CVE-2014-9683.patch41
-rw-r--r--recipes-kernel/linux/files/include_pca9672_io_in_dts.patch39
-rw-r--r--recipes-kernel/linux/files/keys-CVE-2014-9529-3.12-kernel.patch52
-rw-r--r--recipes-kernel/linux/files/netfilter-CVE-2014-8160-3.12-kernel.patch98
-rw-r--r--recipes-kernel/linux/files/netfilter-CVE-2014-9715.patch60
-rw-r--r--recipes-kernel/linux/files/splice-CVE-2014-7822-3.12-kernel.patch77
-rw-r--r--recipes-kernel/linux/linux-qoriq-common.inc52
-rw-r--r--recipes-test/benchtest-runner/benchtest-runner.bb23
-rw-r--r--recipes-test/benchtest-runner/files/benchtest-runner24
-rw-r--r--recipes-test/ddt-runner/ddt-runner.bb25
-rw-r--r--recipes-test/ddt-runner/files/ddt-runner51
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/acp3448v2/ethernet97
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/acp3448v2/flash45
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/acp3448v2/pci-express109
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/acp3448v2/usb100
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/b4860qds-64b/ethernet88
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/b4860qds-64b/flash20
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/b4860qds-64b/i2c24
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/b4860qds-64b/rtc42
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/b4860qds-64b/spi48
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/bsc9131rdb/ethernet89
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/bsc9131rdb/flash48
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/bsc9131rdb/i2c75
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/bsc9131rdb/preempt_rt33
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/bsc9131rdb/spi56
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/bsc9131rdb/watchdog64
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/bsc9132qds/ethernet89
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/bsc9132qds/flash48
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/bsc9132qds/i2c75
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/bsc9132qds/preempt_rt33
-rw-r--r--recipes-test/ddt-runner/files/scripts/bsc9132qds/sdhc77
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/bsc9132qds/spi56
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/bsc9132qds/watchdog64
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/imx6qsabrelite/ethernet88
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/imx6qsabrelite/flash49
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/imx6qsabrelite/i2c42
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/imx6qsabrelite/pci-express109
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/imx6qsabrelite/rtc42
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/imx6qsabrelite/sata81
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/imx6qsabrelite/sdhc40
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/imx6qsabrelite/spi48
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/imx6qsabrelite/usb48
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/imx6qsabrelite/watchdog63
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/k2hk-evm/ethernet88
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/k2hk-evm/flash49
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/k2hk-evm/i2c42
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/k2hk-evm/spi48
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p2020rdb/ethernet88
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p2020rdb/flash20
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p2020rdb/i2c24
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p2020rdb/spi48
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p2020rdb/usb100
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p2041rdb/ethernet111
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p2041rdb/flash49
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p2041rdb/i2c44
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p2041rdb/pci-express109
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p2041rdb/sata81
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p2041rdb/sdhc41
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p2041rdb/tempsensors60
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p2041rdb/usb48
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p3041ds/ethernet111
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p3041ds/flash47
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p3041ds/i2c42
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p3041ds/pci-express109
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p3041ds/sata80
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p3041ds/sdhc40
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p3041ds/usb48
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p4080ds/ethernet88
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p4080ds/flash20
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p4080ds/i2c24
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p4080ds/rtc42
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p4080ds/sdhc65
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p4080ds/spi48
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p4080ds/usb100
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/pandaboard/ethernet88
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/pandaboard/i2c24
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/pandaboard/rtc42
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/pandaboard/sdhc65
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/pandaboard/usb100
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/proliant-m800/ethernet88
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/proliant-m800/i2c24
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/proliant-m800/sata81
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/romley-ivb/ethernet88
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/romley-ivb/rtc42
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/romley-ivb/sata81
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/romley-ivb/usb100
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/zc702-zynq7/ethernet88
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/zc702-zynq7/flash20
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/zc702-zynq7/i2c24
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/zc702-zynq7/rtc42
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/zc702-zynq7/sdhc65
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/zc702-zynq7/spi48
-rwxr-xr-xrecipes-test/perf-networking/files/perf-networking14
-rw-r--r--recipes-test/perf-networking/perf-networking_1.0.bb19
-rw-r--r--recipes-test/rt-bmark/rt-bmark.bb23
-rw-r--r--recipes-test/stress/files/stress-itemx-after-item-only.patch55
-rw-r--r--recipes-test/stress/stress_1.0.4.bb13
-rw-r--r--recipes-test/systest-runner/files/systest-runner30
-rwxr-xr-xrecipes-test/systest-runner/files/tests/ltp23
-rwxr-xr-xrecipes-test/systest-runner/files/tests/perf-network13
-rwxr-xr-xrecipes-test/systest-runner/files/tests/posixtest40
-rw-r--r--recipes-test/systest-runner/systest-runner.bb29
117 files changed, 989 insertions, 5440 deletions
diff --git a/conf/distro/enea-cgl.conf b/conf/distro/enea-cgl.conf
deleted file mode 100644
index cbfba31..0000000
--- a/conf/distro/enea-cgl.conf
+++ /dev/null
@@ -1,30 +0,0 @@
1require conf/distro/poky-lsb.conf
2DISTRO = "enea-cgl"
3DISTRO_NAME = "Enea Linux"
4DISTRO_VERSION_MAJOR = "5.0"
5DISTRO_VERSION_MINOR ??= ""
6DISTRO_VERSION = "${DISTRO_VERSION_MAJOR}${DISTRO_VERSION_MINOR}"
7
8
9SDK_VENDOR = "-eneasdk"
10SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
11
12MAINTAINER = "ENEA <linux-maintainers@enea.com>"
13
14TARGET_VENDOR = "-enea"
15
16PRSERV_HOST ?= "localhost:0"
17
18SANITY_TESTED_DISTROS += "\
19 CentOS-6.1 \n \
20 RedHatEnterpriseServer-6.1 \n \
21 RedHatEnterpriseServer-6.4 \n \
22 Ubuntu-12.10 \n \
23 "
24
25CONNECTIVITY_CHECK_URIS = " \
26 http://linux.enea.com"
27
28BB_DANGLINGAPPENDS_WARNONLY ?= "1"
29
30DISTRO_FEATURES_append = " pam selinux"
diff --git a/images/enea-image-featured.bb b/images/enea-image-featured.bb
index 2d22237..07a2129 100644
--- a/images/enea-image-featured.bb
+++ b/images/enea-image-featured.bb
@@ -8,7 +8,6 @@ IMAGE_FEATURES += " \
8 debug-tweaks \ 8 debug-tweaks \
9 dev-pkgs \ 9 dev-pkgs \
10 doc-pkgs \ 10 doc-pkgs \
11 ptest-pkgs \
12 splash \ 11 splash \
13 staticdev-pkgs \ 12 staticdev-pkgs \
14 eclipse-debug \ 13 eclipse-debug \
@@ -23,14 +22,18 @@ IMAGE_FEATURES += " \
23 x11 \ 22 x11 \
24 x11-base" 23 x11-base"
25 24
26IMAGE_INSTALL = " \ 25USDPAA_PKGS = " \
26 eth-config \
27 flib \
28 fmc \
29 fmlib \
30 usdpaa \
31 "
32
33IMAGE_INSTALL += " \
27 packagegroup-base \ 34 packagegroup-base \
28 packagegroup-enea-debug \ 35 packagegroup-enea-debug \
29 packagegroup-enea-rt-tools \ 36 packagegroup-enea-rt-tools \
30 packagegroup-enea-ptest \
31 packagegroup-enea-ddt \
32 packagegroup-enea-sys \
33 packagegroup-enea-bench \
34 ${ROOTFS_PKGMANAGE_BOOTSTRAP} \ 37 ${ROOTFS_PKGMANAGE_BOOTSTRAP} \
35 beecrypt \ 38 beecrypt \
36 binutils \ 39 binutils \
@@ -51,6 +54,7 @@ IMAGE_INSTALL = " \
51 icu \ 54 icu \
52 insserv \ 55 insserv \
53 kbd \ 56 kbd \
57 kernel-dev \
54 kernel-modules \ 58 kernel-modules \
55 libgcrypt \ 59 libgcrypt \
56 libgpg-error \ 60 libgpg-error \
@@ -59,18 +63,21 @@ IMAGE_INSTALL = " \
59 lsbinitscripts \ 63 lsbinitscripts \
60 mingetty \ 64 mingetty \
61 openssh \ 65 openssh \
66 openvswitch \
62 ossp-uuid \ 67 ossp-uuid \
63 perf \ 68 perf \
64 pkgconfig \ 69 pkgconfig \
65 procps \ 70 procps \
66 psmisc \ 71 psmisc \
67 rpm \ 72 rpm \
68 rt-bmark \
69 tar \ 73 tar \
70 tipcutils \ 74 tipcutils \
71 udev-extraconf \ 75 udev-extraconf \
72 zip \ 76 zip \
73 " 77 "
74 78
79IMAGE_INSTALL_append_powerpc64 = " ${USDPAA_PKGS}"
80IMAGE_INSTALL_append_powerpc = " ${USDPAA_PKGS}"
81
75IMAGE_ROOTFS_EXTRA_SPACE = "1048576" 82IMAGE_ROOTFS_EXTRA_SPACE = "1048576"
76IMAGE_OVERHEAD_FACTOR = "1.5" 83IMAGE_OVERHEAD_FACTOR = "1.5"
diff --git a/recipes-core/packagegroups/packagegroup-enea-core-boot.bb b/recipes-core/packagegroups/packagegroup-enea-core-boot.bb
index d0836ae..ee762e9 100644
--- a/recipes-core/packagegroups/packagegroup-enea-core-boot.bb
+++ b/recipes-core/packagegroups/packagegroup-enea-core-boot.bb
@@ -45,8 +45,8 @@ RDEPENDS_${PN} += "\
45 ${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}" 45 ${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"
46 46
47RDEPENDS_${PN}_append_fslmachine = " u-boot" 47RDEPENDS_${PN}_append_fslmachine = " u-boot"
48RDEPENDS_${PN}_append_p2041 = " fm-ucode rcw" 48RDEPENDS_${PN}_append_p2041 = " rcw"
49RDEPENDS_${PN}_append_p4080 = " fm-ucode rcw" 49RDEPENDS_${PN}_append_p4080 = " rcw"
50RDEPENDS_${PN} += "\ 50RDEPENDS_${PN} += "\
51 busybox \ 51 busybox \
52 ${@base_contains("MACHINE_FEATURES", "rtc", "busybox-hwclock", "", d)} \ 52 ${@base_contains("MACHINE_FEATURES", "rtc", "busybox-hwclock", "", d)} \
diff --git a/recipes-core/packagegroups/packagegroup-enea-sys.bb b/recipes-core/packagegroups/packagegroup-enea-sys.bb
index 9ec9756..9c348e4 100644
--- a/recipes-core/packagegroups/packagegroup-enea-sys.bb
+++ b/recipes-core/packagegroups/packagegroup-enea-sys.bb
@@ -13,6 +13,6 @@ RDEPENDS_${PN} = "\
13 " 13 "
14 14
15RRECOMMENDS_${PN} = "\ 15RRECOMMENDS_${PN} = "\
16 systest-runner \ 16 ltptest-runner \
17 perf-networking \ 17 posix-runner \
18 " 18 "
diff --git a/recipes-kernel/linux/files/CVE-2014-7825-CVE-2014-7826.patch b/recipes-kernel/linux/files/CVE-2014-7825-CVE-2014-7826.patch
new file mode 100644
index 0000000..d1167da
--- /dev/null
+++ b/recipes-kernel/linux/files/CVE-2014-7825-CVE-2014-7826.patch
@@ -0,0 +1,94 @@
1From abc07cd01c51fb54088c6bc8ee654d104a5ec7d9 Mon Sep 17 00:00:00 2001
2From: Rabin Vincent <rabin@rab.in>
3Date: Wed, 29 Oct 2014 23:06:58 +0100
4Subject: tracing/syscalls: Ignore numbers outside NR_syscalls' range
5
6commit 086ba77a6db00ed858ff07451bedee197df868c9 upstream.
7
8ARM has some private syscalls (for example, set_tls(2)) which lie
9outside the range of NR_syscalls. If any of these are called while
10syscall tracing is being performed, out-of-bounds array access will
11occur in the ftrace and perf sys_{enter,exit} handlers.
12
13 # trace-cmd record -e raw_syscalls:* true && trace-cmd report
14 ...
15 true-653 [000] 384.675777: sys_enter: NR 192 (0, 1000, 3, 4000022, ffffffff, 0)
16 true-653 [000] 384.675812: sys_exit: NR 192 = 1995915264
17 true-653 [000] 384.675971: sys_enter: NR 983045 (76f74480, 76f74000, 76f74b28, 76f74480, 76f76f74, 1)
18 true-653 [000] 384.675988: sys_exit: NR 983045 = 0
19 ...
20
21 # trace-cmd record -e syscalls:* true
22 [ 17.289329] Unable to handle kernel paging request at virtual address aaaaaace
23 [ 17.289590] pgd = 9e71c000
24 [ 17.289696] [aaaaaace] *pgd=00000000
25 [ 17.289985] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
26 [ 17.290169] Modules linked in:
27 [ 17.290391] CPU: 0 PID: 704 Comm: true Not tainted 3.18.0-rc2+ #21
28 [ 17.290585] task: 9f4dab00 ti: 9e710000 task.ti: 9e710000
29 [ 17.290747] PC is at ftrace_syscall_enter+0x48/0x1f8
30 [ 17.290866] LR is at syscall_trace_enter+0x124/0x184
31
32Fix this by ignoring out-of-NR_syscalls-bounds syscall numbers.
33
34Commit cd0980fc8add "tracing: Check invalid syscall nr while tracing syscalls"
35added the check for less than zero, but it should have also checked
36for greater than NR_syscalls.
37
38Link: http://lkml.kernel.org/p/1414620418-29472-1-git-send-email-rabin@rab.in
39
40Fixes: cd0980fc8add "tracing: Check invalid syscall nr while tracing syscalls"
41CVE-2014-7825 and CVE-2014-7826.
42Upstream-Status: Backport
43
44Signed-off-by: Rabin Vincent <rabin@rab.in>
45Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
46Signed-off-by: Jiri Slaby <jslaby@suse.cz>
47Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
48---
49 kernel/trace/trace_syscalls.c | 8 ++++----
50 1 file changed, 4 insertions(+), 4 deletions(-)
51
52diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
53index 559329d..d8ce71b 100644
54--- a/kernel/trace/trace_syscalls.c
55+++ b/kernel/trace/trace_syscalls.c
56@@ -312,7 +312,7 @@ static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id)
57 int size;
58
59 syscall_nr = trace_get_syscall_nr(current, regs);
60- if (syscall_nr < 0)
61+ if (syscall_nr < 0 || syscall_nr >= NR_syscalls)
62 return;
63 if (!test_bit(syscall_nr, tr->enabled_enter_syscalls))
64 return;
65@@ -354,7 +354,7 @@ static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret)
66 int syscall_nr;
67
68 syscall_nr = trace_get_syscall_nr(current, regs);
69- if (syscall_nr < 0)
70+ if (syscall_nr < 0 || syscall_nr >= NR_syscalls)
71 return;
72 if (!test_bit(syscall_nr, tr->enabled_exit_syscalls))
73 return;
74@@ -557,7 +557,7 @@ static void perf_syscall_enter(void *ignore, struct pt_regs *regs, long id)
75 int size;
76
77 syscall_nr = trace_get_syscall_nr(current, regs);
78- if (syscall_nr < 0)
79+ if (syscall_nr < 0 || syscall_nr >= NR_syscalls)
80 return;
81 if (!test_bit(syscall_nr, enabled_perf_enter_syscalls))
82 return;
83@@ -631,7 +631,7 @@ static void perf_syscall_exit(void *ignore, struct pt_regs *regs, long ret)
84 int size;
85
86 syscall_nr = trace_get_syscall_nr(current, regs);
87- if (syscall_nr < 0)
88+ if (syscall_nr < 0 || syscall_nr >= NR_syscalls)
89 return;
90 if (!test_bit(syscall_nr, enabled_perf_exit_syscalls))
91 return;
92--
93cgit v0.11.2
94
diff --git a/recipes-kernel/linux/files/cfg/00026-ltp.cfg b/recipes-kernel/linux/files/cfg/00026-ltp.cfg
index e36a9c2..79959e2 100644
--- a/recipes-kernel/linux/files/cfg/00026-ltp.cfg
+++ b/recipes-kernel/linux/files/cfg/00026-ltp.cfg
@@ -1,3 +1,2 @@
1CONFIG_TUN=y 1CONFIG_TUN=y
2CONFIG_KSM=y 2CONFIG_KSM=y
3CONFIG_NUMA=y
diff --git a/recipes-kernel/linux/files/cfg/00051-sctp.cfg b/recipes-kernel/linux/files/cfg/00051-sctp.cfg
new file mode 100644
index 0000000..6182ef2
--- /dev/null
+++ b/recipes-kernel/linux/files/cfg/00051-sctp.cfg
@@ -0,0 +1,4 @@
1CONFIG_NET=y
2CONFIG_INET=y
3CONFIG_IPV6=y
4CONFIG_IP_SCTP=y
diff --git a/recipes-kernel/linux/files/cfg/00052-gpio_pcf857x.cfg b/recipes-kernel/linux/files/cfg/00052-gpio_pcf857x.cfg
new file mode 100644
index 0000000..a2000ec
--- /dev/null
+++ b/recipes-kernel/linux/files/cfg/00052-gpio_pcf857x.cfg
@@ -0,0 +1 @@
CONFIG_GPIO_PCF857X=y
diff --git a/recipes-kernel/linux/files/cfg/00053-nfsdv3.cfg b/recipes-kernel/linux/files/cfg/00053-nfsdv3.cfg
new file mode 100644
index 0000000..54acbe6
--- /dev/null
+++ b/recipes-kernel/linux/files/cfg/00053-nfsdv3.cfg
@@ -0,0 +1,2 @@
1CONFIG_NFSD_V3=y
2CONFIG_NFSD=y
diff --git a/recipes-kernel/linux/files/cfg/00054-nls_cp437.cfg b/recipes-kernel/linux/files/cfg/00054-nls_cp437.cfg
new file mode 100644
index 0000000..1cfb4b4
--- /dev/null
+++ b/recipes-kernel/linux/files/cfg/00054-nls_cp437.cfg
@@ -0,0 +1,3 @@
1CONFIG_VFAT_FS=y
2CONFIG_FAT_DEFAULT_CODEPAGE=437
3CONFIG_NLS_CODEPAGE_437=m
diff --git a/recipes-kernel/linux/files/cfg/00055-openvswitch.cfg b/recipes-kernel/linux/files/cfg/00055-openvswitch.cfg
new file mode 100644
index 0000000..a8853e8
--- /dev/null
+++ b/recipes-kernel/linux/files/cfg/00055-openvswitch.cfg
@@ -0,0 +1,7 @@
1CONFIG_NET=y
2CONFIG_INET=y
3CONFIG_OPENVSWITCH=y
4CONFIG_NET_IPGRE_DEMUX=y
5CONFIG_OPENVSWITCH_GRE=y
6CONFIG_VXLAN=y
7CONFIG_OPENVSWITCH_VXLAN=y
diff --git a/recipes-kernel/linux/files/cfg/00056-uio_fsl_srio.cfg b/recipes-kernel/linux/files/cfg/00056-uio_fsl_srio.cfg
new file mode 100644
index 0000000..1d9e6ca
--- /dev/null
+++ b/recipes-kernel/linux/files/cfg/00056-uio_fsl_srio.cfg
@@ -0,0 +1,4 @@
1# CONFIG_RAPIDIO is not set
2CONFIG_UIO_FSL_SRIO=y
3# CONFIG_FSL_DMA is not set
4CONFIG_UIO_FSL_DMA=y
diff --git a/recipes-kernel/linux/files/dts/p2041rdb-usdpaa-enea.dts b/recipes-kernel/linux/files/dts/p2041rdb-usdpaa-enea.dts
new file mode 100644
index 0000000..e0d2ff4
--- /dev/null
+++ b/recipes-kernel/linux/files/dts/p2041rdb-usdpaa-enea.dts
@@ -0,0 +1,109 @@
1/*
2 * P2041RDB Device Tree Source
3 *
4 * Copyright 2011-2012 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35/include/ "p2041rdb.dts"
36
37/ {
38 /* NB: "bpool-ethernet-seeds" is not set to avoid buffer seeding,
39 * because apps seed these pools with buffers allocated at
40 * run-time.
41 * HOWEVER, the kernel driver requires the buffer-size so
42 * "fsl,bpool-ethernet-cfg" is set. It also mis-interprets
43 * things if the base-address is zero (hence the 0xdeadbeef
44 * values).
45 */
46 bp7: buffer-pool@7 {
47 compatible = "fsl,p2041-bpool", "fsl,bpool";
48 fsl,bpid = <7>;
49 fsl,bpool-ethernet-cfg = <0 0 0 192 0 0xdeadbeef>;
50 fsl,bpool-thresholds = <0x400 0xc00 0x0 0x0>;
51 };
52 bp8: buffer-pool@8 {
53 compatible = "fsl,p2041-bpool", "fsl,bpool";
54 fsl,bpid = <8>;
55 fsl,bpool-ethernet-cfg = <0 0 0 576 0 0xabbaf00d>;
56 fsl,bpool-thresholds = <0x100 0x300 0x0 0x0>;
57 };
58 bp9: buffer-pool@9 {
59 compatible = "fsl,p2041-bpool", "fsl,bpool";
60 fsl,bpid = <9>;
61 fsl,bpool-ethernet-cfg = <0 0 0 1728 0 0xfeedabba>;
62 fsl,bpool-thresholds = <0x100 0x300 0x0 0x0>;
63 };
64
65 fsl,dpaa {
66
67 /* ethernet@0 will be used as a normal Linux ethernet that
68 * interfaces to the kernel network stack. All others will be
69 * dedicated for use by usdpaa */
70
71 ethernet@1 {
72 compatible = "fsl,p2041-dpa-ethernet-init", "fsl,dpa-ethernet-init";
73 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
74 fsl,qman-frame-queues-rx = <0x52 1 0x53 1>;
75 fsl,qman-frame-queues-tx = <0x72 1 0x73 1>;
76 };
77 ethernet@2 {
78 compatible = "fsl,p2041-dpa-ethernet-init", "fsl,dpa-ethernet-init";
79 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
80 fsl,qman-frame-queues-rx = <0x54 1 0x55 1>;
81 fsl,qman-frame-queues-tx = <0x74 1 0x75 1>;
82 };
83 ethernet@3 {
84 compatible = "fsl,p2041-dpa-ethernet-init", "fsl,dpa-ethernet-init";
85 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
86 fsl,qman-frame-queues-rx = <0x56 1 0x57 1>;
87 fsl,qman-frame-queues-tx = <0x76 1 0x77 1>;
88 };
89 ethernet@4 {
90 compatible = "fsl,p2041-dpa-ethernet-init", "fsl,dpa-ethernet-init";
91 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
92 fsl,qman-frame-queues-rx = <0x58 1 0x59 1>;
93 fsl,qman-frame-queues-tx = <0x78 1 0x79 1>;
94 };
95 ethernet@5 {
96 compatible = "fsl,p2041-dpa-ethernet-init", "fsl,dpa-ethernet-init";
97 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
98 fsl,qman-frame-queues-rx = <0x5a 1 0x5b 1>;
99 fsl,qman-frame-queues-tx = <0x7a 1 0x7b 1>;
100 };
101 dpa-fman0-oh@1 {
102 compatible = "fsl,dpa-oh";
103 /* Define frame queues for the OH port*/
104 /* <OH Rx error, OH Rx default> */
105 fsl,qman-frame-queues-oh = <0x68 1 0x69 1>;
106 fsl,fman-oh-port = <&fman0_oh1>;
107 };
108 };
109};
diff --git a/recipes-kernel/linux/files/dts/p3041ds-usdpaa-enea.dts b/recipes-kernel/linux/files/dts/p3041ds-usdpaa-enea.dts
new file mode 100644
index 0000000..2930da6
--- /dev/null
+++ b/recipes-kernel/linux/files/dts/p3041ds-usdpaa-enea.dts
@@ -0,0 +1,123 @@
1/*
2 * P3041DS Device Tree Source
3 *
4 * Copyright 2010-2012 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35/include/ "p3041ds.dts"
36
37/ {
38 /* NB: "bpool-ethernet-seeds" is not set to avoid buffer seeding,
39 * because apps seed these pools with buffers allocated at
40 * run-time.
41 * HOWEVER, the kernel driver requires the buffer-size so
42 * "fsl,bpool-ethernet-cfg" is set. It also mis-interprets
43 * things if the base-address is zero (hence the 0xdeadbeef
44 * values).
45 */
46 bp7: buffer-pool@7 {
47 compatible = "fsl,p3041-bpool", "fsl,bpool";
48 fsl,bpid = <7>;
49 fsl,bpool-ethernet-cfg = <0 0 0 192 0 0xdeadbeef>;
50 fsl,bpool-thresholds = <0x400 0xc00 0x0 0x0>;
51 };
52 bp8: buffer-pool@8 {
53 compatible = "fsl,p3041-bpool", "fsl,bpool";
54 fsl,bpid = <8>;
55 fsl,bpool-ethernet-cfg = <0 0 0 576 0 0xabbaf00d>;
56 fsl,bpool-thresholds = <0x100 0x300 0x0 0x0>;
57 };
58 bp9: buffer-pool@9 {
59 compatible = "fsl,p3041-bpool", "fsl,bpool";
60 fsl,bpid = <9>;
61 fsl,bpool-ethernet-cfg = <0 0 0 1728 0 0xfeedabba>;
62 fsl,bpool-thresholds = <0x100 0x300 0x0 0x0>;
63 };
64 bp10: buffer-pool@10 {
65 compatible = "fsl,p3041-bpool", "fsl,bpool";
66 fsl,bpid = <10>;
67 fsl,bpool-thresholds = <0x10 0x30 0x0 0x0>;
68 };
69 bp11: buffer-pool@11 {
70 compatible = "fsl,p3041-bpool", "fsl,bpool";
71 fsl,bpid = <11>;
72 fsl,bpool-thresholds = <0x100 0x300 0x0 0x0>;
73 };
74 bp12: buffer-pool@12 {
75 compatible = "fsl,p3041-bpool", "fsl,bpool";
76 fsl,bpid = <12>;
77 fsl,bpool-thresholds = <0x100 0x300 0x0 0x0>;
78 };
79
80 fsl,dpaa {
81 ethernet@0 {
82 compatible = "fsl,p3041-dpa-ethernet-init", "fsl,dpa-ethernet-init";
83 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
84 fsl,qman-frame-queues-rx = <0x50 1 0x51 1>;
85 fsl,qman-frame-queues-tx = <0x70 1 0x71 1>;
86 };
87
88 ethernet@1 {
89 compatible = "fsl,p3041-dpa-ethernet-init", "fsl,dpa-ethernet-init";
90 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
91 fsl,qman-frame-queues-rx = <0x52 1 0x53 1>;
92 fsl,qman-frame-queues-tx = <0x72 1 0x73 1>;
93 };
94 ethernet@2 {
95 compatible = "fsl,p3041-dpa-ethernet-init", "fsl,dpa-ethernet-init";
96 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
97 fsl,qman-frame-queues-rx = <0x54 1 0x55 1>;
98 fsl,qman-frame-queues-tx = <0x74 1 0x75 1>;
99 };
100 ethernet@3 {
101 compatible = "fsl,p3041-dpa-ethernet-init", "fsl,dpa-ethernet-init";
102 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
103 fsl,qman-frame-queues-rx = <0x56 1 0x57 1>;
104 fsl,qman-frame-queues-tx = <0x76 1 0x77 1>;
105 };
106 /* ethernet@4 will be used as a normal Linux ethernet that
107 * interfaces to the kernel network stack. All others will be
108 * dedicated for use by usdpaa */
109 ethernet@5 {
110 compatible = "fsl,p3041-dpa-ethernet-init", "fsl,dpa-ethernet-init";
111 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
112 fsl,qman-frame-queues-rx = <0x5a 1 0x5b 1>;
113 fsl,qman-frame-queues-tx = <0x7a 1 0x7b 1>;
114 };
115 dpa-fman0-oh@1 {
116 compatible = "fsl,dpa-oh";
117 /* Define frame queues for the OH port*/
118 /* <OH Rx error, OH Rx default> */
119 fsl,qman-frame-queues-oh = <0x68 1 0x69 1>;
120 fsl,fman-oh-port = <&fman0_oh1>;
121 };
122 };
123};
diff --git a/recipes-kernel/linux/files/dts/t4240rdb-usdpaa-enea.dts b/recipes-kernel/linux/files/dts/t4240rdb-usdpaa-enea.dts
new file mode 100644
index 0000000..d267a50
--- /dev/null
+++ b/recipes-kernel/linux/files/dts/t4240rdb-usdpaa-enea.dts
@@ -0,0 +1,207 @@
1/*
2 * T4240RDB USDPAA Device Tree Source
3 *
4 * Copyright 2014 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35/include/ "t4240rdb.dts"
36
37/ {
38 /* NB: "bpool-ethernet-seeds" is not set to avoid buffer seeding,
39 * because apps seed these pools with buffers allocated at
40 * run-time.
41 * HOWEVER, the kernel driver requires the buffer-size so
42 * "fsl,bpool-ethernet-cfg" is set. It also mis-interprets
43 * things if the base-address is zero (hence the 0xdeadbeef
44 * values).
45 */
46 bp7: buffer-pool@7 {
47 compatible = "fsl,t4240-bpool", "fsl,bpool";
48 fsl,bpid = <7>;
49 fsl,bpool-ethernet-cfg = <0 0 0 192 0 0xdeadbeef>;
50 fsl,bpool-thresholds = <0x400 0xc00 0x0 0x0>;
51 };
52 bp8: buffer-pool@8 {
53 compatible = "fsl,t4240-bpool", "fsl,bpool";
54 fsl,bpid = <8>;
55 fsl,bpool-ethernet-cfg = <0 0 0 576 0 0xabbaf00d>;
56 fsl,bpool-thresholds = <0x100 0x300 0x0 0x0>;
57 };
58 bp9: buffer-pool@9 {
59 compatible = "fsl,t4240-bpool", "fsl,bpool";
60 fsl,bpid = <9>;
61 fsl,bpool-ethernet-cfg = <0 0 0 1728 0 0xfeedabba>;
62 fsl,bpool-thresholds = <0x100 0x300 0x0 0x0>;
63 };
64
65 bp10: buffer-pool@10 {
66 compatible = "fsl,t4240-bpool", "fsl,bpool";
67 fsl,bpid = <10>;
68 fsl,bpool-thresholds = <0x10 0x30 0x0 0x0>;
69 };
70 bp11: buffer-pool@11 {
71 compatible = "fsl,t4240-bpool", "fsl,bpool";
72 fsl,bpid = <11>;
73 fsl,bpool-thresholds = <0x100 0x300 0x0 0x0>;
74 };
75 bp12: buffer-pool@12 {
76 compatible = "fsl,t4240-bpool", "fsl,bpool";
77 fsl,bpid = <12>;
78 fsl,bpool-thresholds = <0x100 0x300 0x0 0x0>;
79 };
80 bp13: buffer-pool@13 {
81 compatible = "fsl,t4240-bpool", "fsl,bpool", "fsl,bpool-ethernet-seeds";
82 fsl,bpid = <13>;
83 fsl,bpool-ethernet-cfg = <0 2048 0 1728 0 0>;
84 fsl,bpool-thresholds = <0x100 0x300 0x0 0x0>;
85 };
86
87 chosen {
88 dpaa-extended-args {
89 fman0-extd-args {
90 cell-index = <0x0>;
91 compatible = "fsl,fman-extended-args";
92 dma-aid-mode = "port";
93 fman0_oh3-extd-args {
94 cell-index = <0x2>;
95 compatible = "fsl,fman-port-op-extended-args";
96 vsp-window = <0x8 0x0>;
97 };
98 fman0_oh4-extd-args {
99 cell-index = <0x3>;
100 compatible = "fsl,fman-port-op-extended-args";
101 vsp-window = <0x8 0x0>;
102 };
103 };
104 };
105 };
106
107 fsl,dpaa {
108
109 /* ethernet@0 will be used as a normal Linux ethernet that
110 * interfaces to the kernel network stack. All others will be
111 * dedicated for use by usdpaa */
112
113 ethernet@1 {
114 compatible = "fsl,t4240-dpa-ethernet-init", "fsl,dpa-ethernet-init";
115 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
116 fsl,qman-frame-queues-rx = <0x52 1 0x53 1>;
117 fsl,qman-frame-queues-tx = <0x72 1 0x73 1>;
118 };
119 ethernet@2 {
120 compatible = "fsl,t4240-dpa-ethernet-init", "fsl,dpa-ethernet-init";
121 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
122 fsl,qman-frame-queues-rx = <0x54 1 0x55 1>;
123 fsl,qman-frame-queues-tx = <0x74 1 0x75 1>;
124 };
125 ethernet@3 {
126 compatible = "fsl,t4240-dpa-ethernet-init", "fsl,dpa-ethernet-init";
127 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
128 fsl,qman-frame-queues-rx = <0x56 1 0x57 1>;
129 fsl,qman-frame-queues-tx = <0x76 1 0x77 1>;
130 };
131 ethernet@6 {
132 compatible = "fsl,t4240-dpa-ethernet-init", "fsl,dpa-ethernet-init";
133 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
134 fsl,qman-frame-queues-rx = <0x5c 1 0x5d 1>;
135 fsl,qman-frame-queues-tx = <0x7c 1 0x7d 1>;
136 };
137 ethernet@7 {
138 compatible = "fsl,t4240-dpa-ethernet-init", "fsl,dpa-ethernet-init";
139 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
140 fsl,qman-frame-queues-rx = <0x5e 1 0x5f 1>;
141 fsl,qman-frame-queues-tx = <0x7e 1 0x7f 1>;
142 };
143 ethernet@8 {
144 compatible = "fsl,t4240-dpa-ethernet-init", "fsl,dpa-ethernet-init";
145 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
146 fsl,qman-frame-queues-rx = <0x60 1 0x61 1>;
147 fsl,qman-frame-queues-tx = <0x80 1 0x81 1>;
148 };
149 ethernet@9 {
150 compatible = "fsl,t4240-dpa-ethernet-init", "fsl,dpa-ethernet-init";
151 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
152 fsl,qman-frame-queues-rx = <0x62 1 0x63 1>;
153 fsl,qman-frame-queues-tx = <0x82 1 0x83 1>;
154 };
155 ethernet@10 {
156 compatible = "fsl,t4240-dpa-ethernet-init", "fsl,dpa-ethernet-init";
157 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
158 fsl,qman-frame-queues-rx = <0x64 1 0x65 1>;
159 fsl,qman-frame-queues-tx = <0x84 1 0x85 1>;
160 };
161 ethernet@11 {
162 compatible = "fsl,t4240-dpa-ethernet-init", "fsl,dpa-ethernet-init";
163 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
164 fsl,qman-frame-queues-rx = <0x66 1 0x67 1>;
165 fsl,qman-frame-queues-tx = <0x86 1 0x87 1>;
166 };
167 ethernet@14 {
168 compatible = "fsl,t4240-dpa-ethernet-init", "fsl,dpa-ethernet-init";
169 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
170 fsl,qman-frame-queues-rx = <0x6c 1 0x6d 1>;
171 fsl,qman-frame-queues-tx = <0x8c 1 0x8d 1>;
172 };
173 ethernet@15 {
174 compatible = "fsl,t4240-dpa-ethernet-init", "fsl,dpa-ethernet-init";
175 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
176 fsl,qman-frame-queues-rx = <0x6e 1 0x6f 1>;
177 fsl,qman-frame-queues-tx = <0x8e 1 0x8f 1>;
178 };
179 ethernet@16 {
180 compatible = "fsl,t4240-dpa-ethernet-generic", "fsl,dpa-ethernet-generic";
181 fsl,qman-frame-queues-tx = <0x92 1>;
182 fsl,oh-ports = <&oh3 &oh4>;
183 local-mac-address = [00 11 22 33 44 66];
184 };
185
186 dpa-fman0-oh@2 {
187 compatible = "fsl,dpa-oh";
188 /* Define frame queues for the OH port*/
189 /* <OH Rx error, OH Rx default> */
190 fsl,qman-frame-queues-oh = <0x90 1 0x91 1>;
191 fsl,fman-oh-port = <&fman0_oh2>;
192 };
193 oh3: dpa-fman0-oh@3 {
194 compatible = "fsl,dpa-oh";
195 fsl,bman-buffer-pools = <&bp13>;
196 fsl,qman-frame-queues-oh = <0x96 1 0x97 1>;
197 fsl,fman-oh-port = <&fman0_oh3>;
198 };
199 oh4: dpa-fman0-oh@4 {
200 compatible = "fsl,dpa-oh";
201 fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
202 fsl,qman-frame-queues-oh = <0x94 1 0x95 1>;
203 fsl,fman-oh-port = <&fman0_oh4>;
204 };
205
206 };
207};
diff --git a/recipes-kernel/linux/files/eCryptfs-CVE-2014-9683.patch b/recipes-kernel/linux/files/eCryptfs-CVE-2014-9683.patch
new file mode 100644
index 0000000..c6517cd
--- /dev/null
+++ b/recipes-kernel/linux/files/eCryptfs-CVE-2014-9683.patch
@@ -0,0 +1,41 @@
1From 8ffea99d6f2be99790611282f326da95a84a8cab Mon Sep 17 00:00:00 2001
2From: Michael Halcrow <mhalcrow@google.com>
3Date: Wed, 26 Nov 2014 09:09:16 -0800
4Subject: eCryptfs: Remove buggy and unnecessary write in file name decode
5 routine
6
7commit 942080643bce061c3dd9d5718d3b745dcb39a8bc upstream.
8
9Dmitry Chernenkov used KASAN to discover that eCryptfs writes past the
10end of the allocated buffer during encrypted filename decoding. This
11fix corrects the issue by getting rid of the unnecessary 0 write when
12the current bit offset is 2.
13
14Fixes CVE-2014-9683.
15Upstream-Status: Backport
16
17Signed-off-by: Michael Halcrow <mhalcrow@google.com>
18Reported-by: Dmitry Chernenkov <dmitryc@google.com>
19Suggested-by: Kees Cook <keescook@chromium.org>
20Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
21Signed-off-by: Jiri Slaby <jslaby@suse.cz>
22Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
23---
24 fs/ecryptfs/crypto.c | 1 -
25 1 file changed, 1 deletion(-)
26
27diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
28index 000eae2..bf926f7a 100644
29--- a/fs/ecryptfs/crypto.c
30+++ b/fs/ecryptfs/crypto.c
31@@ -1917,7 +1917,6 @@ ecryptfs_decode_from_filename(unsigned char *dst, size_t *dst_size,
32 break;
33 case 2:
34 dst[dst_byte_offset++] |= (src_byte);
35- dst[dst_byte_offset] = 0;
36 current_bit_offset = 0;
37 break;
38 }
39--
40cgit v0.11.2
41
diff --git a/recipes-kernel/linux/files/include_pca9672_io_in_dts.patch b/recipes-kernel/linux/files/include_pca9672_io_in_dts.patch
new file mode 100644
index 0000000..c9b6ad1
--- /dev/null
+++ b/recipes-kernel/linux/files/include_pca9672_io_in_dts.patch
@@ -0,0 +1,39 @@
1From 24ca30b26943cb92bf613ed8bab37f6f4f61ed7c Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Nora=20Bj=C3=B6rklund?= <nora.bjorklund@enea.com>
3Date: Mon, 9 Nov 2015 14:44:34 +0100
4Subject: [PATCH][PATCHv1 1/1] powerpc: Add missing I/O expander to
5 p2041rdb.dts
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10A gpio expander called pca9672 is connected to a i2c bus on
11p2041rdb. This commit adds the i2c bus and the gpio-expander
12to the device-tree.
13
14Signed-off-by: Nora Björklund <nora.bjorklund@enea.com>
15---
16 arch/powerpc/boot/dts/p2041rdb.dts | 7 +++++++
17 1 file changed, 7 insertions(+)
18
19diff --git a/arch/powerpc/boot/dts/p2041rdb.dts b/arch/powerpc/boot/dts/p2041rdb.dts
20index e9bd894..b1ee561 100644
21--- a/arch/powerpc/boot/dts/p2041rdb.dts
22+++ b/arch/powerpc/boot/dts/p2041rdb.dts
23@@ -134,6 +134,13 @@
24 };
25 };
26
27+ i2c@119100 {
28+ gpio@22 {
29+ compatible = "nxp,pca9672";
30+ reg = <0x22>;
31+ };
32+ };
33+
34 usb1: usb@211000 {
35 dr_mode = "host";
36 };
37--
381.9.1
39
diff --git a/recipes-kernel/linux/files/keys-CVE-2014-9529-3.12-kernel.patch b/recipes-kernel/linux/files/keys-CVE-2014-9529-3.12-kernel.patch
new file mode 100644
index 0000000..50532b3
--- /dev/null
+++ b/recipes-kernel/linux/files/keys-CVE-2014-9529-3.12-kernel.patch
@@ -0,0 +1,52 @@
1From 1bb0aca1e0881dfd34a6f39fd44e1e995fc302a1 Mon Sep 17 00:00:00 2001
2From: Sasha Levin <sasha.levin@oracle.com>
3Date: Mon, 29 Dec 2014 09:39:01 -0500
4Subject: KEYS: close race between key lookup and freeing
5
6commit a3a8784454692dd72e5d5d34dcdab17b4420e74c upstream.
7
8When a key is being garbage collected, it's key->user would get put before
9the ->destroy() callback is called, where the key is removed from it's
10respective tracking structures.
11
12This leaves a key hanging in a semi-invalid state which leaves a window open
13for a different task to try an access key->user. An example is
14find_keyring_by_name() which would dereference key->user for a key that is
15in the process of being garbage collected (where key->user was freed but
16->destroy() wasn't called yet - so it's still present in the linked list).
17
18This would cause either a panic, or corrupt memory.
19
20Fixes CVE-2014-9529.
21Upstream-Status: Backport
22
23Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
24Signed-off-by: David Howells <dhowells@redhat.com>
25Signed-off-by: Jiri Slaby <jslaby@suse.cz>
26Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
27---
28 security/keys/gc.c | 4 ++--
29 1 file changed, 2 insertions(+), 2 deletions(-)
30
31diff --git a/security/keys/gc.c b/security/keys/gc.c
32index d67c97b..7978186 100644
33--- a/security/keys/gc.c
34+++ b/security/keys/gc.c
35@@ -201,12 +201,12 @@ static noinline void key_gc_unused_keys(struct list_head *keys)
36 if (test_bit(KEY_FLAG_INSTANTIATED, &key->flags))
37 atomic_dec(&key->user->nikeys);
38
39- key_user_put(key->user);
40-
41 /* now throw away the key memory */
42 if (key->type->destroy)
43 key->type->destroy(key);
44
45+ key_user_put(key->user);
46+
47 kfree(key->description);
48
49 #ifdef KEY_DEBUGGING
50--
51cgit v0.11.2
52
diff --git a/recipes-kernel/linux/files/netfilter-CVE-2014-8160-3.12-kernel.patch b/recipes-kernel/linux/files/netfilter-CVE-2014-8160-3.12-kernel.patch
new file mode 100644
index 0000000..9195142
--- /dev/null
+++ b/recipes-kernel/linux/files/netfilter-CVE-2014-8160-3.12-kernel.patch
@@ -0,0 +1,98 @@
1From 2fb11da9d9016f6c0a4fcb99b8ebd63495c79005 Mon Sep 17 00:00:00 2001
2From: Florian Westphal <fw@strlen.de>
3Date: Fri, 26 Sep 2014 11:35:42 +0200
4Subject: netfilter: conntrack: disable generic tracking for known protocols
5
6commit db29a9508a9246e77087c5531e45b2c88ec6988b upstream.
7
8Given following iptables ruleset:
9
10-P FORWARD DROP
11-A FORWARD -m sctp --dport 9 -j ACCEPT
12-A FORWARD -p tcp --dport 80 -j ACCEPT
13-A FORWARD -p tcp -m conntrack -m state ESTABLISHED,RELATED -j ACCEPT
14
15One would assume that this allows SCTP on port 9 and TCP on port 80.
16Unfortunately, if the SCTP conntrack module is not loaded, this allows
17*all* SCTP communication, to pass though, i.e. -p sctp -j ACCEPT,
18which we think is a security issue.
19
20This is because on the first SCTP packet on port 9, we create a dummy
21"generic l4" conntrack entry without any port information (since
22conntrack doesn't know how to extract this information).
23
24All subsequent packets that are unknown will then be in established
25state since they will fallback to proto_generic and will match the
26'generic' entry.
27
28Our originally proposed version [1] completely disabled generic protocol
29tracking, but Jozsef suggests to not track protocols for which a more
30suitable helper is available, hence we now mitigate the issue for in
31tree known ct protocol helpers only, so that at least NAT and direction
32information will still be preserved for others.
33
34 [1] http://www.spinics.net/lists/netfilter-devel/msg33430.html
35
36Joint work with Daniel Borkmann.
37
38Fixes CVE-2014-8160.
39Upstream-Status: Backport
40
41Signed-off-by: Florian Westphal <fw@strlen.de>
42Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
43Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
44Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
45Signed-off-by: Zhiqiang Zhang <zhangzhiqiang.zhang@huawei.com>
46Signed-off-by: Jiri Slaby <jslaby@suse.cz>
47Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
48---
49 net/netfilter/nf_conntrack_proto_generic.c | 26 +++++++++++++++++++++++++-
50 1 file changed, 25 insertions(+), 1 deletion(-)
51
52diff --git a/net/netfilter/nf_conntrack_proto_generic.c b/net/netfilter/nf_conntrack_proto_generic.c
53index d25f293..957c1db 100644
54--- a/net/netfilter/nf_conntrack_proto_generic.c
55+++ b/net/netfilter/nf_conntrack_proto_generic.c
56@@ -14,6 +14,30 @@
57
58 static unsigned int nf_ct_generic_timeout __read_mostly = 600*HZ;
59
60+static bool nf_generic_should_process(u8 proto)
61+{
62+ switch (proto) {
63+#ifdef CONFIG_NF_CT_PROTO_SCTP_MODULE
64+ case IPPROTO_SCTP:
65+ return false;
66+#endif
67+#ifdef CONFIG_NF_CT_PROTO_DCCP_MODULE
68+ case IPPROTO_DCCP:
69+ return false;
70+#endif
71+#ifdef CONFIG_NF_CT_PROTO_GRE_MODULE
72+ case IPPROTO_GRE:
73+ return false;
74+#endif
75+#ifdef CONFIG_NF_CT_PROTO_UDPLITE_MODULE
76+ case IPPROTO_UDPLITE:
77+ return false;
78+#endif
79+ default:
80+ return true;
81+ }
82+}
83+
84 static inline struct nf_generic_net *generic_pernet(struct net *net)
85 {
86 return &net->ct.nf_ct_proto.generic;
87@@ -67,7 +91,7 @@ static int generic_packet(struct nf_conn *ct,
88 static bool generic_new(struct nf_conn *ct, const struct sk_buff *skb,
89 unsigned int dataoff, unsigned int *timeouts)
90 {
91- return true;
92+ return nf_generic_should_process(nf_ct_protonum(ct));
93 }
94
95 #if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
96--
97cgit v0.11.2
98
diff --git a/recipes-kernel/linux/files/netfilter-CVE-2014-9715.patch b/recipes-kernel/linux/files/netfilter-CVE-2014-9715.patch
new file mode 100644
index 0000000..02ed1c8
--- /dev/null
+++ b/recipes-kernel/linux/files/netfilter-CVE-2014-9715.patch
@@ -0,0 +1,60 @@
1From 62c97a8612f753ffa6c5c7bebe140cc0951e539f Mon Sep 17 00:00:00 2001
2From: Andrey Vagin <avagin@openvz.org>
3Date: Fri, 28 Mar 2014 13:54:32 +0400
4Subject: netfilter: nf_conntrack: reserve two bytes for nf_ct_ext->len
5
6commit 223b02d923ecd7c84cf9780bb3686f455d279279 upstream.
7
8"len" contains sizeof(nf_ct_ext) and size of extensions. In a worst
9case it can contain all extensions. Bellow you can find sizes for all
10types of extensions. Their sum is definitely bigger than 256.
11
12nf_ct_ext_types[0]->len = 24
13nf_ct_ext_types[1]->len = 32
14nf_ct_ext_types[2]->len = 24
15nf_ct_ext_types[3]->len = 32
16nf_ct_ext_types[4]->len = 152
17nf_ct_ext_types[5]->len = 2
18nf_ct_ext_types[6]->len = 16
19nf_ct_ext_types[7]->len = 8
20
21I have seen "len" up to 280 and my host has crashes w/o this patch.
22
23The right way to fix this problem is reducing the size of the ecache
24extension (4) and Florian is going to do this, but these changes will
25be quite large to be appropriate for a stable tree.
26
27Fixes CVE-2014-9715.
28Upstream-Status: Backport
29
30Fixes: 5b423f6a40a0 (netfilter: nf_conntrack: fix racy timer handling with reliable)
31Cc: Pablo Neira Ayuso <pablo@netfilter.org>
32Cc: Patrick McHardy <kaber@trash.net>
33Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
34Cc: "David S. Miller" <davem@davemloft.net>
35Signed-off-by: Andrey Vagin <avagin@openvz.org>
36Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
37Signed-off-by: Jiri Slaby <jslaby@suse.cz>
38Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
39---
40 include/net/netfilter/nf_conntrack_extend.h | 4 ++--
41 1 file changed, 2 insertions(+), 2 deletions(-)
42
43diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h
44index 88a1d40..8887722 100644
45--- a/include/net/netfilter/nf_conntrack_extend.h
46+++ b/include/net/netfilter/nf_conntrack_extend.h
47@@ -47,8 +47,8 @@ enum nf_ct_ext_id {
48 /* Extensions: optional stuff which isn't permanently in struct. */
49 struct nf_ct_ext {
50 struct rcu_head rcu;
51- u8 offset[NF_CT_EXT_NUM];
52- u8 len;
53+ u16 offset[NF_CT_EXT_NUM];
54+ u16 len;
55 char data[0];
56 };
57
58--
59cgit v0.11.2
60
diff --git a/recipes-kernel/linux/files/splice-CVE-2014-7822-3.12-kernel.patch b/recipes-kernel/linux/files/splice-CVE-2014-7822-3.12-kernel.patch
new file mode 100644
index 0000000..c4ea032
--- /dev/null
+++ b/recipes-kernel/linux/files/splice-CVE-2014-7822-3.12-kernel.patch
@@ -0,0 +1,77 @@
1From d7e3ae47c441894b11dce376ff8d110780872d0d Mon Sep 17 00:00:00 2001
2From: Ben Hutchings <ben@decadent.org.uk>
3Date: Thu, 29 Jan 2015 02:50:33 +0000
4Subject: splice: Apply generic position and size checks to each write
5
6We need to check the position and size of file writes against various
7limits, using generic_write_check(). This was not being done for
8the splice write path. It was fixed upstream by commit 8d0207652cbe
9("->splice_write() via ->write_iter()") but we can't apply that.
10
11CVE-2014-7822
12Upstream-Status: Backport
13
14Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
15[ kamal: port to 3.13-stable: context ]
16Signed-off-by: Kamal Mostafa <kamal@canonical.com>
17Signed-off-by: Jiri Slaby <jslaby@suse.cz>
18Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
19---
20 fs/ocfs2/file.c | 8 ++++++--
21 fs/splice.c | 8 ++++++--
22 2 files changed, 12 insertions(+), 4 deletions(-)
23
24diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
25index cc6e925..8add05c 100644
26--- a/fs/ocfs2/file.c
27+++ b/fs/ocfs2/file.c
28@@ -2448,9 +2448,7 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe,
29 struct address_space *mapping = out->f_mapping;
30 struct inode *inode = mapping->host;
31 struct splice_desc sd = {
32- .total_len = len,
33 .flags = flags,
34- .pos = *ppos,
35 .u.file = out,
36 };
37
38@@ -2460,6 +2458,12 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe,
39 out->f_path.dentry->d_name.len,
40 out->f_path.dentry->d_name.name, len);
41
42+ ret = generic_write_checks(out, ppos, &len, 0);
43+ if (ret)
44+ return ret;
45+ sd.total_len = len;
46+ sd.pos = *ppos;
47+
48 pipe_lock(pipe);
49
50 splice_from_pipe_begin(&sd);
51diff --git a/fs/splice.c b/fs/splice.c
52index 84f810d..c915e21 100644
53--- a/fs/splice.c
54+++ b/fs/splice.c
55@@ -1012,13 +1012,17 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
56 struct address_space *mapping = out->f_mapping;
57 struct inode *inode = mapping->host;
58 struct splice_desc sd = {
59- .total_len = len,
60 .flags = flags,
61- .pos = *ppos,
62 .u.file = out,
63 };
64 ssize_t ret;
65
66+ ret = generic_write_checks(out, ppos, &len, S_ISBLK(inode->i_mode));
67+ if (ret)
68+ return ret;
69+ sd.total_len = len;
70+ sd.pos = *ppos;
71+
72 pipe_lock(pipe);
73
74 splice_from_pipe_begin(&sd);
75--
76cgit v0.11.2
77
diff --git a/recipes-kernel/linux/linux-qoriq-common.inc b/recipes-kernel/linux/linux-qoriq-common.inc
index 978d7d8..62038e5 100644
--- a/recipes-kernel/linux/linux-qoriq-common.inc
+++ b/recipes-kernel/linux/linux-qoriq-common.inc
@@ -5,7 +5,13 @@ SRC_URI += "file://b4860-hard_irq_disable-bug.patch \
5 file://powerpc-fsl-booke64-Set-vmemmap_psize-to-4K.patch \ 5 file://powerpc-fsl-booke64-Set-vmemmap_psize-to-4K.patch \
6 file://mm-CVE-2014-3122.patch \ 6 file://mm-CVE-2014-3122.patch \
7 file://IB-uverbs-CVE-2014-8159.patch \ 7 file://IB-uverbs-CVE-2014-8159.patch \
8 file://netfilter-CVE-2014-8160-3.12-kernel.patch \
8 file://media-ttusb-dec-CVE-2014-8884.patch \ 9 file://media-ttusb-dec-CVE-2014-8884.patch \
10 file://splice-CVE-2014-7822-3.12-kernel.patch \
11 file://CVE-2014-7825-CVE-2014-7826.patch \
12 file://keys-CVE-2014-9529-3.12-kernel.patch \
13 file://eCryptfs-CVE-2014-9683.patch \
14 file://netfilter-CVE-2014-9715.patch \
9 file://net-sctp-CVE-2015-1421.patch \ 15 file://net-sctp-CVE-2015-1421.patch \
10 " 16 "
11 17
@@ -29,9 +35,23 @@ SRC_URI += "file://cfg/00013-localversion.cfg \
29 file://cfg/00004-systemtap.cfg \ 35 file://cfg/00004-systemtap.cfg \
30 file://cfg/00014-kgdb.cfg \ 36 file://cfg/00014-kgdb.cfg \
31 file://cfg/00049-gpio.cfg \ 37 file://cfg/00049-gpio.cfg \
38 file://cfg/00051-sctp.cfg \
39 file://cfg/00044-numa.cfg \
40 file://cfg/00053-nfsdv3.cfg \
41 file://cfg/00050-nfsdv4.cfg \
42 file://cfg/00054-nls_cp437.cfg \
43 file://cfg/00055-openvswitch.cfg \
44 file://cfg/00056-uio_fsl_srio.cfg \
32 " 45 "
33 46
34STAGING_KERNEL_FEATURES="\ 47SRC_URI_append_p2041rdb = " file://include_pca9672_io_in_dts.patch \
48 file://cfg/00052-gpio_pcf857x.cfg"
49
50SRC_URI_append_t4240rdb-64b = " file://dts/t4240rdb-usdpaa-enea.dts"
51SRC_URI_append_p2041rdb = " file://dts/p2041rdb-usdpaa-enea.dts"
52SRC_URI_append_p3041ds = " file://dts/p3041ds-usdpaa-enea.dts"
53
54STAGING_KERNEL_FEATURES += "\
35 cfg/00013-localversion.cfg \ 55 cfg/00013-localversion.cfg \
36 cfg/00006-with_modules.cfg \ 56 cfg/00006-with_modules.cfg \
37 cfg/00001-embedded.cfg \ 57 cfg/00001-embedded.cfg \
@@ -44,9 +64,15 @@ STAGING_KERNEL_FEATURES="\
44 cfg/00026-ltp.cfg \ 64 cfg/00026-ltp.cfg \
45 cfg/00003-fuse.cfg \ 65 cfg/00003-fuse.cfg \
46 cfg/00034-cpusets.cfg \ 66 cfg/00034-cpusets.cfg \
67 cfg/00044-numa.cfg \
68 cfg/00054-nls_cp437.cfg \
47 " 69 "
48 70
49STAGING_KERNEL_FEATURES_append_p2020rdb="cfg/00015-uio.cfg" 71STAGING_KERNEL_FEATURES_append_p2020rdb = " \
72 cfg/00015-uio.cfg \
73 "
74
75STAGING_KERNEL_FEATURES_remove_t4240rdb-64b = "cfg/00044-numa.cfg"
50 76
51DELTA_KERNEL_DEFCONFIG += " ${STAGING_KERNEL_FEATURES} \ 77DELTA_KERNEL_DEFCONFIG += " ${STAGING_KERNEL_FEATURES} \
52 cfg/00032-dpa.cfg \ 78 cfg/00032-dpa.cfg \
@@ -57,7 +83,29 @@ DELTA_KERNEL_DEFCONFIG += " ${STAGING_KERNEL_FEATURES} \
57 cfg/00004-systemtap.cfg \ 83 cfg/00004-systemtap.cfg \
58 cfg/00014-kgdb.cfg \ 84 cfg/00014-kgdb.cfg \
59 cfg/00049-gpio.cfg \ 85 cfg/00049-gpio.cfg \
86 cfg/00053-nfsdv3.cfg \
87 cfg/00050-nfsdv4.cfg \
88 cfg/00055-openvswitch.cfg \
89 cfg/00056-uio_fsl_srio.cfg \
60 " 90 "
61 91
92DELTA_KERNEL_DEFCONFIG_append_p2041rdb = " cfg/00052-gpio_pcf857x.cfg"
93
94KERNEL_DEVICETREE_append_t4240rdb-64b = " t4240rdb-usdpaa-enea.dtb"
95KERNEL_DEVICETREE_append_p2041rdb = " p2041rdb-usdpaa-enea.dtb"
96KERNEL_DEVICETREE_append_p3041ds = " p3041ds-usdpaa-enea.dtb"
97
98do_configure_prepend_t4240rdb-64b() {
99 cp ${WORKDIR}/dts/t4240rdb-usdpaa-enea.dts ${S}/arch/powerpc/boot/dts/
100}
101
102do_configure_prepend_p2041rdb() {
103 cp ${WORKDIR}/dts/p2041rdb-usdpaa-enea.dts ${S}/arch/powerpc/boot/dts/
104}
105
106do_configure_prepend_p3041ds() {
107 cp ${WORKDIR}/dts/p3041ds-usdpaa-enea.dts ${S}/arch/powerpc/boot/dts/
108}
109
62require recipes-kernel/linux/staging-kernel.inc 110require recipes-kernel/linux/staging-kernel.inc
63require recipes-kernel/linux/pramfs-3.12.inc 111require recipes-kernel/linux/pramfs-3.12.inc
diff --git a/recipes-test/benchtest-runner/benchtest-runner.bb b/recipes-test/benchtest-runner/benchtest-runner.bb
deleted file mode 100644
index 864fb94..0000000
--- a/recipes-test/benchtest-runner/benchtest-runner.bb
+++ /dev/null
@@ -1,23 +0,0 @@
1
2LICENSE = "BSD"
3LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
4DESCRIPTION = "Execute all benchmark scripts in current directory"
5INHIBIT_DEFAULT_DEPS = "1"
6
7SRC_URI = "file://benchtest-runner \
8 "
9
10BTEST_PATH = "${libdir}/${PN}"
11
12FILES_${PN} = "${bindir}/benchtest-runner \
13 ${BTEST_PATH}"
14
15do_install () {
16 install -D ${WORKDIR}/benchtest-runner ${D}${bindir}/benchtest-runner
17 install -d ${D}${BTEST_PATH}/tests
18}
19
20do_patch[noexec] = "1"
21do_configure[noexec] = "1"
22do_compile[noexec] = "1"
23do_build[noexec] = "1"
diff --git a/recipes-test/benchtest-runner/files/benchtest-runner b/recipes-test/benchtest-runner/files/benchtest-runner
deleted file mode 100644
index 5681d58..0000000
--- a/recipes-test/benchtest-runner/files/benchtest-runner
+++ /dev/null
@@ -1,24 +0,0 @@
1#!/bin/sh
2
3if [ -d /usr/lib/benchtest-runner/tests ]; then
4 cd /usr/lib/benchtest-runner/tests
5elif [ -d /usr/lib32/benchtest-runner/tests ]; then
6 cd /usr/lib32/benchtest-runner/tests
7elif [ -d /usr/lib64/benchtest-runner/tests ]; then
8 cd /usr/lib64/benchtest-runner/tests
9else
10 echo "ERROR: Could not find directory containing benchmark tests"
11 exit 1
12fi
13
14for x in `ls`
15do
16 echo $x
17 if [[ -f $x ]]; then
18 date +%Y-%m-%dT%H:%M
19 echo "BEGIN: $x"
20 ./$x
21 echo "END: $x"
22 date +%Y-%m-%dT%H:%M
23 fi
24done
diff --git a/recipes-test/ddt-runner/ddt-runner.bb b/recipes-test/ddt-runner/ddt-runner.bb
deleted file mode 100644
index 85abb4f..0000000
--- a/recipes-test/ddt-runner/ddt-runner.bb
+++ /dev/null
@@ -1,25 +0,0 @@
1LICENSE = "BSD"
2LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
3DESCRIPTION = "Script to automatize Device Driver Tests"
4INHIBIT_DEFAULT_DEPS = "1"
5
6SRC_URI = "file://ddt-runner \
7 file://scripts"
8
9FILES_${PN} += "${libdir}/${PN}"
10FILES_${PN} += "${bindir}/ddt-runner"
11
12do_install () {
13 install -D ${WORKDIR}/ddt-runner ${D}${bindir}/ddt-runner
14 if [ -d "${WORKDIR}/scripts/${MACHINE}" ]; then
15 install -d ${D}${libdir}/${PN}/scripts
16 for file in ${WORKDIR}/scripts/${MACHINE}/* ; do
17 install $file ${D}${libdir}/${PN}/scripts
18 done
19 fi
20}
21
22do_patch[noexec] = "1"
23do_configure[noexec] = "1"
24do_compile[noexec] = "1"
25do_build[noexec] = "1"
diff --git a/recipes-test/ddt-runner/files/ddt-runner b/recipes-test/ddt-runner/files/ddt-runner
deleted file mode 100644
index 4cf14f6..0000000
--- a/recipes-test/ddt-runner/files/ddt-runner
+++ /dev/null
@@ -1,51 +0,0 @@
1#!/bin/sh
2
3if [[ ! -d "/usr/lib/ddt-runner/scripts" ]]; then
4 echo "SKIP: No available driver testcase"
5 exit
6fi
7
8cd /usr/lib/ddt-runner/scripts
9# 10 minutes until timeout
10timeout=600
11
12# check once "check_freq" second(s) if script ended, in order to
13# start new script, or kill the current if it timedout
14check_freq=1
15
16killrunning () {
17 # get all pids
18 list_of_pids=$(ls /proc | grep [1-9][0-9]*)
19
20 # kill all processes with this process id as process group id, skip this process
21 for proc_id in ${list_of_pids[@]}; do
22 if [ $((proc_id)) -ne $$ ]; then
23 group_id=`cat "/proc/${proc_id}/stat" 2>/dev/null | sed -n '$s/.*) [^ ]* [^ ]* \([^ ]*\).*/\1/p'`
24 if [ $((group_id)) -eq $$ ]; then
25 kill -KILL $proc_id &> /dev/null
26 fi
27 fi
28 done
29}
30
31for x in *
32do
33 if [[ -f $x ]]; then
34 date +%Y-%m-%dT%H:%M
35 echo "BEGIN: $x"
36 ./$x &
37 timer_count=0
38 while [ $? -eq 0 ]; do
39 timer_count=$((timer_count + check_freq))
40 if [ $timer_count -gt $timeout ]; then
41 killrunning
42 echo "FAIL: $x timed out, and it was killed"
43 break
44 fi
45 sleep $check_freq
46 kill -0 $! 2> /dev/null
47 done
48 echo "END: $x"
49 date +%Y-%m-%dT%H:%M
50 fi
51done
diff --git a/recipes-test/ddt-runner/files/scripts/acp3448v2/ethernet b/recipes-test/ddt-runner/files/scripts/acp3448v2/ethernet
deleted file mode 100755
index 10a16b4..0000000
--- a/recipes-test/ddt-runner/files/scripts/acp3448v2/ethernet
+++ /dev/null
@@ -1,97 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test ethernet functionality for acp3448v2.
4#
5
6ethernet_interface="eth0"
7ethernet_ping_ipaddr="172.21.3.22"
8ethernet_ipaddr=$1
9
10IFCONFIG=`which ifconfig`
11
12for((num=0; num<16; num++));
13do
14 ethernet_interface=eth$num
15 $IFCONFIG $ethernet_interface up
16 $IFCONFIG | grep $ethernet_interface
17 if [ $? -eq 0 ]; then
18 echo "PASS: $ethernet_interface is up"
19 break
20 fi
21done
22
23if [ $num -eq 16 ]; then
24 echo "FAIL: $ethernet_interface is not up"
25 exit 1
26fi
27
28if [ "x$ethernet_ipaddr" != "x" ]; then
29 $IFCONFIG $ethernet_interface $ethernet_ipaddr
30fi
31
32$IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}'
33if [ $? -ne 0 ]; then
34 echo "FAIL: ipaddr of $ethernet_interface setup failed"
35 exit 1
36else
37 echo "PASS: ipaddr of $ethernet_interface setup success"
38fi
39
40mindatasize=56
41maxdatasize=650
42stepsize=100
43iteration=1
44datasize=$mindatasize
45logfile=`/bin/mktemp`
46statistics=`/bin/mktemp`
47error=0
48
49trap cleanup SIGHUP SIGINT SIGTERM
50
51clean_tasks() {
52 echo "Executing clean up tasks"
53 rm -f $logfile $statistics
54}
55
56cleanup() {
57 echo "Aborting script execution"
58 clean_tasks
59 exit 0
60}
61
62echo "start ping test for $ethernet_interface..."
63
64while [ $datasize -le $maxdatasize ]; do
65 for i in `seq 1 $iteration`; do
66 ping -c 1 -s $datasize $ethernet_ping_ipaddr > $statistics
67 ping_err=`echo $?`
68 echo "" && cat $statistics | grep -r "PING"
69 cat $statistics | grep -r "received"
70 [ `echo $?` -eq 0 ] || packets_received=0 && \
71 packets_received=`cat $statistics | \
72 grep -r "received" | awk '{print$4}'`
73
74 # Evaluate possible errors on the ping operation
75 if [ $ping_err -ne 0 ] || [ $packets_received -eq 0 ]; then
76 error=1
77 echo -e `cat $statistics | grep -r PING` >> $logfile
78 echo -e "Size: $datasize Iteration: $i\n" >> $logfile
79 fi
80 done
81 let datasize=$datasize+$stepsize
82done
83
84# Report failures
85if [ $error -eq 1 ]; then
86 echo -e "=================== error report ===================\n"
87 cat $logfile
88 echo -e "====================================================\n"
89 clean_tasks
90 echo -e "FAIL: ping test for $ethernet_interface failed\n"
91 exit 1
92else
93 clean_tasks
94 echo -e "PASS: ping test for $ethernet_interface success\n"
95fi
96
97echo "PASS: $ethernet_interface test passed" exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/acp3448v2/flash b/recipes-test/ddt-runner/files/scripts/acp3448v2/flash
deleted file mode 100755
index 30c5d06..0000000
--- a/recipes-test/ddt-runner/files/scripts/acp3448v2/flash
+++ /dev/null
@@ -1,45 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test flash driver function.
4
5if part_num=`cat /proc/mtd | grep -c 'mtd'`; then
6 echo "PASS: show $part_num partitions"
7else
8 echo "FAIL: show $part_num partitions"
9fi
10
11for((part=0; part<$part_num-1; part++));
12do
13 if [ $(mtd_debug info /dev/mtd$part | grep -c 'mtd.type') ]; then
14 echo "PASS: show partition $part debug info"
15 else
16 echo "FAIL: show partition $part debug info"
17 fi
18done
19
20let "test_part=part_num-2"
21
22if [ $(flash_erase -j /dev/mtd${test_part} 0 0 | grep -c '100 % complete') ]; then
23 echo "PASS: erase and format partition ${test_part}"
24else
25 echo "FAIL: erase and format partition ${test_part}"
26fi
27
28mkdir -p /mnt/flash
29mount -t jffs2 /dev/mtdblock${test_part} /mnt/flash
30if [ $? -eq 0 ]; then
31 echo "PASS: mount partition ${test_part} as /mnt/flash"
32else
33 echo "FAIL: mount partition ${test_part} as /mnt/flash"
34fi
35
36cd /mnt/flash
37touch test
38if [ $(ls | grep -c 'test') ]; then
39 echo "PASS: touch a file on partition ${test_part}"
40else
41 echo "FAIL: touch a file on partition ${test_part}"
42fi
43
44cd ~
45umount /mnt/flash
diff --git a/recipes-test/ddt-runner/files/scripts/acp3448v2/pci-express b/recipes-test/ddt-runner/files/scripts/acp3448v2/pci-express
deleted file mode 100755
index b04485f..0000000
--- a/recipes-test/ddt-runner/files/scripts/acp3448v2/pci-express
+++ /dev/null
@@ -1,109 +0,0 @@
1#!/bin/sh
2
3ethernet_interface="eth0"
4ethernet_ping_ipaddr="172.21.3.22"
5ethernet_ipaddr=$1
6
7#Intel Corporation 82574L Gigabit Network Card (intel e1000e)
8vendor_id="8086"
9product_id="10d3"
10
11#find vendor id & product id
12lspci -nn |grep $vendor_id:$product_id
13if [ $? -ne 0 ]; then
14 echo "FAIL: pci-e ethernet card device does not exist"
15 exit 1
16else
17 echo "PASS: got pci-e ethernet card device"
18fi
19
20setpci -v -d $vendor_id:$product_id latency_timer=b0
21if [ $? -ne 0 ]; then
22 echo "FAIL: parameter changes to pci config space failed"
23 exit 1
24else
25 echo "PASS: parameter changes to pci config space success"
26fi
27
28IFCONFIG=`which ifconfig`
29
30$IFCONFIG $ethernet_interface up
31$IFCONFIG | grep $ethernet_interface
32if [ $? -ne 0 ]; then
33 echo "FAIL: pci-e ethernet card device $ethernet_interface is not up"
34 exit 1
35else
36 echo "PASS: pci-e ethernet card device $ethernet_interface is up"
37fi
38
39if [ "x$ethernet_ipaddr" != "x" ]; then
40 $IFCONFIG $ethernet_interface $ethernet_ipaddr
41fi
42
43$IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}'
44if [ $? -ne 0 ]; then
45 echo "FAIL: ipaddr of pci-e ethernet card device $ethernet_interface setup failed"
46 exit 1
47else
48 echo "PASS: ipaddr of pci-e ethernet card device $ethernet_interface setup success"
49fi
50
51mindatasize=56
52maxdatasize=650
53stepsize=100
54iteration=1
55datasize=$mindatasize
56logfile=`/bin/mktemp`
57statistics=`/bin/mktemp`
58error=0
59
60trap cleanup SIGHUP SIGINT SIGTERM
61
62clean_tasks() {
63 echo "Executing clean up tasks"
64 rm -f $logfile $statistics
65}
66
67cleanup() {
68 echo "Aborting script execution"
69 clean_tasks
70 exit 0
71}
72
73echo "start ping test for pci-e ethernet card device $ethernet_interface..."
74
75while [ $datasize -le $maxdatasize ]; do
76 for i in `seq 1 $iteration`; do
77 ping -c 1 -s $datasize $ethernet_ping_ipaddr > $statistics
78 ping_err=`echo $?`
79 echo "" && cat $statistics | grep -r "PING"
80 cat $statistics | grep -r "received"
81 [ `echo $?` -eq 0 ] || packets_received=0 && \
82 packets_received=`cat $statistics | \
83 grep -r "received" | awk '{print$4}'`
84
85 # Evaluate possible errors on the ping operation
86 if [ $ping_err -ne 0 ] || [ $packets_received -eq 0 ]; then
87 error=1
88 echo -e `cat $statistics | grep -r PING` >> $logfile
89 echo -e "Size: $datasize Iteration: $i\n" >> $logfile
90 fi
91 done
92 let datasize=$datasize+$stepsize
93done
94
95# Report failures
96if [ $error -eq 1 ]; then
97 echo -e "=================== error report ===================\n"
98 cat $logfile
99 echo -e "====================================================\n"
100 clean_tasks
101 echo -e "FAIL: ping test for pci-e ethernet card device $ethernet_interface failed\n"
102 exit 1
103else
104 clean_tasks
105 echo -e "PASS: ping test for pci-e ethernet card device $ethernet_interface success\n"
106fi
107
108echo "PASS: pci express test passed"
109exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/acp3448v2/usb b/recipes-test/ddt-runner/files/scripts/acp3448v2/usb
deleted file mode 100755
index aad0226..0000000
--- a/recipes-test/ddt-runner/files/scripts/acp3448v2/usb
+++ /dev/null
@@ -1,100 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test usb functionality for acp3448v2.
4#
5
6result=0
7devpath=""
8usbinfo=""
9
10usbutils_is_installed=`which lsusb`
11if [ -z $usbutils_is_installed ]; then
12 echo "FAIL: Cannot find lsusb"
13 exit 1
14fi
15
16usbdev_num=`lsusb | grep -v root\ hub | wc -l`
17if [ $usbdev_num -eq 0 ]; then
18 echo "FAIL: USB device is not connected"
19 exit 1
20else
21 echo "$usbdev_num USB device(s) connected"
22fi
23
24sd=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'`
25if [ -z "$sd" ]; then
26 echo "FAIL: find sd device"
27 exit 1
28else
29 echo "PASS: find sd device"
30fi
31
32HDPARM=`which hdparm`
33if [ -z $HDPARM ]; then
34 result=$?
35 echo "FAIL: find hdparm"
36fi
37 echo "PASS: find hdparm"
38
39for s in $sd
40do
41 devpath=`echo "$s" | awk -F "," '{print "/sys/dev/block/" $1 ":" $2}'`
42 usbinfo=`ls -l $devpath | grep usb`
43
44 if [ -z "$usbinfo" ] ; then
45 continue
46 fi
47
48 s=`echo "$s" | awk -F "," '{print $3}'`
49
50 echo "Testing $s"
51 $HDPARM -I $s
52 if [ $? -ne 0 ]; then
53 result=$?
54 echo "FAIL: $HDPARM -I $s Detailed/current information directly from $s"
55 else
56 echo "PASS: $HDPARM -I $s Detailed/current information directly from $s"
57 fi
58
59 $HDPARM -tT $s
60 if [ $? -ne 0 ]; then
61 result=$?
62 echo "FAIL: $HDPARM -tT $s Perform device/cache read timings on $s"
63 else
64 echo "PASS: $HDPARM -tT $s Perform device/cache read timings on $s"
65 fi
66
67 mkdir -p /mnt/usb_tmp
68 for partition in `ls "$s"[1-9]`
69 do
70 echo "Testing $partition"
71
72 mount "$partition" /mnt/usb_tmp
73 if [ $? -ne 0 ]; then
74 result=$?
75 echo "FAIL: mount $s"
76 else
77 echo "PASS: mount $s"
78 dd if=/dev/urandom of=/mnt/usb_tmp/writefile bs=1M count=50
79 if [ $? -ne 0 ]; then
80 result=$?
81 echo "FAIL: write test on $s"
82 else
83 echo "PASS: write test on $s"
84 rm -f /mnt/usb_tmp/writefile
85 fi
86 dd if=$s of=/mnt/usb_tmp/readfile bs=1M count=10
87 if [ $? -ne 0 ]; then
88 result=$?
89 echo "FAIL: read test on $s"
90 else
91 echo "PASS: read test on $s"
92 rm -f /mnt/usb_tmp/readfile
93 fi
94 umount /mnt/usb_tmp
95 fi
96 done
97
98 rm -fr /mnt/usb_tmp
99done
100exit $result
diff --git a/recipes-test/ddt-runner/files/scripts/b4860qds-64b/ethernet b/recipes-test/ddt-runner/files/scripts/b4860qds-64b/ethernet
deleted file mode 100755
index 5355f10..0000000
--- a/recipes-test/ddt-runner/files/scripts/b4860qds-64b/ethernet
+++ /dev/null
@@ -1,88 +0,0 @@
1#!/bin/sh
2
3ethernet_interface="eth1"
4ethernet_ping_ipaddr="172.21.3.22"
5ethernet_ipaddr=$1
6
7IFCONFIG=`which ifconfig`
8
9$IFCONFIG $ethernet_interface up
10$IFCONFIG | grep $ethernet_interface
11if [ $? -ne 0 ]; then
12 echo "FAIL: $ethernet_interface is not up"
13 exit 1
14else
15 echo "PASS: $ethernet_interface is up"
16fi
17
18if [ "x$ethernet_ipaddr" != "x" ]; then
19 $IFCONFIG $ethernet_interface $ethernet_ipaddr
20fi
21
22$IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}'
23if [ $? -ne 0 ]; then
24 echo "FAIL: ipaddr of $ethernet_interface setup failed"
25 exit 1
26else
27 echo "PASS: ipaddr of $ethernet_interface setup success"
28fi
29
30mindatasize=56
31maxdatasize=650
32stepsize=100
33iteration=1
34datasize=$mindatasize
35logfile=`/bin/mktemp`
36statistics=`/bin/mktemp`
37error=0
38
39trap cleanup SIGHUP SIGINT SIGTERM
40
41clean_tasks() {
42 echo "Executing clean up tasks"
43 rm -f $logfile $statistics
44}
45
46cleanup() {
47 echo "Aborting script execution"
48 clean_tasks
49 exit 0
50}
51
52echo "start ping test for $ethernet_interface..."
53
54while [ $datasize -le $maxdatasize ]; do
55 for i in `seq 1 $iteration`; do
56 ping -c 1 -s $datasize $ethernet_ping_ipaddr > $statistics
57 ping_err=`echo $?`
58 echo "" && cat $statistics | grep -r "PING"
59 cat $statistics | grep -r "received"
60 [ `echo $?` -eq 0 ] || packets_received=0 && \
61 packets_received=`cat $statistics | \
62 grep -r "received" | awk '{print$4}'`
63
64 # Evaluate possible errors on the ping operation
65 if [ $ping_err -ne 0 ] || [ $packets_received -eq 0 ]; then
66 error=1
67 echo -e `cat $statistics | grep -r PING` >> $logfile
68 echo -e "Size: $datasize Iteration: $i\n" >> $logfile
69 fi
70 done
71 let datasize=$datasize+$stepsize
72done
73
74# Report failures
75if [ $error -eq 1 ]; then
76 echo -e "=================== error report ===================\n"
77 cat $logfile
78 echo -e "====================================================\n"
79 clean_tasks
80 echo -e "FAIL: ping test for $ethernet_interface failed\n"
81 exit 1
82else
83 clean_tasks
84 echo -e "PASS: ping test for $ethernet_interface success\n"
85fi
86
87echo "PASS: $ethernet_interface test passed"
88exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/b4860qds-64b/flash b/recipes-test/ddt-runner/files/scripts/b4860qds-64b/flash
deleted file mode 100755
index 5728b73..0000000
--- a/recipes-test/ddt-runner/files/scripts/b4860qds-64b/flash
+++ /dev/null
@@ -1,20 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test flash driver functionality. I removed the write
4# operations since all partition are in use in b4860qds-64b and there might be
5# possibility of corrupting data even if we backup in test script.
6
7if part_num=`cat /proc/mtd | grep -c 'mtd'`; then
8 echo "PASS: show $part_num partitions"
9else
10 echo "FAIL: show $part_num partitions"
11fi
12
13for((part=0; part<$part_num-1; part++));
14do
15 if [ $(mtd_debug info /dev/mtd$part | grep -c 'mtd.type') ]; then
16 echo "PASS: show partition $part debug info"
17 else
18 echo "FAIL: show partition $part debug info"
19 fi
20done
diff --git a/recipes-test/ddt-runner/files/scripts/b4860qds-64b/i2c b/recipes-test/ddt-runner/files/scripts/b4860qds-64b/i2c
deleted file mode 100755
index 5b312b9..0000000
--- a/recipes-test/ddt-runner/files/scripts/b4860qds-64b/i2c
+++ /dev/null
@@ -1,24 +0,0 @@
1#!/bin/sh
2
3if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then
4 echo "PASS: found $I2C_ADAPTERS i2c adapters"
5else
6 echo "FAIL: no i2c adapters found"
7 exit 1
8fi
9
10if [ -z "$adapters" ]; then
11 adapters=0
12fi
13
14while [ $adapters -lt $I2C_ADAPTERS ]
15do
16 i2cdetect -y $adapters
17 if [ $? -ne 0 ]; then
18 echo "FAIL: detect i2c adapter $adapters failed"
19 else
20 echo "PASS: detect i2c adapter $adapters success"
21 fi
22 adapters=`expr $adapters + 1`
23 sleep 1
24done
diff --git a/recipes-test/ddt-runner/files/scripts/b4860qds-64b/rtc b/recipes-test/ddt-runner/files/scripts/b4860qds-64b/rtc
deleted file mode 100755
index 0d38293..0000000
--- a/recipes-test/ddt-runner/files/scripts/b4860qds-64b/rtc
+++ /dev/null
@@ -1,42 +0,0 @@
1#!/bin/sh
2
3RTC_DEVICE="/dev/rtc"
4
5if [ ! -e $RTC_DEVICE ]; then
6 echo "FAIL: rtc device does not exist"
7 exit 1
8else
9 echo "PASS: rtc device exists"
10fi
11
12/sbin/hwclock -f $RTC_DEVICE
13if [ $? -ne 0 ]; then
14 echo "FAIL: rtc device open failed"
15 exit 1
16else
17 echo "PASS: rtc device open success"
18fi
19
20
21/sbin/hwclock --systohc
22if [ $? -ne 0 ]; then
23 echo "FAIL: sync system clock and hardware clock failed"
24 exit 1
25else
26 echo "PASS: sync system clock and hardware clock success"
27fi
28
29RTC_TIME=$(/sbin/hwclock -r |awk '{print $4}')
30echo $RTC_TIME
31SYS_TIME=$(date +%m/%d/%Y-%X |awk '{print $1}' |awk -F- '{print $2}')
32echo $SYS_TIME
33
34if [ "$RTC_TIME" = "$SYS_TIME" ] ; then
35 echo "PASS: system time same with hardware time"
36else
37 echo "FAIL: system time different with hardware time"
38 exit 1
39fi
40
41echo "PASS: rtc test successful"
42exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/b4860qds-64b/spi b/recipes-test/ddt-runner/files/scripts/b4860qds-64b/spi
deleted file mode 100755
index b03431e..0000000
--- a/recipes-test/ddt-runner/files/scripts/b4860qds-64b/spi
+++ /dev/null
@@ -1,48 +0,0 @@
1#!/bin/sh
2
3#An spi flash M25P80 connect to b4860qds-64b cpu by spi bus, so the method
4#is to read/write spi flash to verify whether the spi bus driver worked
5#or not.
6
7MTD_CHAR_DEVICE="/dev/mtd4"
8MTD_BLOCK_DEVICE="/dev/mtdblock4"
9
10if [ ! -e $MTD_CHAR_DEVICE ]; then
11 echo "FAIL: spi flash device $MTD_CHAR_DEVICE does not exist"
12 exit 1
13else
14 echo "PASS: spi flash device $MTD_CHAR_DEVICE exists"
15fi
16
17if [ ! -e $MTD_BLOCK_DEVICE ]; then
18 echo "FAIL: spi flash device $MTD_BLOCK_DEVICE does not exist"
19 exit 1
20else
21 echo "PASS: spi flash device $MTD_BLOCK_DEVICE exists"
22fi
23
24/usr/sbin/flash_erase -j $MTD_CHAR_DEVICE 0 0
25if [ $? -ne 0 ]; then
26 echo "FAIL: format spi flash device $MTD_BLOCK_DEVICE fail"
27 exit 1
28else
29 mkdir -p /mnt/spi
30 mount -t jffs2 $MTD_BLOCK_DEVICE /mnt/spi
31 if [ $? -ne 0 ]; then
32 echo "FAIL: mount spi flash device $MTD_BLOCK_DEVICE fail"
33 exit 1
34 else
35 cp /bin/busybox /mnt/spi
36 ls /mnt/spi |grep busybox
37 if [ $? -ne 0 ]; then
38 echo "FAIL: read or write spi flash device $MTD_BLOCK_DEVICE fail"
39 exit 1
40 else
41 umount $MTD_BLOCK_DEVICE
42 echo "PASS: read or write spi flash device $MTD_BLOCK_DEVICE success"
43 fi
44 fi
45fi
46
47echo "PASS: spi bus test passed"
48exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/bsc9131rdb/ethernet b/recipes-test/ddt-runner/files/scripts/bsc9131rdb/ethernet
deleted file mode 100755
index df64e08..0000000
--- a/recipes-test/ddt-runner/files/scripts/bsc9131rdb/ethernet
+++ /dev/null
@@ -1,89 +0,0 @@
1#!/bin/sh
2# This script is used to test ethernet interface for bsc9131rdb.
3
4ethernet_interface="eth0"
5ethernet_ping_ipaddr="172.21.3.22"
6ethernet_ipaddr=$1
7
8IFCONFIG=`which ifconfig`
9
10$IFCONFIG $ethernet_interface up
11$IFCONFIG | grep $ethernet_interface
12if [ $? -ne 0 ]; then
13 echo "FAIL: $ethernet_interface is not up"
14 exit 1
15else
16 echo "PASS: $ethernet_interface is up"
17fi
18
19if [ "x$ethernet_ipaddr" != "x" ]; then
20 $IFCONFIG $ethernet_interface $ethernet_ipaddr
21fi
22
23$IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}'
24if [ $? -ne 0 ]; then
25 echo "FAIL: ipaddr of $ethernet_interface setup failed"
26 exit 1
27else
28 echo "PASS: ipaddr of $ethernet_interface setup success"
29fi
30
31mindatasize=56
32maxdatasize=650
33stepsize=100
34iteration=1
35datasize=$mindatasize
36logfile=`/bin/mktemp`
37statistics=`/bin/mktemp`
38error=0
39
40trap cleanup SIGHUP SIGINT SIGTERM
41
42clean_tasks() {
43 echo "Executing clean up tasks"
44 rm -f $logfile $statistics
45}
46
47cleanup() {
48 echo "Aborting script execution"
49 clean_tasks
50 exit 0
51}
52
53echo "start ping test for $ethernet_interface..."
54
55while [ $datasize -le $maxdatasize ]; do
56 for i in `seq 1 $iteration`; do
57 ping -c 1 -s $datasize $ethernet_ping_ipaddr > $statistics
58 ping_err=`echo $?`
59 echo "" && cat $statistics | grep -r "PING"
60 cat $statistics | grep -r "received"
61 [ `echo $?` -eq 0 ] || packets_received=0 && \
62 packets_received=`cat $statistics | \
63 grep -r "received" | awk '{print$4}'`
64
65 # Evaluate possible errors on the ping operation
66 if [ $ping_err -ne 0 ] || [ $packets_received -eq 0 ]; then
67 error=1
68 echo -e `cat $statistics | grep -r PING` >> $logfile
69 echo -e "Size: $datasize Iteration: $i\n" >> $logfile
70 fi
71 done
72 let datasize=$datasize+$stepsize
73done
74
75# Report failures
76if [ $error -eq 1 ]; then
77 echo -e "=================== error report ===================\n"
78 cat $logfile
79 echo -e "====================================================\n"
80 clean_tasks
81 echo -e "FAIL: ping test for $ethernet_interface failed\n"
82 exit 1
83else
84 clean_tasks
85 echo -e "PASS: ping test for $ethernet_interface success\n"
86fi
87
88echo "PASS: $ethernet_interface test passed"
89exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/bsc9131rdb/flash b/recipes-test/ddt-runner/files/scripts/bsc9131rdb/flash
deleted file mode 100755
index 66631ba..0000000
--- a/recipes-test/ddt-runner/files/scripts/bsc9131rdb/flash
+++ /dev/null
@@ -1,48 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test flash driver functionality. I removed the tests
4# which include write operations since all partition are in use in bsc9131rdb
5# and there might be possibility of corrupting data even if we backup in test
6# script.
7
8if part_num=`cat /proc/mtd | grep -c 'mtd'`; then
9 echo "PASS: $part_num partitions found"
10else
11 echo "FAIL: $part_num partitions found"
12 exit 1
13fi
14
15for((part=0; part<$part_num; part++));
16do
17 if [ $(mtd_debug info /dev/mtd$part | grep -c 'mtd.type') ]; then
18 echo "PASS: show partition $part debug info"
19 else
20 echo "FAIL: show partition $part debug info"
21 exit 1
22 fi
23done
24
25READ_TEST=`find / -name mtd_readtest.ko -print`
26
27if [ ! -e $READ_TEST ]; then
28 echo "FAIL: $READ_TEST does not exist"
29 exit 1
30else
31 echo "PASS: $READ_TEST exists"
32fi
33
34for((part=0; part<$part_num; part++));
35do
36 dmesg -c > NULL
37
38 modprobe $READ_TEST dev=$part
39
40 bad_num=`dmesg | grep -c 'bad'`
41 if [ $bad_num -eq 0 ]; then
42 echo "PASS: read test for partition $part"
43 else
44 echo "FAIL: read test for partition $part"
45 fi
46
47 rmmod $READ_TEST
48done
diff --git a/recipes-test/ddt-runner/files/scripts/bsc9131rdb/i2c b/recipes-test/ddt-runner/files/scripts/bsc9131rdb/i2c
deleted file mode 100755
index c4acd8e..0000000
--- a/recipes-test/ddt-runner/files/scripts/bsc9131rdb/i2c
+++ /dev/null
@@ -1,75 +0,0 @@
1#!/bin/sh
2# This script is used to test i2c interface for bsc9131rdb
3
4I2C_DETECT=`which i2cdetect`
5if [ "x$I2C_DETECT" != "x" ]; then
6 echo "PASS: i2cdetect found"
7else
8 echo "FAIL: i2cdetect not found"
9 exit 1
10fi
11
12I2C_SET=`which i2cset`
13if [ "x$I2C_SET" != "x" ]; then
14 echo "PASS: i2cset found"
15else
16 echo "FAIL: i2cset not found"
17 exit 1
18fi
19
20I2C_GET=`which i2cget`
21if [ "x$I2C_GET" != "x" ]; then
22 echo "PASS: i2cget found"
23else
24 echo "FAIL: i2cget not found"
25 exit 1
26fi
27
28if I2C_ADAPTERS=`$I2C_DETECT -l |wc -l`; then
29 echo "PASS: $I2C_ADAPTERS i2c adapters found"
30else
31 echo "FAIL: no i2c adapters found"
32 exit 1
33fi
34
35adapters=0
36while [ $adapters -lt $I2C_ADAPTERS ]
37do
38 $I2C_DETECT -y $adapters
39 if [ $? -ne 0 ]; then
40 echo "FAIL: detect i2c adapter $adapters fail"
41 else
42 echo "PASS: detect i2c adapter $adapters success"
43 fi
44 adapters=`expr $adapters + 1`
45 sleep 1
46done
47
48# Area of bus:i2c-0 addr:0x52 is free to read and write
49$I2C_SET -y 0 0x52 0 0x55
50if [ $? -eq 0 ]; then
51 echo "PASS: i2c_set -y 0 0x52 0 0x55 success"
52else
53 echo "FAIL: i2c_set -y 0 0x52 0 0x55 fail"
54fi
55
56num=`$I2C_GET -y 0 0x52 0 | grep -c '0x55'`
57if [ $num -eq 1 ]; then
58 echo "PASS: i2c_get -y 0 0x52 0 success"
59else
60 echo "FAIL: i2c_get -y 0 0x52 0 fail"
61fi
62
63$I2C_SET -y 0 0x52 0 0xaa
64if [ $? -eq 0 ]; then
65 echo "PASS: i2c_set -y 0 0x52 0 0xaa success"
66else
67 echo "FAIL: i2c_set -y 0 0x52 0 0xaa fail"
68fi
69
70num=`$I2C_GET -y 0 0x52 0 | grep -c '0xaa'`
71if [ $num -eq 1 ]; then
72 echo "PASS: i2c_get -y 0 0x52 0 success"
73else
74 echo "FAIL: i2c_get -y 0 0x52 0 fail"
75fi
diff --git a/recipes-test/ddt-runner/files/scripts/bsc9131rdb/preempt_rt b/recipes-test/ddt-runner/files/scripts/bsc9131rdb/preempt_rt
deleted file mode 100755
index 111cfa2..0000000
--- a/recipes-test/ddt-runner/files/scripts/bsc9131rdb/preempt_rt
+++ /dev/null
@@ -1,33 +0,0 @@
1#!/bin/sh
2#
3#This script is to test PREEMPT RT on target
4#
5
6uname -a | grep "PREEMPT RT"
7if [ $? -ne 0 ]; then
8 echo "FAIL: The kernel include real-time patch"
9 echo 1
10fi
11 echo "PASS: The kernel include real-time patch"
12
13ps | grep '\(\[irq/\)'
14if [ $? -ne 0 ]; then
15 echo "FAIL: The IRQ handlers are treated by a patched kernel in kernel thread context."
16 exit 1
17fi
18 echo "PASS: The IRQ handlers are treated by a patched kernel in kernel thread context."
19
20cyclictest -t5 -p 80 -i 10000 -l 100
21if [ $? -ne 0 ]; then
22 echo "FAIL: Test case: POSIX interval timer, Interval 10000 micro seconds,. 100 loops."
23 exit 1
24fi
25 echo "PASS: Test case: POSIX interval timer, Interval 10000 micro seconds,. 100 loops."
26
27cyclictest -t5 -p 80 -n -i 10000 -l 100
28if [ $? -ne 0 ]; then
29 echo "FAIL: Test case: clock_nanosleep(TIME_ABSTIME), Interval 10000 micro seconds,. 100 loops."
30 exit 1
31fi
32 echo "PASS: Test case: clock_nanosleep(TIME_ABSTIME), Interval 10000 micro seconds,. 100 loops."
33
diff --git a/recipes-test/ddt-runner/files/scripts/bsc9131rdb/spi b/recipes-test/ddt-runner/files/scripts/bsc9131rdb/spi
deleted file mode 100755
index 3386d6c..0000000
--- a/recipes-test/ddt-runner/files/scripts/bsc9131rdb/spi
+++ /dev/null
@@ -1,56 +0,0 @@
1#!/bin/sh
2# This script is used to test spi flash functionality for bsc9131rdb. An spi
3# flash M25P80 connect to bsc9131 cpu by spi bus, so the method is to read/write
4# spi flash to verify whether the spi bus driver worked or not.
5
6MTD_CHAR_DEVICE="/dev/mtd8"
7MTD_BLOCK_DEVICE="/dev/mtdblock8"
8
9FLASH_ERASE=`which flash_erase`
10if [ "x$FLASH_ERASE" != "x" ]; then
11 echo "PASS: flash_erase found"
12else
13 echo "FAIL: flash_erase not found"
14 exit 1
15fi
16
17if [ ! -e $MTD_CHAR_DEVICE ]; then
18 echo "FAIL: spi flash device $MTD_CHAR_DEVICE does not exist"
19 exit 1
20else
21 echo "PASS: spi flash device $MTD_CHAR_DEVICE exists"
22fi
23
24if [ ! -e $MTD_BLOCK_DEVICE ]; then
25 echo "FAIL: spi flash device $MTD_BLOCK_DEVICE does not exist"
26 exit 1
27else
28 echo "PASS: spi flash device $MTD_BLOCK_DEVICE exists"
29fi
30
31$FLASH_ERASE -j $MTD_CHAR_DEVICE 0 0
32if [ $? -ne 0 ]; then
33 echo "FAIL: format spi flash device $MTD_BLOCK_DEVICE fail"
34 exit 1
35else
36 mkdir -p /mnt/spi
37 mount -t jffs2 $MTD_BLOCK_DEVICE /mnt/spi
38 if [ $? -ne 0 ]; then
39 echo "FAIL: mount spi flash device $MTD_BLOCK_DEVICE fail"
40 exit 1
41 else
42 cp /bin/busybox /mnt/spi
43 file_num=`ls /mnt/spi |grep -c 'busybox'`
44 if [ $file_num -eq 1 ]; then
45 rm /mnt/spi/busybox
46 umount $MTD_BLOCK_DEVICE
47 echo "PASS: read or write spi flash device $MTD_BLOCK_DEVICE success"
48 else
49 echo "FAIL: read or write spi flash device $MTD_BLOCK_DEVICE fail"
50 exit 1
51 fi
52 fi
53fi
54
55echo "PASS: spi bus test passed"
56exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/bsc9131rdb/watchdog b/recipes-test/ddt-runner/files/scripts/bsc9131rdb/watchdog
deleted file mode 100755
index 71429fc..0000000
--- a/recipes-test/ddt-runner/files/scripts/bsc9131rdb/watchdog
+++ /dev/null
@@ -1,64 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test watchdog functionality for bsc9131rdb.
4
5WATCHDOG=`which watchdog`
6if [ "x$WATCHDOG" != "x" ]; then
7 echo "PASS: watchdog found"
8else
9 echo "FAIL: watchdog not found"
10 exit 1
11fi
12
13WATCHDOG_CONF=/etc/watchdog.conf
14if [ -f $WATCHDOG_CONF ]; then
15 echo "PASS: watchdog config file found"
16 sed -i '23,23 s/#//' $WATCHDOG_CONF
17else
18 echo "FAIL: watchdog config file not found"
19 exit 1
20fi
21
22$WATCHDOG -v /dev/watchdog
23watchdog_thread=`ps | grep -c 'watchdog -v /dev/watchdog'`
24if [ $watchdog_thread -eq 2 ]; then
25 echo "PASS: Watchdog daemon started successfully"
26else
27 echo "FAIL: Failed to start watchdog daemon"
28 exit 1
29fi
30
31sleep 5s
32
33killall watchdog
34
35retry=0
36while [ $retry -lt 10 ]
37do
38 watchdog_thread=`ps | grep -c 'watchdog -v /dev/watchdog'`
39 if [ $watchdog_thread -eq 1 ]; then
40 echo "PASS: Watchdog daemon stopped successfully"
41 break;
42 fi
43 sleep 1s
44 retry=`expr $retry + 1`
45done
46
47if [ $retry -eq 10 ]; then
48 echo "FAIL: Failed to stop watchdog daemon"
49fi
50
51found=0
52while read line
53do
54 result=`echo $line | grep -c 'still alive after 1 interval'`
55 if [ $result -eq 1 ]; then
56 echo "PASS: Watchdog is still alive after 1 interval"
57 found=1
58 fi
59done < /var/log/messages
60
61if [ $found -eq 0 ]; then
62 echo "FAIL: Watchdog is not alive after 1 interval"
63fi
64
diff --git a/recipes-test/ddt-runner/files/scripts/bsc9132qds/ethernet b/recipes-test/ddt-runner/files/scripts/bsc9132qds/ethernet
deleted file mode 100755
index df64e08..0000000
--- a/recipes-test/ddt-runner/files/scripts/bsc9132qds/ethernet
+++ /dev/null
@@ -1,89 +0,0 @@
1#!/bin/sh
2# This script is used to test ethernet interface for bsc9131rdb.
3
4ethernet_interface="eth0"
5ethernet_ping_ipaddr="172.21.3.22"
6ethernet_ipaddr=$1
7
8IFCONFIG=`which ifconfig`
9
10$IFCONFIG $ethernet_interface up
11$IFCONFIG | grep $ethernet_interface
12if [ $? -ne 0 ]; then
13 echo "FAIL: $ethernet_interface is not up"
14 exit 1
15else
16 echo "PASS: $ethernet_interface is up"
17fi
18
19if [ "x$ethernet_ipaddr" != "x" ]; then
20 $IFCONFIG $ethernet_interface $ethernet_ipaddr
21fi
22
23$IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}'
24if [ $? -ne 0 ]; then
25 echo "FAIL: ipaddr of $ethernet_interface setup failed"
26 exit 1
27else
28 echo "PASS: ipaddr of $ethernet_interface setup success"
29fi
30
31mindatasize=56
32maxdatasize=650
33stepsize=100
34iteration=1
35datasize=$mindatasize
36logfile=`/bin/mktemp`
37statistics=`/bin/mktemp`
38error=0
39
40trap cleanup SIGHUP SIGINT SIGTERM
41
42clean_tasks() {
43 echo "Executing clean up tasks"
44 rm -f $logfile $statistics
45}
46
47cleanup() {
48 echo "Aborting script execution"
49 clean_tasks
50 exit 0
51}
52
53echo "start ping test for $ethernet_interface..."
54
55while [ $datasize -le $maxdatasize ]; do
56 for i in `seq 1 $iteration`; do
57 ping -c 1 -s $datasize $ethernet_ping_ipaddr > $statistics
58 ping_err=`echo $?`
59 echo "" && cat $statistics | grep -r "PING"
60 cat $statistics | grep -r "received"
61 [ `echo $?` -eq 0 ] || packets_received=0 && \
62 packets_received=`cat $statistics | \
63 grep -r "received" | awk '{print$4}'`
64
65 # Evaluate possible errors on the ping operation
66 if [ $ping_err -ne 0 ] || [ $packets_received -eq 0 ]; then
67 error=1
68 echo -e `cat $statistics | grep -r PING` >> $logfile
69 echo -e "Size: $datasize Iteration: $i\n" >> $logfile
70 fi
71 done
72 let datasize=$datasize+$stepsize
73done
74
75# Report failures
76if [ $error -eq 1 ]; then
77 echo -e "=================== error report ===================\n"
78 cat $logfile
79 echo -e "====================================================\n"
80 clean_tasks
81 echo -e "FAIL: ping test for $ethernet_interface failed\n"
82 exit 1
83else
84 clean_tasks
85 echo -e "PASS: ping test for $ethernet_interface success\n"
86fi
87
88echo "PASS: $ethernet_interface test passed"
89exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/bsc9132qds/flash b/recipes-test/ddt-runner/files/scripts/bsc9132qds/flash
deleted file mode 100755
index 66631ba..0000000
--- a/recipes-test/ddt-runner/files/scripts/bsc9132qds/flash
+++ /dev/null
@@ -1,48 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test flash driver functionality. I removed the tests
4# which include write operations since all partition are in use in bsc9131rdb
5# and there might be possibility of corrupting data even if we backup in test
6# script.
7
8if part_num=`cat /proc/mtd | grep -c 'mtd'`; then
9 echo "PASS: $part_num partitions found"
10else
11 echo "FAIL: $part_num partitions found"
12 exit 1
13fi
14
15for((part=0; part<$part_num; part++));
16do
17 if [ $(mtd_debug info /dev/mtd$part | grep -c 'mtd.type') ]; then
18 echo "PASS: show partition $part debug info"
19 else
20 echo "FAIL: show partition $part debug info"
21 exit 1
22 fi
23done
24
25READ_TEST=`find / -name mtd_readtest.ko -print`
26
27if [ ! -e $READ_TEST ]; then
28 echo "FAIL: $READ_TEST does not exist"
29 exit 1
30else
31 echo "PASS: $READ_TEST exists"
32fi
33
34for((part=0; part<$part_num; part++));
35do
36 dmesg -c > NULL
37
38 modprobe $READ_TEST dev=$part
39
40 bad_num=`dmesg | grep -c 'bad'`
41 if [ $bad_num -eq 0 ]; then
42 echo "PASS: read test for partition $part"
43 else
44 echo "FAIL: read test for partition $part"
45 fi
46
47 rmmod $READ_TEST
48done
diff --git a/recipes-test/ddt-runner/files/scripts/bsc9132qds/i2c b/recipes-test/ddt-runner/files/scripts/bsc9132qds/i2c
deleted file mode 100755
index c4acd8e..0000000
--- a/recipes-test/ddt-runner/files/scripts/bsc9132qds/i2c
+++ /dev/null
@@ -1,75 +0,0 @@
1#!/bin/sh
2# This script is used to test i2c interface for bsc9131rdb
3
4I2C_DETECT=`which i2cdetect`
5if [ "x$I2C_DETECT" != "x" ]; then
6 echo "PASS: i2cdetect found"
7else
8 echo "FAIL: i2cdetect not found"
9 exit 1
10fi
11
12I2C_SET=`which i2cset`
13if [ "x$I2C_SET" != "x" ]; then
14 echo "PASS: i2cset found"
15else
16 echo "FAIL: i2cset not found"
17 exit 1
18fi
19
20I2C_GET=`which i2cget`
21if [ "x$I2C_GET" != "x" ]; then
22 echo "PASS: i2cget found"
23else
24 echo "FAIL: i2cget not found"
25 exit 1
26fi
27
28if I2C_ADAPTERS=`$I2C_DETECT -l |wc -l`; then
29 echo "PASS: $I2C_ADAPTERS i2c adapters found"
30else
31 echo "FAIL: no i2c adapters found"
32 exit 1
33fi
34
35adapters=0
36while [ $adapters -lt $I2C_ADAPTERS ]
37do
38 $I2C_DETECT -y $adapters
39 if [ $? -ne 0 ]; then
40 echo "FAIL: detect i2c adapter $adapters fail"
41 else
42 echo "PASS: detect i2c adapter $adapters success"
43 fi
44 adapters=`expr $adapters + 1`
45 sleep 1
46done
47
48# Area of bus:i2c-0 addr:0x52 is free to read and write
49$I2C_SET -y 0 0x52 0 0x55
50if [ $? -eq 0 ]; then
51 echo "PASS: i2c_set -y 0 0x52 0 0x55 success"
52else
53 echo "FAIL: i2c_set -y 0 0x52 0 0x55 fail"
54fi
55
56num=`$I2C_GET -y 0 0x52 0 | grep -c '0x55'`
57if [ $num -eq 1 ]; then
58 echo "PASS: i2c_get -y 0 0x52 0 success"
59else
60 echo "FAIL: i2c_get -y 0 0x52 0 fail"
61fi
62
63$I2C_SET -y 0 0x52 0 0xaa
64if [ $? -eq 0 ]; then
65 echo "PASS: i2c_set -y 0 0x52 0 0xaa success"
66else
67 echo "FAIL: i2c_set -y 0 0x52 0 0xaa fail"
68fi
69
70num=`$I2C_GET -y 0 0x52 0 | grep -c '0xaa'`
71if [ $num -eq 1 ]; then
72 echo "PASS: i2c_get -y 0 0x52 0 success"
73else
74 echo "FAIL: i2c_get -y 0 0x52 0 fail"
75fi
diff --git a/recipes-test/ddt-runner/files/scripts/bsc9132qds/preempt_rt b/recipes-test/ddt-runner/files/scripts/bsc9132qds/preempt_rt
deleted file mode 100755
index 111cfa2..0000000
--- a/recipes-test/ddt-runner/files/scripts/bsc9132qds/preempt_rt
+++ /dev/null
@@ -1,33 +0,0 @@
1#!/bin/sh
2#
3#This script is to test PREEMPT RT on target
4#
5
6uname -a | grep "PREEMPT RT"
7if [ $? -ne 0 ]; then
8 echo "FAIL: The kernel include real-time patch"
9 echo 1
10fi
11 echo "PASS: The kernel include real-time patch"
12
13ps | grep '\(\[irq/\)'
14if [ $? -ne 0 ]; then
15 echo "FAIL: The IRQ handlers are treated by a patched kernel in kernel thread context."
16 exit 1
17fi
18 echo "PASS: The IRQ handlers are treated by a patched kernel in kernel thread context."
19
20cyclictest -t5 -p 80 -i 10000 -l 100
21if [ $? -ne 0 ]; then
22 echo "FAIL: Test case: POSIX interval timer, Interval 10000 micro seconds,. 100 loops."
23 exit 1
24fi
25 echo "PASS: Test case: POSIX interval timer, Interval 10000 micro seconds,. 100 loops."
26
27cyclictest -t5 -p 80 -n -i 10000 -l 100
28if [ $? -ne 0 ]; then
29 echo "FAIL: Test case: clock_nanosleep(TIME_ABSTIME), Interval 10000 micro seconds,. 100 loops."
30 exit 1
31fi
32 echo "PASS: Test case: clock_nanosleep(TIME_ABSTIME), Interval 10000 micro seconds,. 100 loops."
33
diff --git a/recipes-test/ddt-runner/files/scripts/bsc9132qds/sdhc b/recipes-test/ddt-runner/files/scripts/bsc9132qds/sdhc
deleted file mode 100644
index 1530c64..0000000
--- a/recipes-test/ddt-runner/files/scripts/bsc9132qds/sdhc
+++ /dev/null
@@ -1,77 +0,0 @@
1#!/bin/sh
2# This script is used to test SDHC card functionality for bsc9132rdb
3
4DEV="mmc0:e624"
5
6if [ -f /sys/bus/mmc/drivers/mmcblk/bind ]; then
7 echo "PASS: /sys/bus/mmc/drivers/mmcblk/bind found"
8else
9 echo "FAIL: /sys/bus/mmc/drivers/mmcblk/bind not found"
10 exit 1
11fi
12
13if [ -f /sys/bus/mmc/drivers/mmcblk/unbind ]; then
14 echo "PASS: /sys/bus/mmc/drivers/mmcblk/unbind found"
15else
16 echo "FAIL: /sys/bus/mmc/drivers/mmcblk/unbind not found"
17 exit 1
18fi
19
20if [ -f /sys/bus/mmc/drivers/mmc_test/bind ]; then
21 echo "PASS: /sys/bus/mmc/drivers/mmc_test/bind found"
22else
23 echo "FAIL: /sys/bus/mmc/drivers/mmc_test/bind not found"
24 exit 1
25fi
26
27if [ -f /sys/bus/mmc/drivers/mmc_test/unbind ]; then
28 echo "PASS: /sys/bus/mmc/drivers/mmc_test/unbind found"
29else
30 echo "FAIL: /sys/bus/mmc/drivers/mmc_test/unbind not found"
31 exit 1
32fi
33
34mount -t debugfs none /sys/kernel/debug
35if [ $? -eq 0 ]; then
36 echo "PASS: successfully mount /sys/kernel/debug"
37else
38 echo "FAIL: failed to mount /sys/kernel/debug"
39fi
40
41echo $DEV > /sys/bus/mmc/drivers/mmcblk/unbind
42if [ $? -eq 0 ]; then
43 echo "PASS: successfully unbind mmcblk driver"
44else
45 echo "FAIL: failed to unbind mmcblk driver"
46fi
47
48echo $DEV > /sys/bus/mmc/drivers/mmc_test/bind
49if [ $? -eq 0 ]; then
50 echo "PASS: successfully bind mmc_test driver"
51else
52 echo "FAIL: failed to bind mmc_test driver"
53fi
54
55# echo 0 means test all supported test cases
56fail_num=`echo 0 > /sys/kernel/debug/mmc0/mmc0\:e624/test | grep -E -c 'FAILED|ERROR'`
57if [ $fail_num -eq 0 ]; then
58 echo "PASS: all test cases passed"
59else
60 echo "FAIL: some test cases failed"
61fi
62
63cat /sys/kernel/debug/mmc0/mmc0\:e624/test
64
65echo $DEV > /sys/bus/mmc/drivers/mmc_test/unbind
66if [ $? -eq 0 ]; then
67 echo "PASS: successfully unbind mmc_test driver"
68else
69 echo "FAIL: failed to unbind mmc_test driver"
70fi
71
72echo $DEV > /sys/bus/mmc/drivers/mmcblk/bind
73if [ $? -eq 0 ]; then
74 echo "PASS: successfully bind mmcblk driver"
75else
76 echo "FAIL: failed to bind mmcblk driver"
77fi
diff --git a/recipes-test/ddt-runner/files/scripts/bsc9132qds/spi b/recipes-test/ddt-runner/files/scripts/bsc9132qds/spi
deleted file mode 100755
index 3386d6c..0000000
--- a/recipes-test/ddt-runner/files/scripts/bsc9132qds/spi
+++ /dev/null
@@ -1,56 +0,0 @@
1#!/bin/sh
2# This script is used to test spi flash functionality for bsc9131rdb. An spi
3# flash M25P80 connect to bsc9131 cpu by spi bus, so the method is to read/write
4# spi flash to verify whether the spi bus driver worked or not.
5
6MTD_CHAR_DEVICE="/dev/mtd8"
7MTD_BLOCK_DEVICE="/dev/mtdblock8"
8
9FLASH_ERASE=`which flash_erase`
10if [ "x$FLASH_ERASE" != "x" ]; then
11 echo "PASS: flash_erase found"
12else
13 echo "FAIL: flash_erase not found"
14 exit 1
15fi
16
17if [ ! -e $MTD_CHAR_DEVICE ]; then
18 echo "FAIL: spi flash device $MTD_CHAR_DEVICE does not exist"
19 exit 1
20else
21 echo "PASS: spi flash device $MTD_CHAR_DEVICE exists"
22fi
23
24if [ ! -e $MTD_BLOCK_DEVICE ]; then
25 echo "FAIL: spi flash device $MTD_BLOCK_DEVICE does not exist"
26 exit 1
27else
28 echo "PASS: spi flash device $MTD_BLOCK_DEVICE exists"
29fi
30
31$FLASH_ERASE -j $MTD_CHAR_DEVICE 0 0
32if [ $? -ne 0 ]; then
33 echo "FAIL: format spi flash device $MTD_BLOCK_DEVICE fail"
34 exit 1
35else
36 mkdir -p /mnt/spi
37 mount -t jffs2 $MTD_BLOCK_DEVICE /mnt/spi
38 if [ $? -ne 0 ]; then
39 echo "FAIL: mount spi flash device $MTD_BLOCK_DEVICE fail"
40 exit 1
41 else
42 cp /bin/busybox /mnt/spi
43 file_num=`ls /mnt/spi |grep -c 'busybox'`
44 if [ $file_num -eq 1 ]; then
45 rm /mnt/spi/busybox
46 umount $MTD_BLOCK_DEVICE
47 echo "PASS: read or write spi flash device $MTD_BLOCK_DEVICE success"
48 else
49 echo "FAIL: read or write spi flash device $MTD_BLOCK_DEVICE fail"
50 exit 1
51 fi
52 fi
53fi
54
55echo "PASS: spi bus test passed"
56exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/bsc9132qds/watchdog b/recipes-test/ddt-runner/files/scripts/bsc9132qds/watchdog
deleted file mode 100755
index 2beb8a6..0000000
--- a/recipes-test/ddt-runner/files/scripts/bsc9132qds/watchdog
+++ /dev/null
@@ -1,64 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test watchdog functionality for bsc9132qds.
4
5WATCHDOG=`which watchdog`
6if [ "x$WATCHDOG" != "x" ]; then
7 echo "PASS: watchdog found"
8else
9 echo "FAIL: watchdog not found"
10 exit 1
11fi
12
13WATCHDOG_CONF=/etc/watchdog.conf
14if [ -f $WATCHDOG_CONF ]; then
15 echo "PASS: watchdog config file found"
16 sed -i '23,23 s/#//' $WATCHDOG_CONF
17else
18 echo "FAIL: watchdog config file not found"
19 exit 1
20fi
21
22$WATCHDOG -v /dev/watchdog
23watchdog_thread=`ps | grep -c 'watchdog -v /dev/watchdog'`
24if [ $watchdog_thread -eq 2 ]; then
25 echo "PASS: Watchdog daemon started successfully"
26else
27 echo "FAIL: Failed to start watchdog daemon"
28 exit 1
29fi
30
31sleep 5s
32
33killall watchdog
34
35retry=0
36while [ $retry -lt 10 ]
37do
38 watchdog_thread=`ps | grep -c 'watchdog -v /dev/watchdog'`
39 if [ $watchdog_thread -eq 1 ]; then
40 echo "PASS: Watchdog daemon stopped successfully"
41 break;
42 fi
43 sleep 1s
44 retry=`expr $retry + 1`
45done
46
47if [ $retry -eq 10 ]; then
48 echo "FAIL: Failed to stop watchdog daemon"
49fi
50
51found=0
52while read line
53do
54 result=`echo $line | grep -c 'still alive after 1 interval'`
55 if [ $result -eq 1 ]; then
56 echo "PASS: Watchdog is still alive after 1 interval"
57 found=1
58 fi
59done < /var/log/messages
60
61if [ $found -eq 0 ]; then
62 echo "FAIL: Watchdog is not alive after 1 interval"
63fi
64
diff --git a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/ethernet b/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/ethernet
deleted file mode 100755
index de1d427..0000000
--- a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/ethernet
+++ /dev/null
@@ -1,88 +0,0 @@
1#!/bin/sh
2
3ethernet_interface="eth0"
4#sestord02 ip address
5ethernet_ping_ipaddr="172.21.3.22"
6ethernet_ipaddr=$1
7
8IFCONFIG=`which ifconfig`
9
10$IFCONFIG $ethernet_interface up
11$IFCONFIG | grep $ethernet_interface
12if [ $? -ne 0 ]; then
13 echo "FAIL: $ethernet_interface is not up"
14 exit 1
15else
16 echo "PASS: $ethernet_interface is up"
17fi
18
19if [ "x$ethernet_ipaddr" != "x" ]; then
20 $IFCONFIG $ethernet_interface $ethernet_ipaddr
21fi
22
23$IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}'
24if [ $? -ne 0 ]; then
25 echo "FAIL: ipaddr of $ethernet_interface setup failed"
26 exit 1
27else
28 echo "PASS: ipaddr of $ethernet_interface setup success"
29fi
30
31mindatasize=56
32maxdatasize=650
33stepsize=100
34iteration=1
35datasize=$mindatasize
36logfile=`/bin/mktemp`
37statistics=`/bin/mktemp`
38error=0
39
40trap cleanup SIGHUP SIGINT SIGTERM
41
42clean_tasks() {
43 echo "Executing clean up tasks"
44 rm -f $logfile $statistics
45}
46
47cleanup() {
48 echo "Aborting script execution"
49 clean_tasks
50 exit 0
51}
52
53echo "start ping test for $ethernet_interface..."
54
55while [ $datasize -le $maxdatasize ]; do
56 for i in `seq 1 $iteration`; do
57 ping -c 1 -s $datasize $ethernet_ping_ipaddr > $statistics
58 ping_err=`echo $?`
59 echo "" && cat $statistics | grep -r "PING"
60 cat $statistics | grep -r "received"
61 [ `echo $?` -eq 0 ] || packets_received=0 && \
62 packets_received=`cat $statistics | \
63 grep -r "received" | awk '{print$4}'`
64
65 # Evaluate possible errors on the ping operation
66 if [ $ping_err -ne 0 ] || [ $packets_received -eq 0 ]; then
67 error=1
68 echo -e `cat $statistics | grep -r PING` >> $logfile
69 echo -e "Size: $datasize Iteration: $i\n" >> $logfile
70 fi
71 done
72 let datasize=$datasize+$stepsize
73done
74
75# Report failures
76if [ $error -eq 1 ]; then
77 echo -e "=================== error report ===================\n"
78 cat $logfile
79 echo -e "====================================================\n"
80 clean_tasks
81 echo -e "FAIL: ping test for $ethernet_interface failed\n"
82 exit 1
83else
84 clean_tasks
85 echo -e "PASS: ping test for $ethernet_interface success\n"
86fi
87
88exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/flash b/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/flash
deleted file mode 100755
index e108168..0000000
--- a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/flash
+++ /dev/null
@@ -1,49 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test flash driver functionality. I removed the write
4# operations since all partition are in use in p2041rdb and there might be
5# possibility of corrupting data even if we backup in test script.
6
7if part_num=`cat /proc/mtd | grep -c 'mtd'`; then
8 echo "PASS: show $part_num partitions"
9else
10 echo "FAIL: show $part_num partitions"
11 exit 1
12fi
13
14for((part=0; part<$part_num; part++));
15do
16 if [ $(mtd_debug info /dev/mtd$part | grep -c 'mtd.type') ]; then
17 echo "PASS: show partition $part debug info"
18 else
19 echo "FAIL: show partition $part debug info"
20 exit 1
21 fi
22done
23
24READ_TEST=`find / -name mtd_readtest.ko -print`
25
26if [ ! -e "$READ_TEST" ]; then
27 echo "FAIL: mtd_readtest.ko does not exist"
28 exit 1
29else
30 echo "PASS: mtd_readtest.ko exists"
31fi
32
33for((part=0; part<$part_num; part++));
34do
35 dmesg -c
36
37 insmod $READ_TEST dev=$part
38
39 finish=`dmesg | grep -c 'mtd_readtest: finished'`
40 if [ $finish -eq 1 ]; then
41 echo "PASS: read test $part"
42 else
43 echo "FAIL: read test $part"
44 rmmod $READ_TEST
45 exit 1
46 fi
47
48 rmmod $READ_TEST
49done
diff --git a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/i2c b/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/i2c
deleted file mode 100755
index 3801e9e..0000000
--- a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/i2c
+++ /dev/null
@@ -1,42 +0,0 @@
1#!/bin/sh
2# This script is used to test i2c bus functionality for p2041rdb board.
3
4if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then
5 echo "PASS: found $I2C_ADAPTERS i2c adapters"
6else
7 echo "FAIL: no i2c adapters found"
8 exit 1
9fi
10
11if [ -z "$adapters" ]; then
12 adapters=0
13fi
14
15while [ $adapters -lt $I2C_ADAPTERS ]
16do
17 i2cdetect -y $adapters
18 if [ $? -ne 0 ]; then
19 echo "FAIL: detect i2c adapter $adapters failed"
20 else
21 echo "PASS: detect i2c adapter $adapters success"
22 fi
23 adapters=`expr $adapters + 1`
24 sleep 1
25done
26
27i2cdetect -y 0
28if [ $? -ne 0 ]; then
29 echo "FAIL: detect i2c bus 0 fail"
30 exit 1
31else
32 echo "PASS: detect i2c bus 0 success"
33fi
34
35#i2c bus 0, device address 0x52, DDR3 DIMM Socket 1, SPD EEPROM
36i2cdump -f -y 0 0x52 |grep UG51U6400N8SU
37if [ $? -ne 0 ]; then
38 echo "FAIL: read SPD EEPROM on i2c bus 0 fail"
39 exit 1
40else
41 echo "PASS: read SPD EEPROM on i2c bus 0 success"
42fi
diff --git a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/pci-express b/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/pci-express
deleted file mode 100755
index 33189f9..0000000
--- a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/pci-express
+++ /dev/null
@@ -1,109 +0,0 @@
1#!/bin/sh
2
3ethernet_interface="eth0"
4#sestord02 ip address
5ethernet_ping_ipaddr="172.21.3.22"
6ethernet_ipaddr=$1
7
8#Intel Corporation 82574L Gigabit Network Card (intel e1000e)
9vendor_id="8086"
10product_id="10d3"
11
12#find vendor id & product id
13lspci -nn |grep $vendor_id:$product_id
14if [ $? -ne 0 ]; then
15 echo "FAIL: pci-e ethernet card device does not exist"
16 exit 1
17else
18 echo "PASS: got pci-e ethernet card device"
19fi
20
21setpci -v -d $vendor_id:$product_id latency_timer=b0
22if [ $? -ne 0 ]; then
23 echo "FAIL: parameter changes to pci config space failed"
24 exit 1
25else
26 echo "PASS: parameter changes to pci config space success"
27fi
28
29IFCONFIG=`which ifconfig`
30
31$IFCONFIG $ethernet_interface up
32$IFCONFIG | grep $ethernet_interface
33if [ $? -ne 0 ]; then
34 echo "FAIL: pci-e ethernet card device $ethernet_interface is not up"
35 exit 1
36else
37 echo "PASS: pci-e ethernet card device $ethernet_interface is up"
38fi
39
40if [ "x$ethernet_ipaddr" != "x" ]; then
41 $IFCONFIG $ethernet_interface $ethernet_ipaddr
42fi
43
44$IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}'
45if [ $? -ne 0 ]; then
46 echo "FAIL: ipaddr of pci-e ethernet card device $ethernet_interface setup failed"
47 exit 1
48else
49 echo "PASS: ipaddr of pci-e ethernet card device $ethernet_interface setup success"
50fi
51
52mindatasize=56
53maxdatasize=650
54stepsize=100
55iteration=1
56datasize=$mindatasize
57logfile=`/bin/mktemp`
58statistics=`/bin/mktemp`
59error=0
60
61trap cleanup SIGHUP SIGINT SIGTERM
62
63clean_tasks() {
64 echo "Executing clean up tasks"
65 rm -f $logfile $statistics
66}
67
68cleanup() {
69 echo "Aborting script execution"
70 clean_tasks
71 exit 0
72}
73
74echo "start ping test for pci-e ethernet card device $ethernet_interface..."
75
76while [ $datasize -le $maxdatasize ]; do
77 for i in `seq 1 $iteration`; do
78 ping -c 1 -s $datasize $ethernet_ping_ipaddr > $statistics
79 ping_err=`echo $?`
80 echo "" && cat $statistics | grep -r "PING"
81 cat $statistics | grep -r "received"
82 [ `echo $?` -eq 0 ] || packets_received=0 && \
83 packets_received=`cat $statistics | \
84 grep -r "received" | awk '{print$4}'`
85
86 # Evaluate possible errors on the ping operation
87 if [ $ping_err -ne 0 ] || [ $packets_received -eq 0 ]; then
88 error=1
89 echo -e `cat $statistics | grep -r PING` >> $logfile
90 echo -e "Size: $datasize Iteration: $i\n" >> $logfile
91 fi
92 done
93 let datasize=$datasize+$stepsize
94done
95
96# Report failures
97if [ $error -eq 1 ]; then
98 echo -e "=================== error report ===================\n"
99 cat $logfile
100 echo -e "====================================================\n"
101 clean_tasks
102 echo -e "FAIL: ping test for pci-e ethernet card device $ethernet_interface failed\n"
103 exit 1
104else
105 clean_tasks
106 echo -e "PASS: ping test for pci-e ethernet card device $ethernet_interface success\n"
107fi
108
109exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/rtc b/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/rtc
deleted file mode 100755
index 0d38293..0000000
--- a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/rtc
+++ /dev/null
@@ -1,42 +0,0 @@
1#!/bin/sh
2
3RTC_DEVICE="/dev/rtc"
4
5if [ ! -e $RTC_DEVICE ]; then
6 echo "FAIL: rtc device does not exist"
7 exit 1
8else
9 echo "PASS: rtc device exists"
10fi
11
12/sbin/hwclock -f $RTC_DEVICE
13if [ $? -ne 0 ]; then
14 echo "FAIL: rtc device open failed"
15 exit 1
16else
17 echo "PASS: rtc device open success"
18fi
19
20
21/sbin/hwclock --systohc
22if [ $? -ne 0 ]; then
23 echo "FAIL: sync system clock and hardware clock failed"
24 exit 1
25else
26 echo "PASS: sync system clock and hardware clock success"
27fi
28
29RTC_TIME=$(/sbin/hwclock -r |awk '{print $4}')
30echo $RTC_TIME
31SYS_TIME=$(date +%m/%d/%Y-%X |awk '{print $1}' |awk -F- '{print $2}')
32echo $SYS_TIME
33
34if [ "$RTC_TIME" = "$SYS_TIME" ] ; then
35 echo "PASS: system time same with hardware time"
36else
37 echo "FAIL: system time different with hardware time"
38 exit 1
39fi
40
41echo "PASS: rtc test successful"
42exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/sata b/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/sata
deleted file mode 100755
index 43a4932..0000000
--- a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/sata
+++ /dev/null
@@ -1,81 +0,0 @@
1#!/bin/sh
2#
3#This script is to test sata devices on target
4#
5result=0
6devpath=""
7satainfo=""
8SD=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'`
9if [ -z "$SD" ]; then
10 echo "FAIL: find sata device"
11 exit 1
12else
13 echo "PASS: find sata device"
14fi
15HDPARM=`which hdparm`
16if [ -z $HDPARM ]; then
17 result=$?
18 echo "FAIL: find hdparm"
19fi
20 echo "PASS: find hdparm"
21
22
23for s in $SD
24 do
25 devpath=`echo "$s" | awk -F "," '{print "/sys/dev/block/" $1 ":" $2}'`
26 satainfo=`ls -l $devpath | grep sata`
27
28 if [ -z "$satainfo" ] ; then
29 continue
30 fi
31 s=`echo "$s" | awk -F "," '{print $3}'`
32
33 echo "testing $s"
34 $HDPARM -I $s
35 if [ $? -ne 0 ]; then
36 result=$?
37 echo "FAIL: $HDPARM -I $s Detailed/current information directly from $s"
38 else
39 echo "PASS: $HDPARM -I $s Detailed/current information directly from $s"
40 fi
41 $HDPARM -tT $s
42 if [ $? -ne 0 ]; then
43 result=$?
44 echo "FAIL: $HDPARM -tT $s Perform device/cache read timings on $s"
45 else
46 echo "PASS: $HDPARM -tT $s Perform device/cache read timings on $s"
47 fi
48
49
50 mkdir -p /mnt/sata_tmp
51 for partition in `ls "$s"[1-9]`
52 do
53 mount "$partition" /mnt/sata_tmp
54 if [ $? -ne 0 ]; then
55 result=$?
56 echo "FAIL: Mount $s"
57 else
58 echo "PASS: Mount $s"
59 dd if=/dev/urandom of=/mnt/sata_tmp/writefile bs=1M count=50
60 if [ $? -ne 0 ]; then
61 result=$?
62 echo "FAIL: write test on $s"
63 else
64 echo "PASS: write test on $s"
65 rm -f /mnt/sata_tmp/writefile
66 fi
67 dd if=$s of=/mnt/sata_tmp/readfile bs=1M count=10
68 if [ $? -ne 0 ]; then
69 result=$?
70 echo "FAIL: read test on $s"
71 else
72 echo "PASS: read test on $s"
73 rm -f /mnt/sata_tmp/readfile
74 fi
75 umount /mnt/sata_tmp
76 fi
77 done
78
79 rm -fr /mnt/sata_tmp
80done
81exit $result
diff --git a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/sdhc b/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/sdhc
deleted file mode 100755
index b1bdab2..0000000
--- a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/sdhc
+++ /dev/null
@@ -1,40 +0,0 @@
1#!/bin/sh
2
3#the content of SD will be lost by running this test case.
4
5SDHC_DEVICE="/dev/mmcblk0p1"
6
7if [ ! -e $SDHC_DEVICE ]; then
8 echo "FAIL: $SDHC_DEVICE does not exist"
9 exit 1
10else
11 echo "PASS: $SDHC_DEVICE device exists"
12fi
13
14mount |grep mmcblk0p1
15if [ $? -eq 0 ]; then
16 umount $SDHC_DEVICE
17fi
18
19/sbin/mkfs.ext2 $SDHC_DEVICE
20if [ $? -ne 0 ]; then
21 echo "FAIL: format $SDHC_DEVICE fail"
22 exit 1
23else
24 mkdir -p /mnt/sdhc
25 mount $SDHC_DEVICE /mnt/sdhc
26 if [ $? -ne 0 ]; then
27 echo "FAIL: mount $SDHC_DEVICE fail"
28 exit 1
29 else
30 cp /bin/busybox /mnt/sdhc
31 ls /mnt/sdhc |grep busybox
32 if [ $? -ne 0 ]; then
33 echo "FAIL: read or write $SDHC_DEVICE fail"
34 exit 1
35 else
36 umount $SDHC_DEVICE
37 echo "PASS: read or write $SDHC_DEVICE success"
38 fi
39 fi
40fi
diff --git a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/spi b/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/spi
deleted file mode 100755
index a601517..0000000
--- a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/spi
+++ /dev/null
@@ -1,48 +0,0 @@
1#!/bin/sh
2
3#An spi flash M25P80 connect to b4860qds-64b cpu by spi bus, so the method
4#is to read/write spi flash to verify whether the spi bus driver worked
5#or not.
6
7MTD_CHAR_DEVICE="/dev/mtd2"
8MTD_BLOCK_DEVICE="/dev/mtdblock2"
9
10if [ ! -e $MTD_CHAR_DEVICE ]; then
11 echo "FAIL: spi flash device $MTD_CHAR_DEVICE does not exist"
12 exit 1
13else
14 echo "PASS: spi flash device $MTD_CHAR_DEVICE exists"
15fi
16
17if [ ! -e $MTD_BLOCK_DEVICE ]; then
18 echo "FAIL: spi flash device $MTD_BLOCK_DEVICE does not exist"
19 exit 1
20else
21 echo "PASS: spi flash device $MTD_BLOCK_DEVICE exists"
22fi
23
24/usr/sbin/flash_erase -j $MTD_CHAR_DEVICE 0 0
25if [ $? -ne 0 ]; then
26 echo "FAIL: format spi flash device $MTD_BLOCK_DEVICE fail"
27 exit 1
28else
29 mkdir -p /mnt/spi
30 mount -t jffs2 $MTD_BLOCK_DEVICE /mnt/spi
31 if [ $? -ne 0 ]; then
32 echo "FAIL: mount spi flash device $MTD_BLOCK_DEVICE fail"
33 exit 1
34 else
35 cp /bin/busybox /mnt/spi
36 ls /mnt/spi |grep busybox
37 if [ $? -ne 0 ]; then
38 echo "FAIL: read or write spi flash device $MTD_BLOCK_DEVICE fail"
39 exit 1
40 else
41 umount $MTD_BLOCK_DEVICE
42 echo "PASS: read or write spi flash device $MTD_BLOCK_DEVICE success"
43 fi
44 fi
45fi
46
47echo "PASS: spi bus test passed"
48exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/usb b/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/usb
deleted file mode 100755
index 017287f..0000000
--- a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/usb
+++ /dev/null
@@ -1,48 +0,0 @@
1#!/bin/sh
2#
3#This script is to test usb devices on p2041rdb target
4#
5
6USB_DISK=`ls /dev/sd*[1-9] | sort | tail -n 1`
7
8usbutils_is_installed=`which lsusb`
9if [ -z $usbutils_is_installed ]; then
10 echo "FAIL: Cannot find lsusb"
11 exit 1
12else
13 echo "PASS: usbutils found"
14fi
15
16usbdev_num=`lsusb | grep -v root\ hub | wc -l`
17if [ $usbdev_num -eq 0 ]; then
18 echo "FAIL: USB device is not connected"
19 exit 1
20else
21 echo "PASS: $usbdev_num USB device(s) connected"
22fi
23
24lsusb | grep -v root\ hub
25mkdir -p /mnt/usb_ehci
26mount $USB_DISK /mnt/usb_ehci
27if [ $? -ne 0 ]; then
28 echo "FAIL: Mount USB device failed"
29 exit 1
30else
31 echo "PASS: Mount USB device succeed"
32fi
33
34echo "Begin test usb device..."
35dd if=/dev/urandom of=/mnt/usb_ehci/testfile bs=1M count=50
36if [ $? -ne 0 ]; then
37 echo "FAIL: test failed"
38 rm -f /mnt/usb_ehci_testfile
39 umount /mnt/usb_ehci
40 rm -fr /mnt/usb_ehci
41 exit 1
42fi
43
44echo "PASS: test succeed"
45rm -f /mnt/usb_ehci_testfile
46umount /mnt/usb_ehci
47rm -fr /mnt/usb_ehci
48exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/watchdog b/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/watchdog
deleted file mode 100755
index 165bc12..0000000
--- a/recipes-test/ddt-runner/files/scripts/imx6qsabrelite/watchdog
+++ /dev/null
@@ -1,63 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test watchdog functionality for bsc9131rdb.
4
5WATCHDOG=`which watchdog`
6if [ "x$WATCHDOG" != "x" ]; then
7 echo "PASS: watchdog found"
8else
9 echo "FAIL: watchdog not found"
10 exit 1
11fi
12
13WATCHDOG_CONF=/etc/watchdog.conf
14if [ -f $WATCHDOG_CONF ]; then
15 echo "PASS: watchdog config file found"
16 sed -i '23,23 s/#//' $WATCHDOG_CONF
17else
18 echo "FAIL: watchdog config file not found"
19 exit 1
20fi
21
22$WATCHDOG -v /dev/watchdog
23watchdog_thread=`ps | grep -c 'watchdog -v /dev/watchdog'`
24if [ $watchdog_thread -eq 2 ]; then
25 echo "PASS: Watchdog daemon started successfully"
26else
27 echo "FAIL: Failed to start watchdog daemon"
28 exit 1
29fi
30
31sleep 5s
32
33killall watchdog
34
35retry=0
36while [ $retry -lt 10 ]
37do
38 watchdog_thread=`ps | grep -c 'watchdog -v /dev/watchdog'`
39 if [ $watchdog_thread -eq 1 ]; then
40 echo "PASS: Watchdog daemon stopped successfully"
41 break;
42 fi
43 sleep 1s
44 retry=`expr $retry + 1`
45done
46
47if [ $retry -eq 10 ]; then
48 echo "FAIL: Failed to stop watchdog daemon"
49fi
50
51found=0
52while read line
53do
54 result=`echo $line | grep -c 'still alive after 1 interval'`
55 if [ $result -eq 1 ]; then
56 echo "PASS: Watchdog is still alive after 1 interval"
57 found=1
58 fi
59done < /var/log/messages
60
61if [ $found -eq 0 ]; then
62 echo "FAIL: Watchdog is not alive after 1 interval"
63fi
diff --git a/recipes-test/ddt-runner/files/scripts/k2hk-evm/ethernet b/recipes-test/ddt-runner/files/scripts/k2hk-evm/ethernet
deleted file mode 100755
index 08296e5..0000000
--- a/recipes-test/ddt-runner/files/scripts/k2hk-evm/ethernet
+++ /dev/null
@@ -1,88 +0,0 @@
1#!/bin/sh
2
3ethernet_interface="eth1"
4#sestord02 ip address
5ethernet_ping_ipaddr="172.21.3.22"
6ethernet_ipaddr=$1
7
8IFCONFIG=`which ifconfig`
9
10$IFCONFIG $ethernet_interface up
11$IFCONFIG | grep $ethernet_interface
12if [ $? -ne 0 ]; then
13 echo "FAIL: $ethernet_interface is not up"
14 exit 1
15else
16 echo "PASS: $ethernet_interface is up"
17fi
18
19if [ "x$ethernet_ipaddr" != "x" ]; then
20 $IFCONFIG $ethernet_interface $ethernet_ipaddr
21fi
22
23$IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}'
24if [ $? -ne 0 ]; then
25 echo "FAIL: ipaddr of $ethernet_interface setup failed"
26 exit 1
27else
28 echo "PASS: ipaddr of $ethernet_interface setup success"
29fi
30
31mindatasize=56
32maxdatasize=650
33stepsize=100
34iteration=1
35datasize=$mindatasize
36logfile=`/bin/mktemp`
37statistics=`/bin/mktemp`
38error=0
39
40trap cleanup SIGHUP SIGINT SIGTERM
41
42clean_tasks() {
43 echo "Executing clean up tasks"
44 rm -f $logfile $statistics
45}
46
47cleanup() {
48 echo "Aborting script execution"
49 clean_tasks
50 exit 0
51}
52
53echo "start ping test for $ethernet_interface..."
54
55while [ $datasize -le $maxdatasize ]; do
56 for i in `seq 1 $iteration`; do
57 ping -c 1 -s $datasize $ethernet_ping_ipaddr > $statistics
58 ping_err=`echo $?`
59 echo "" && cat $statistics | grep -r "PING"
60 cat $statistics | grep -r "received"
61 [ `echo $?` -eq 0 ] || packets_received=0 && \
62 packets_received=`cat $statistics | \
63 grep -r "received" | awk '{print$4}'`
64
65 # Evaluate possible errors on the ping operation
66 if [ $ping_err -ne 0 ] || [ $packets_received -eq 0 ]; then
67 error=1
68 echo -e `cat $statistics | grep -r PING` >> $logfile
69 echo -e "Size: $datasize Iteration: $i\n" >> $logfile
70 fi
71 done
72 let datasize=$datasize+$stepsize
73done
74
75# Report failures
76if [ $error -eq 1 ]; then
77 echo -e "=================== error report ===================\n"
78 cat $logfile
79 echo -e "====================================================\n"
80 clean_tasks
81 echo -e "FAIL: ping test for $ethernet_interface failed\n"
82 exit 1
83else
84 clean_tasks
85 echo -e "PASS: ping test for $ethernet_interface success\n"
86fi
87
88exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/k2hk-evm/flash b/recipes-test/ddt-runner/files/scripts/k2hk-evm/flash
deleted file mode 100755
index 2bc0513..0000000
--- a/recipes-test/ddt-runner/files/scripts/k2hk-evm/flash
+++ /dev/null
@@ -1,49 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test flash driver functionality. I removed the write
4# operations since all partition are in use in k2hk-evm and there might be
5# possibility of corrupting data even if we backup in test script.
6
7if part_num=`cat /proc/mtd | grep -c 'mtd'`; then
8 echo "PASS: show $part_num partitions"
9else
10 echo "FAIL: show $part_num partitions"
11 exit 1
12fi
13
14for((part=0; part<$part_num; part++));
15do
16 if [ $(mtd_debug info /dev/mtd$part | grep -c 'mtd.type') ]; then
17 echo "PASS: show partition $part debug info"
18 else
19 echo "FAIL: show partition $part debug info"
20 exit 1
21 fi
22done
23
24READ_TEST=`find / -name mtd_readtest.ko -print`
25
26if [ ! -e $READ_TEST ]; then
27 echo "FAIL: $READ_TEST does not exist"
28 exit 1
29else
30 echo "PASS: $READ_TEST exists"
31fi
32
33for((part=0; part<$part_num; part++));
34do
35 dmesg -c
36
37 insmod $READ_TEST dev=$part
38
39 finish=`dmesg | grep -c 'mtd_readtest: finished'`
40 if [ $finish -eq 1 ]; then
41 echo "PASS: read test $part"
42 else
43 echo "FAIL: read test $part"
44 rmmod $READ_TEST
45 exit 1
46 fi
47
48 rmmod $READ_TEST
49done
diff --git a/recipes-test/ddt-runner/files/scripts/k2hk-evm/i2c b/recipes-test/ddt-runner/files/scripts/k2hk-evm/i2c
deleted file mode 100755
index 03af421..0000000
--- a/recipes-test/ddt-runner/files/scripts/k2hk-evm/i2c
+++ /dev/null
@@ -1,42 +0,0 @@
1#!/bin/sh
2# This script is used to test i2c bus functionality for k2hk-evm board.
3
4if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then
5 echo "PASS: found $I2C_ADAPTERS i2c adapters"
6else
7 echo "FAIL: no i2c adapters found"
8 exit 1
9fi
10
11if [ -z "$adapters" ]; then
12 adapters=0
13fi
14
15while [ $adapters -lt $I2C_ADAPTERS ]
16do
17 i2cdetect -y $adapters
18 if [ $? -ne 0 ]; then
19 echo "FAIL: detect i2c adapter $adapters failed"
20 else
21 echo "PASS: detect i2c adapter $adapters success"
22 fi
23 adapters=`expr $adapters + 1`
24 sleep 1
25done
26
27i2cdetect -y 0
28if [ $? -ne 0 ]; then
29 echo "FAIL: detect i2c bus 0 fail"
30 exit 1
31else
32 echo "PASS: detect i2c bus 0 success"
33fi
34
35#i2c bus 0, device address 0x52, DDR3 DIMM Socket 1, SPD EEPROM
36i2cdump -f -y 0 0x52 |grep UG51U6400N8SU
37if [ $? -ne 0 ]; then
38 echo "FAIL: read SPD EEPROM on i2c bus 0 fail"
39 exit 1
40else
41 echo "PASS: read SPD EEPROM on i2c bus 0 success"
42fi
diff --git a/recipes-test/ddt-runner/files/scripts/k2hk-evm/spi b/recipes-test/ddt-runner/files/scripts/k2hk-evm/spi
deleted file mode 100755
index a2bb9c7..0000000
--- a/recipes-test/ddt-runner/files/scripts/k2hk-evm/spi
+++ /dev/null
@@ -1,48 +0,0 @@
1#!/bin/sh
2
3#An spi flash M25P80 connect to k2hk-evm cpu by spi bus, so the method
4#is to read/write spi flash to verify whether the spi bus driver worked
5#or not.
6
7MTD_CHAR_DEVICE="/dev/mtd4"
8MTD_BLOCK_DEVICE="/dev/mtdblock4"
9
10if [ ! -e $MTD_CHAR_DEVICE ]; then
11 echo "FAIL: spi flash device $MTD_CHAR_DEVICE does not exist"
12 exit 1
13else
14 echo "PASS: spi flash device $MTD_CHAR_DEVICE exists"
15fi
16
17if [ ! -e $MTD_BLOCK_DEVICE ]; then
18 echo "FAIL: spi flash device $MTD_BLOCK_DEVICE does not exist"
19 exit 1
20else
21 echo "PASS: spi flash device $MTD_BLOCK_DEVICE exists"
22fi
23
24/usr/sbin/flash_erase -j $MTD_CHAR_DEVICE 0 0
25if [ $? -ne 0 ]; then
26 echo "FAIL: format spi flash device $MTD_BLOCK_DEVICE fail"
27 exit 1
28else
29 mkdir -p /mnt/spi
30 mount -t jffs2 $MTD_BLOCK_DEVICE /mnt/spi
31 if [ $? -ne 0 ]; then
32 echo "FAIL: mount spi flash device $MTD_BLOCK_DEVICE fail"
33 exit 1
34 else
35 cp /bin/busybox /mnt/spi
36 ls /mnt/spi |grep busybox
37 if [ $? -ne 0 ]; then
38 echo "FAIL: read or write spi flash device $MTD_BLOCK_DEVICE fail"
39 exit 1
40 else
41 umount $MTD_BLOCK_DEVICE
42 echo "PASS: read or write spi flash device $MTD_BLOCK_DEVICE success"
43 fi
44 fi
45fi
46
47echo "PASS: spi bus test passed"
48exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/p2020rdb/ethernet b/recipes-test/ddt-runner/files/scripts/p2020rdb/ethernet
deleted file mode 100755
index 5355f10..0000000
--- a/recipes-test/ddt-runner/files/scripts/p2020rdb/ethernet
+++ /dev/null
@@ -1,88 +0,0 @@
1#!/bin/sh
2
3ethernet_interface="eth1"
4ethernet_ping_ipaddr="172.21.3.22"
5ethernet_ipaddr=$1
6
7IFCONFIG=`which ifconfig`
8
9$IFCONFIG $ethernet_interface up
10$IFCONFIG | grep $ethernet_interface
11if [ $? -ne 0 ]; then
12 echo "FAIL: $ethernet_interface is not up"
13 exit 1
14else
15 echo "PASS: $ethernet_interface is up"
16fi
17
18if [ "x$ethernet_ipaddr" != "x" ]; then
19 $IFCONFIG $ethernet_interface $ethernet_ipaddr
20fi
21
22$IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}'
23if [ $? -ne 0 ]; then
24 echo "FAIL: ipaddr of $ethernet_interface setup failed"
25 exit 1
26else
27 echo "PASS: ipaddr of $ethernet_interface setup success"
28fi
29
30mindatasize=56
31maxdatasize=650
32stepsize=100
33iteration=1
34datasize=$mindatasize
35logfile=`/bin/mktemp`
36statistics=`/bin/mktemp`
37error=0
38
39trap cleanup SIGHUP SIGINT SIGTERM
40
41clean_tasks() {
42 echo "Executing clean up tasks"
43 rm -f $logfile $statistics
44}
45
46cleanup() {
47 echo "Aborting script execution"
48 clean_tasks
49 exit 0
50}
51
52echo "start ping test for $ethernet_interface..."
53
54while [ $datasize -le $maxdatasize ]; do
55 for i in `seq 1 $iteration`; do
56 ping -c 1 -s $datasize $ethernet_ping_ipaddr > $statistics
57 ping_err=`echo $?`
58 echo "" && cat $statistics | grep -r "PING"
59 cat $statistics | grep -r "received"
60 [ `echo $?` -eq 0 ] || packets_received=0 && \
61 packets_received=`cat $statistics | \
62 grep -r "received" | awk '{print$4}'`
63
64 # Evaluate possible errors on the ping operation
65 if [ $ping_err -ne 0 ] || [ $packets_received -eq 0 ]; then
66 error=1
67 echo -e `cat $statistics | grep -r PING` >> $logfile
68 echo -e "Size: $datasize Iteration: $i\n" >> $logfile
69 fi
70 done
71 let datasize=$datasize+$stepsize
72done
73
74# Report failures
75if [ $error -eq 1 ]; then
76 echo -e "=================== error report ===================\n"
77 cat $logfile
78 echo -e "====================================================\n"
79 clean_tasks
80 echo -e "FAIL: ping test for $ethernet_interface failed\n"
81 exit 1
82else
83 clean_tasks
84 echo -e "PASS: ping test for $ethernet_interface success\n"
85fi
86
87echo "PASS: $ethernet_interface test passed"
88exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/p2020rdb/flash b/recipes-test/ddt-runner/files/scripts/p2020rdb/flash
deleted file mode 100755
index 302e328..0000000
--- a/recipes-test/ddt-runner/files/scripts/p2020rdb/flash
+++ /dev/null
@@ -1,20 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test flash driver functionality. I removed the write
4# operations since all partition are in use in p2020rdb and there might be
5# possibility of corrupting data even if we backup in test script.
6
7if part_num=`cat /proc/mtd | grep -c 'mtd'`; then
8 echo "PASS: show $part_num partitions"
9else
10 echo "FAIL: show $part_num partitions"
11fi
12
13for((part=0; part<$part_num-1; part++));
14do
15 if [ $(mtd_debug info /dev/mtd$part | grep -c 'mtd.type') ]; then
16 echo "PASS: show partition $part debug info"
17 else
18 echo "FAIL: show partition $part debug info"
19 fi
20done
diff --git a/recipes-test/ddt-runner/files/scripts/p2020rdb/i2c b/recipes-test/ddt-runner/files/scripts/p2020rdb/i2c
deleted file mode 100755
index 5b312b9..0000000
--- a/recipes-test/ddt-runner/files/scripts/p2020rdb/i2c
+++ /dev/null
@@ -1,24 +0,0 @@
1#!/bin/sh
2
3if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then
4 echo "PASS: found $I2C_ADAPTERS i2c adapters"
5else
6 echo "FAIL: no i2c adapters found"
7 exit 1
8fi
9
10if [ -z "$adapters" ]; then
11 adapters=0
12fi
13
14while [ $adapters -lt $I2C_ADAPTERS ]
15do
16 i2cdetect -y $adapters
17 if [ $? -ne 0 ]; then
18 echo "FAIL: detect i2c adapter $adapters failed"
19 else
20 echo "PASS: detect i2c adapter $adapters success"
21 fi
22 adapters=`expr $adapters + 1`
23 sleep 1
24done
diff --git a/recipes-test/ddt-runner/files/scripts/p2020rdb/spi b/recipes-test/ddt-runner/files/scripts/p2020rdb/spi
deleted file mode 100755
index fc673ad..0000000
--- a/recipes-test/ddt-runner/files/scripts/p2020rdb/spi
+++ /dev/null
@@ -1,48 +0,0 @@
1#!/bin/sh
2
3#An spi flash M25P80 connect to p2020 cpu by spi bus, so the method
4#is to read/write spi flash to verify whether the spi bus driver worked
5#or not.
6
7MTD_CHAR_DEVICE="/dev/mtd4"
8MTD_BLOCK_DEVICE="/dev/mtdblock4"
9
10if [ ! -e $MTD_CHAR_DEVICE ]; then
11 echo "FAIL: spi flash device $MTD_CHAR_DEVICE does not exist"
12 exit 1
13else
14 echo "PASS: spi flash device $MTD_CHAR_DEVICE exists"
15fi
16
17if [ ! -e $MTD_BLOCK_DEVICE ]; then
18 echo "FAIL: spi flash device $MTD_BLOCK_DEVICE does not exist"
19 exit 1
20else
21 echo "PASS: spi flash device $MTD_BLOCK_DEVICE exists"
22fi
23
24/usr/sbin/flash_erase -j $MTD_CHAR_DEVICE 0 0
25if [ $? -ne 0 ]; then
26 echo "FAIL: format spi flash device $MTD_BLOCK_DEVICE fail"
27 exit 1
28else
29 mkdir -p /mnt/spi
30 mount -t jffs2 $MTD_BLOCK_DEVICE /mnt/spi
31 if [ $? -ne 0 ]; then
32 echo "FAIL: mount spi flash device $MTD_BLOCK_DEVICE fail"
33 exit 1
34 else
35 cp /bin/busybox /mnt/spi
36 ls /mnt/spi |grep busybox
37 if [ $? -ne 0 ]; then
38 echo "FAIL: read or write spi flash device $MTD_BLOCK_DEVICE fail"
39 exit 1
40 else
41 umount $MTD_BLOCK_DEVICE
42 echo "PASS: read or write spi flash device $MTD_BLOCK_DEVICE success"
43 fi
44 fi
45fi
46
47echo "PASS: spi bus test passed"
48exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/p2020rdb/usb b/recipes-test/ddt-runner/files/scripts/p2020rdb/usb
deleted file mode 100755
index 970e913..0000000
--- a/recipes-test/ddt-runner/files/scripts/p2020rdb/usb
+++ /dev/null
@@ -1,100 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test usb functionality for p4080ds.
4#
5
6result=0
7devpath=""
8usbinfo=""
9
10usbutils_is_installed=`which lsusb`
11if [ -z $usbutils_is_installed ]; then
12 echo "FAIL: Cannot find lsusb"
13 exit 1
14fi
15
16usbdev_num=`lsusb | grep -v root\ hub | wc -l`
17if [ $usbdev_num -eq 0 ]; then
18 echo "FAIL: USB device is not connected"
19 exit 1
20else
21 echo "$usbdev_num USB device(s) connected"
22fi
23
24sd=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'`
25if [ -z "$sd" ]; then
26 echo "FAIL: find sd device"
27 exit 1
28else
29 echo "PASS: find sd device"
30fi
31
32HDPARM=`which hdparm`
33if [ -z $HDPARM ]; then
34 result=$?
35 echo "FAIL: find hdparm"
36fi
37 echo "PASS: find hdparm"
38
39for s in $sd
40do
41 devpath=`echo "$s" | awk -F "," '{print "/sys/dev/block/" $1 ":" $2}'`
42 usbinfo=`ls -l $devpath | grep usb`
43
44 if [ -z "$usbinfo" ] ; then
45 continue
46 fi
47
48 s=`echo "$s" | awk -F "," '{print $3}'`
49
50 echo "Testing $s"
51 $HDPARM -I $s
52 if [ $? -ne 0 ]; then
53 result=$?
54 echo "FAIL: $HDPARM -I $s Detailed/current information directly from $s"
55 else
56 echo "PASS: $HDPARM -I $s Detailed/current information directly from $s"
57 fi
58
59 $HDPARM -tT $s
60 if [ $? -ne 0 ]; then
61 result=$?
62 echo "FAIL: $HDPARM -tT $s Perform device/cache read timings on $s"
63 else
64 echo "PASS: $HDPARM -tT $s Perform device/cache read timings on $s"
65 fi
66
67 mkdir -p /mnt/usb_tmp
68 for partition in `ls "$s"[1-9]`
69 do
70 echo "Testing $partition"
71
72 mount "$partition" /mnt/usb_tmp
73 if [ $? -ne 0 ]; then
74 result=$?
75 echo "FAIL: mount $s"
76 else
77 echo "PASS: mount $s"
78 dd if=/dev/urandom of=/mnt/usb_tmp/writefile bs=1M count=50
79 if [ $? -ne 0 ]; then
80 result=$?
81 echo "FAIL: write test on $s"
82 else
83 echo "PASS: write test on $s"
84 rm -f /mnt/usb_tmp/writefile
85 fi
86 dd if=$s of=/mnt/usb_tmp/readfile bs=1M count=10
87 if [ $? -ne 0 ]; then
88 result=$?
89 echo "FAIL: read test on $s"
90 else
91 echo "PASS: read test on $s"
92 rm -f /mnt/usb_tmp/readfile
93 fi
94 umount /mnt/usb_tmp
95 fi
96 done
97
98 rm -fr /mnt/usb_tmp
99done
100exit $result
diff --git a/recipes-test/ddt-runner/files/scripts/p2041rdb/ethernet b/recipes-test/ddt-runner/files/scripts/p2041rdb/ethernet
deleted file mode 100755
index 0f2b4cf..0000000
--- a/recipes-test/ddt-runner/files/scripts/p2041rdb/ethernet
+++ /dev/null
@@ -1,111 +0,0 @@
1#!/bin/sh
2
3
4exit1() {
5 echo $@ >&2
6 exit 1
7}
8
9
10err() {
11 echo $@ >&2
12 exit_status=1
13}
14
15
16get_default_gw() {
17 echo $(route | grep default | awk '{ print $2 }')
18}
19
20
21test_eth_device() {
22 local readonly dev=$1
23 local readonly ethernet_ping_ipaddr=$2
24 local readonly MINDATASIZE=56
25 local readonly MAXDATASIZE=650
26 local readonly STEPSIZE=100
27 local readonly ITERATION=2
28 local datasize
29 local i
30 local ping_err
31 for i in `seq 1 $ITERATION`; do
32 datasize=$MINDATASIZE
33 while [ $datasize -le $MAXDATASIZE ]; do
34 ping -I $dev -c 1 -s $datasize $ethernet_ping_ipaddr > $STATISTICS
35 ping_err=$?
36 packets_received=`cat $STATISTICS | grep "received" |
37 awk '{print$4}'`
38
39 # Evaluate possible errors on the ping operation
40 if [ $ping_err -ne 0 ] || [ -z "$packets_received" ] ||
41 [ $packets_received -eq 0 ]; then
42 err "FAIL: ping $ethernet_ping_ipaddr through $dev"
43 cat $STATISTICS >> $LOGFILE
44 echo "Size: $datasize Iteration: $i" >> $LOGFILE
45 fi
46 datasize=$((datasize+STEPSIZE))
47 done
48 done
49}
50
51
52clean_tasks() {
53 echo "Executing clean up tasks"
54 rm -f $LOGFILE $STATISTICS
55}
56
57
58cleanup() {
59 echo "Aborting script execution"
60 clean_tasks
61 exit 1
62}
63
64
65
66readonly LOGFILE=`/bin/mktemp`
67readonly STATISTICS=`/bin/mktemp`
68exit_status=0
69
70trap cleanup SIGHUP SIGINT SIGTERM
71
72
73
74readonly DEF_GW=$(get_default_gw)
75
76[ -n "$DEF_GW" ] && echo "Found default gw $DEF_GW" ||
77 exit1 "FAIL: no default gw"
78
79readonly S=:
80readonly DEVS="$(route -n | tail -n +3 | sort -k8 -u | awk '{print $8"'$S'"$2}')"
81
82if [ -n "$DEVS" ]; then
83 echo "Will test: $DEVS"
84else
85 exit1 "FAIL: no ethernet devices to test"
86fi
87
88for iface_gw in $DEVS; do
89 iface=$(echo "$iface_gw" | sed -n 's/\(.*\)'$S'.*/\1/p')
90 gw=$(echo "$iface_gw" | sed -n 's/.*'$S'\(.*\)/\1/p')
91 if [ -z "$gw" ]; then
92 err "FAIL: no ethernet gateway for $iface"
93 else
94 [ "$gw" = 0.0.0.0 ] && gw="$DEF_GW"
95 echo "Testing $iface:$gw"
96 test_eth_device $iface $gw
97 fi
98done
99
100# Report failures
101if [ $exit_status -ne 0 ]; then
102 echo "=================== error report ==================="
103 cat $LOGFILE
104 echo "===================================================="
105 echo "FAIL: ping test"
106else
107 echo "PASS: ping test success"
108fi
109
110clean_tasks
111exit $exit_status
diff --git a/recipes-test/ddt-runner/files/scripts/p2041rdb/flash b/recipes-test/ddt-runner/files/scripts/p2041rdb/flash
deleted file mode 100755
index 2d10600..0000000
--- a/recipes-test/ddt-runner/files/scripts/p2041rdb/flash
+++ /dev/null
@@ -1,49 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test flash driver functionality. I removed the write
4# operations since all partition are in use in p2041rdb and there might be
5# possibility of corrupting data even if we backup in test script.
6
7if part_num=`cat /proc/mtd | grep -c 'mtd'`; then
8 echo "PASS: show $part_num partitions"
9else
10 echo "FAIL: show $part_num partitions"
11 exit 1
12fi
13
14for((part=0; part<$part_num; part++));
15do
16 if [ $(mtd_debug info /dev/mtd$part | grep -c 'mtd.type') ]; then
17 echo "PASS: show partition $part debug info"
18 else
19 echo "FAIL: show partition $part debug info"
20 exit 1
21 fi
22done
23
24READ_TEST=`find / -name mtd_readtest.ko -print`
25
26if [ ! -e $READ_TEST ]; then
27 echo "FAIL: $READ_TEST does not exist"
28 exit 1
29else
30 echo "PASS: $READ_TEST exists"
31fi
32
33for((part=0; part<$part_num; part++));
34do
35 dmesg -c
36
37 insmod $READ_TEST dev=$part
38
39 finish=`dmesg | grep -c 'mtd_readtest: finished'`
40 if [ $finish -eq 1 ]; then
41 echo "PASS: read test $part"
42 else
43 echo "FAIL: read test $part"
44 rmmod $READ_TEST
45 exit 1
46 fi
47
48 rmmod $READ_TEST
49done
diff --git a/recipes-test/ddt-runner/files/scripts/p2041rdb/i2c b/recipes-test/ddt-runner/files/scripts/p2041rdb/i2c
deleted file mode 100755
index 58800ce..0000000
--- a/recipes-test/ddt-runner/files/scripts/p2041rdb/i2c
+++ /dev/null
@@ -1,44 +0,0 @@
1#!/bin/sh
2# This script is used to test i2c bus functionality for p2041rdb board.
3
4if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then
5 echo "PASS: found $I2C_ADAPTERS i2c adapters"
6else
7 echo "FAIL: no i2c adapters found"
8 exit 1
9fi
10
11if [ -z "$adapters" ]; then
12 adapters=0
13fi
14
15while [ $adapters -lt $I2C_ADAPTERS ]
16do
17 i2cdetect -y $adapters
18 if [ $? -ne 0 ]; then
19 echo "FAIL: detect i2c adapter $adapters failed"
20 else
21 echo "PASS: detect i2c adapter $adapters success"
22 fi
23 adapters=`expr $adapters + 1`
24 sleep 1
25done
26
27i2cdetect -y 0
28if [ $? -ne 0 ]; then
29 echo "FAIL: detect i2c bus 0 fail"
30 exit 1
31else
32 echo "PASS: detect i2c bus 0 success"
33fi
34
35#i2c bus 0, device address 0x52, DDR3 DIMM Socket 1, SPD EEPROM
36i2cdump -f -y 0 0x52 |grep UG51U6400N8SU
37if [ $? -ne 0 ]; then
38 echo "FAIL: read SPD EEPROM on i2c bus 0 fail"
39 exit 1
40else
41 echo "PASS: read SPD EEPROM on i2c bus 0 success"
42fi
43
44
diff --git a/recipes-test/ddt-runner/files/scripts/p2041rdb/pci-express b/recipes-test/ddt-runner/files/scripts/p2041rdb/pci-express
deleted file mode 100755
index 91db286..0000000
--- a/recipes-test/ddt-runner/files/scripts/p2041rdb/pci-express
+++ /dev/null
@@ -1,109 +0,0 @@
1#!/bin/sh
2
3ethernet_interface="eth0"
4#sestord02 ip address
5ethernet_ping_ipaddr="172.21.3.22"
6ethernet_ipaddr=$1
7
8#Intel Corporation 82574L Gigabit Network Card (intel e1000e)
9vendor_id="8086"
10product_id="10d3"
11
12#find vendor id & product id
13lspci -nn |grep $vendor_id:$product_id
14if [ $? -ne 0 ]; then
15 echo "FAIL: pci-e ethernet card device does not exist"
16 exit 1
17else
18 echo "PASS: got pci-e ethernet card device"
19fi
20
21setpci -v -d $vendor_id:$product_id latency_timer=b0
22if [ $? -ne 0 ]; then
23 echo "FAIL: parameter changes to pci config space failed"
24 exit 1
25else
26 echo "PASS: parameter changes to pci config space success"
27fi
28
29IFCONFIG=`which ifconfig`
30
31$IFCONFIG $ethernet_interface up
32$IFCONFIG | grep $ethernet_interface
33if [ $? -ne 0 ]; then
34 echo "FAIL: pci-e ethernet card device $ethernet_interface is not up"
35 exit 1
36else
37 echo "PASS: pci-e ethernet card device $ethernet_interface is up"
38fi
39
40if [ "x$ethernet_ipaddr" != "x" ]; then
41 $IFCONFIG $ethernet_interface $ethernet_ipaddr
42fi
43
44$IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}'
45if [ $? -ne 0 ]; then
46 echo "FAIL: ipaddr of pci-e ethernet card device $ethernet_interface setup failed"
47 exit 1
48else
49 echo "PASS: ipaddr of pci-e ethernet card device $ethernet_interface setup success"
50fi
51
52mindatasize=56
53maxdatasize=650
54stepsize=100
55iteration=1
56datasize=$mindatasize
57logfile=`/bin/mktemp`
58statistics=`/bin/mktemp`
59error=0
60
61trap cleanup SIGHUP SIGINT SIGTERM
62
63clean_tasks() {
64 echo "Executing clean up tasks"
65 rm -f $logfile $statistics
66}
67
68cleanup() {
69 echo "Aborting script execution"
70 clean_tasks
71 exit 0
72}
73
74echo "start ping test for pci-e ethernet card device $ethernet_interface..."
75
76while [ $datasize -le $maxdatasize ]; do
77 for i in `seq 1 $iteration`; do
78 ping -c 1 -s $datasize $ethernet_ping_ipaddr > $statistics
79 ping_err=`echo $?`
80 echo "" && cat $statistics | grep -r "PING"
81 cat $statistics | grep -r "received"
82 [ `echo $?` -eq 0 ] || packets_received=0 && \
83 packets_received=`cat $statistics | \
84 grep -r "received" | awk '{print$4}'`
85
86 # Evaluate possible errors on the ping operation
87 if [ $ping_err -ne 0 ] || [ $packets_received -eq 0 ]; then
88 error=1
89 echo -e `cat $statistics | grep -r PING` >> $logfile
90 echo -e "Size: $datasize Iteration: $i\n" >> $logfile
91 fi
92 done
93 let datasize=$datasize+$stepsize
94done
95
96# Report failures
97if [ $error -eq 1 ]; then
98 echo -e "=================== error report ===================\n"
99 cat $logfile
100 echo -e "====================================================\n"
101 clean_tasks
102 echo -e "FAIL: ping test for pci-e ethernet card device $ethernet_interface failed\n"
103 exit 1
104else
105 clean_tasks
106 echo -e "PASS: ping test for pci-e ethernet card device $ethernet_interface success\n"
107fi
108
109exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/p2041rdb/sata b/recipes-test/ddt-runner/files/scripts/p2041rdb/sata
deleted file mode 100755
index b7f1fab..0000000
--- a/recipes-test/ddt-runner/files/scripts/p2041rdb/sata
+++ /dev/null
@@ -1,81 +0,0 @@
1#!/bin/sh
2#
3#This script is to test sata devices on target
4#
5result=0
6devpath=""
7satainfo=""
8SD=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'`
9if [ -z "$SD" ]; then
10 echo "FAIL: find sata device"
11 exit 1
12else
13 echo "PASS: find sata device"
14fi
15HDPARM=`which hdparm`
16if [ -z $HDPARM ]; then
17 result=$?
18 echo "FAIL: find hdparm"
19fi
20 echo "PASS: find hdparm"
21
22
23for s in $SD
24 do
25 devpath=`echo "$s" | awk -F "," '{print "/sys/dev/block/" $1 ":" $2}'`
26 satainfo=`ls -l $devpath | grep sata`
27
28 if [ -z "$satainfo" ] ; then
29 continue
30 fi
31 s=`echo "$s" | awk -F "," '{print $3}'`
32
33 echo "testing $s"
34 $HDPARM -I $s
35 if [ $? -ne 0 ]; then
36 result=$?
37 echo "FAIL: $HDPARM -I $s Detailed/current information directly from $s"
38 else
39 echo "PASS: $HDPARM -I $s Detailed/current information directly from $s"
40 fi
41 $HDPARM -tT $s
42 if [ $? -ne 0 ]; then
43 result=$?
44 echo "FAIL: $HDPARM -tT $s Perform device/cache read timings on $s"
45 else
46 echo "PASS: $HDPARM -tT $s Perform device/cache read timings on $s"
47 fi
48
49
50 mkdir -p /mnt/sata_tmp
51 for partition in `ls "$s"[1-9]`
52 do
53 mount "$partition" /mnt/sata_tmp
54 if [ $? -ne 0 ]; then
55 result=$?
56 echo "FAIL: Mount $s"
57 else
58 echo "PASS: Mount $s"
59 dd if=/dev/urandom of=/mnt/sata_tmp/writefile bs=1M count=50
60 if [ $? -ne 0 ]; then
61 result=$?
62 echo "FAIL: write test on $s"
63 else
64 echo "PASS: write test on $s"
65 rm -f /mnt/sata_tmp/writefile
66 fi
67 dd if=$s of=/mnt/sata_tmp/readfile bs=1M count=10
68 if [ $? -ne 0 ]; then
69 result=$?
70 echo "FAIL: read test on $s"
71 else
72 echo "PASS: read test on $s"
73 rm -f /mnt/sata_tmp/readfile
74 fi
75 umount /mnt/sata_tmp
76 fi
77 done
78
79 rm -fr /mnt/sata_tmp
80done
81exit $result
diff --git a/recipes-test/ddt-runner/files/scripts/p2041rdb/sdhc b/recipes-test/ddt-runner/files/scripts/p2041rdb/sdhc
deleted file mode 100755
index bc3026b..0000000
--- a/recipes-test/ddt-runner/files/scripts/p2041rdb/sdhc
+++ /dev/null
@@ -1,41 +0,0 @@
1#!/bin/sh
2
3#the content of SD will be lost by running this test case.
4
5SDHC_DEVICE="/dev/mmcblk0p1"
6
7if [ ! -e $SDHC_DEVICE ]; then
8 echo "FAIL: $SDHC_DEVICE does not exist"
9 exit 1
10else
11 echo "PASS: $SDHC_DEVICE device exists"
12fi
13
14mount |grep mmcblk0p1
15if [ $? -eq 0 ]; then
16 umount $SDHC_DEVICE
17fi
18
19/sbin/mkfs.ext2 $SDHC_DEVICE
20if [ $? -ne 0 ]; then
21 echo "FAIL: format $SDHC_DEVICE fail"
22 exit 1
23else
24 mkdir -p /mnt/sdhc
25 mount $SDHC_DEVICE /mnt/sdhc
26 if [ $? -ne 0 ]; then
27 echo "FAIL: mount $SDHC_DEVICE fail"
28 exit 1
29 else
30 cp /bin/busybox /mnt/sdhc
31 ls /mnt/sdhc |grep busybox
32 if [ $? -ne 0 ]; then
33 echo "FAIL: read or write $SDHC_DEVICE fail"
34 exit 1
35 else
36 umount $SDHC_DEVICE
37 echo "PASS: read or write $SDHC_DEVICE success"
38 fi
39 fi
40fi
41
diff --git a/recipes-test/ddt-runner/files/scripts/p2041rdb/tempsensors b/recipes-test/ddt-runner/files/scripts/p2041rdb/tempsensors
deleted file mode 100755
index 036ccfa..0000000
--- a/recipes-test/ddt-runner/files/scripts/p2041rdb/tempsensors
+++ /dev/null
@@ -1,60 +0,0 @@
1#!/bin/sh
2#
3# This script checks that expected temperature sensors are available on pd2901,
4# and that their reported values fall within a reasonable range.
5
6# Expected available sensors
7SENSORS="adt7461-i2c-0-4c"
8
9# Default accepted temperature range
10tempmin=20
11tempmax=80
12
13usage="Usage: $0 min max"
14
15SENSORS_CMD=`which sensors`
16if [ -z $SENSORS_CMD ]; then
17 echo "FAIL: Cannot find sensors command"
18 exit 1
19fi
20
21if [ -n "$1" ]; then
22 if [ -z "$2" ]; then
23 echo $usage
24 echo "FAIL: No max value provided."
25 exit 1
26 fi
27 tempmin=$1
28 tempmax=$2
29 if [ "$tempmin" -gt "$tempmax" ]; then
30 echo $usage
31 echo "FAIL: Invalid range provided (min > max)."
32 exit 1
33 fi
34fi
35
36echo "Checking temperature sensor readings (valid range: $tempmin C - $tempmax C)"
37
38for sensor in $SENSORS
39do
40 sensorinfo=$($SENSORS_CMD $sensor)
41 if [ $? -ne 0 ]; then
42 echo "FAIL: Sensor $sensor not found"
43 exit 1
44 fi
45
46 # Get temperature readings for each sensor (ignore decimals)
47 for temp in $($SENSORS_CMD $sensor | grep temp | awk -F'[+|.]' {'print $2'})
48 do
49 if [ "$temp" -ge $tempmin ] && [ "$temp" -le $tempmax ]; then
50 echo $sensor ": " $temp " OK"
51 else
52 echo $sensor ": " $temp " NOK"
53 echo "FAIL: Temperature outside valid range."
54 exit 1
55 fi
56 done
57done
58
59echo "PASS: temperature sensors"
60exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/p2041rdb/usb b/recipes-test/ddt-runner/files/scripts/p2041rdb/usb
deleted file mode 100755
index 017287f..0000000
--- a/recipes-test/ddt-runner/files/scripts/p2041rdb/usb
+++ /dev/null
@@ -1,48 +0,0 @@
1#!/bin/sh
2#
3#This script is to test usb devices on p2041rdb target
4#
5
6USB_DISK=`ls /dev/sd*[1-9] | sort | tail -n 1`
7
8usbutils_is_installed=`which lsusb`
9if [ -z $usbutils_is_installed ]; then
10 echo "FAIL: Cannot find lsusb"
11 exit 1
12else
13 echo "PASS: usbutils found"
14fi
15
16usbdev_num=`lsusb | grep -v root\ hub | wc -l`
17if [ $usbdev_num -eq 0 ]; then
18 echo "FAIL: USB device is not connected"
19 exit 1
20else
21 echo "PASS: $usbdev_num USB device(s) connected"
22fi
23
24lsusb | grep -v root\ hub
25mkdir -p /mnt/usb_ehci
26mount $USB_DISK /mnt/usb_ehci
27if [ $? -ne 0 ]; then
28 echo "FAIL: Mount USB device failed"
29 exit 1
30else
31 echo "PASS: Mount USB device succeed"
32fi
33
34echo "Begin test usb device..."
35dd if=/dev/urandom of=/mnt/usb_ehci/testfile bs=1M count=50
36if [ $? -ne 0 ]; then
37 echo "FAIL: test failed"
38 rm -f /mnt/usb_ehci_testfile
39 umount /mnt/usb_ehci
40 rm -fr /mnt/usb_ehci
41 exit 1
42fi
43
44echo "PASS: test succeed"
45rm -f /mnt/usb_ehci_testfile
46umount /mnt/usb_ehci
47rm -fr /mnt/usb_ehci
48exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/p3041ds/ethernet b/recipes-test/ddt-runner/files/scripts/p3041ds/ethernet
deleted file mode 100755
index b350ddc..0000000
--- a/recipes-test/ddt-runner/files/scripts/p3041ds/ethernet
+++ /dev/null
@@ -1,111 +0,0 @@
1#!/bin/sh
2
3
4exit1() {
5 echo $@ >&2
6 exit 1
7}
8
9
10err() {
11 echo $@ >&2
12 exit_status=1
13}
14
15
16get_default_gw() {
17 echo $(route | grep default | awk '{ print $2 }')
18}
19
20
21test_eth_device() {
22 local readonly dev=$1
23 local readonly ethernet_ping_ipaddr=$2
24 local readonly MINDATASIZE=56
25 local readonly MAXDATASIZE=650
26 local readonly STEPSIZE=100
27 local readonly ITERATION=2
28 local datasize
29 local i
30 local ping_err
31 for i in `seq 1 $ITERATION`; do
32 datasize=$MINDATASIZE
33 while [ $datasize -le $MAXDATASIZE ]; do
34 ping -I $dev -c 1 -s $datasize $ethernet_ping_ipaddr > $STATISTICS
35 ping_err=$?
36 packets_received=`cat $STATISTICS | grep "received" |
37 awk '{print$4}'`
38
39 # Evaluate possible errors on the ping operation
40 if [ $ping_err -ne 0 ] || [ -z "$packets_received" ] ||
41 [ $packets_received -eq 0 ]; then
42 err "FAIL: ping $ethernet_ping_ipaddr through $dev"
43 cat $STATISTICS >> $LOGFILE
44 echo "Size: $datasize Iteration: $i" >> $LOGFILE
45 fi
46 datasize=$((datasize+STEPSIZE))
47 done
48 done
49}
50
51
52clean_tasks() {
53 echo "Executing clean up tasks"
54 rm -f $LOGFILE $STATISTICS
55}
56
57
58cleanup() {
59 echo "Aborting script execution"
60 clean_tasks
61 exit 1
62}
63
64
65
66readonly LOGFILE=`/bin/mktemp`
67readonly STATISTICS=`/bin/mktemp`
68exit_status=0
69
70trap cleanup SIGHUP SIGINT SIGTERM
71
72
73
74readonly DEF_GW=$(get_default_gw)
75
76[ -n "$DEF_GW" ] && echo "Found default gw $DEF_GW" ||
77 exit1 "FAIL: no default gw"
78
79readonly S=:
80readonly DEVS="$(route -n | tail -n +3 | sort -k8 -u | awk '{print $8"'$S'"$2}')"
81
82if [ -n "$DEVS" ]; then
83 echo "Will test: $DEVS"
84else
85 exit1 "FAIL: no ethernet devices to test"
86fi
87
88for iface_gw in $DEVS; do
89 iface=$(echo "$iface_gw" | sed -n 's/\(.*\)'$S'.*/\1/p')
90 gw=$(echo "$iface_gw" | sed -n 's/.*'$S'\(.*\)/\1/p')
91 if [ -z "$gw" ]; then
92 err "FAIL: no ethernet gateway for $iface"
93 else
94 [ "$gw" = 0.0.0.0 ] && gw="$DEF_GW"
95 echo "Testing $iface:$gw"
96 test_eth_device $iface $gw
97 fi
98done
99
100# Report failures
101if [ $exit_status -ne 0 ]; then
102 echo "=================== error report ==================="
103 cat $LOGFILE
104 echo "===================================================="
105 echo "FAIL: ping test"
106else
107 echo "PASS: ping test success"
108fi
109
110clean_tasks
111exit $exit_status
diff --git a/recipes-test/ddt-runner/files/scripts/p3041ds/flash b/recipes-test/ddt-runner/files/scripts/p3041ds/flash
deleted file mode 100755
index 12fe9b0..0000000
--- a/recipes-test/ddt-runner/files/scripts/p3041ds/flash
+++ /dev/null
@@ -1,47 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test flash driver functionality.
4
5if part_num=`cat /proc/mtd | grep -c 'mtd'`; then
6 echo "PASS: show $part_num partitions"
7else
8 echo "FAIL: show $part_num partitions"
9 exit 1
10fi
11
12for((part=0; part<$part_num; part++));
13do
14 if [ $(mtd_debug info /dev/mtd$part | grep -c 'mtd.type') ]; then
15 echo "PASS: show partition $part debug info"
16 else
17 echo "FAIL: show partition $part debug info"
18 exit 1
19 fi
20done
21
22READ_TEST=`find / -name mtd_readtest.ko -print`
23
24if [ ! -e $READ_TEST ]; then
25 echo "FAIL: $READ_TEST does not exist"
26 exit 1
27else
28 echo "PASS: $READ_TEST exists"
29fi
30
31for((part=0; part<$part_num; part++));
32do
33 dmesg -c
34
35 insmod $READ_TEST dev=$part
36
37 finish=`dmesg | grep -c 'mtd_readtest: finished'`
38 if [ $finish -eq 1 ]; then
39 echo "PASS: read test $part"
40 else
41 echo "FAIL: read test $part"
42 rmmod $READ_TEST
43 exit 1
44 fi
45
46 rmmod $READ_TEST
47done
diff --git a/recipes-test/ddt-runner/files/scripts/p3041ds/i2c b/recipes-test/ddt-runner/files/scripts/p3041ds/i2c
deleted file mode 100755
index 8ee6d21..0000000
--- a/recipes-test/ddt-runner/files/scripts/p3041ds/i2c
+++ /dev/null
@@ -1,42 +0,0 @@
1#!/bin/sh
2# This script is used to test i2c bus functionality for p3041ds board.
3
4if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then
5 echo "PASS: found $I2C_ADAPTERS i2c adapters"
6else
7 echo "FAIL: no i2c adapters found"
8 exit 1
9fi
10
11if [ -z "$adapters" ]; then
12 adapters=0
13fi
14
15while [ $adapters -lt $I2C_ADAPTERS ]
16do
17 i2cdetect -y $adapters
18 if [ $? -ne 0 ]; then
19 echo "FAIL: detect i2c adapter $adapters failed"
20 else
21 echo "PASS: detect i2c adapter $adapters success"
22 fi
23 adapters=`expr $adapters + 1`
24 sleep 1
25done
26
27i2cdetect -y 0
28if [ $? -ne 0 ]; then
29 echo "FAIL: detect i2c bus 0 fail"
30 exit 1
31else
32 echo "PASS: detect i2c bus 0 success"
33fi
34
35#i2c bus 0, device address 0x51, EEPROM
36i2cdump -f -y 0 0x51 | grep DCA1-13112
37if [ $? -ne 0 ]; then
38 echo "FAIL: read SPD EEPROM on i2c bus 0 fail"
39 exit 1
40else
41 echo "PASS: read SPD EEPROM on i2c bus 0 success"
42fi
diff --git a/recipes-test/ddt-runner/files/scripts/p3041ds/pci-express b/recipes-test/ddt-runner/files/scripts/p3041ds/pci-express
deleted file mode 100755
index 6648668..0000000
--- a/recipes-test/ddt-runner/files/scripts/p3041ds/pci-express
+++ /dev/null
@@ -1,109 +0,0 @@
1#!/bin/sh
2
3ethernet_interface="eth5"
4#sestord02 ip address
5ethernet_ping_ipaddr="172.21.3.22"
6ethernet_ipaddr=$1
7
8#Intel Corporation 82574L Gigabit Network Card (intel e1000e)
9vendor_id="8086"
10product_id="10d3"
11
12#find vendor id & product id
13lspci -nn |grep $vendor_id:$product_id
14if [ $? -ne 0 ]; then
15 echo "FAIL: pci-e ethernet card device does not exist"
16 exit 1
17else
18 echo "PASS: got pci-e ethernet card device"
19fi
20
21setpci -v -d $vendor_id:$product_id latency_timer=b0
22if [ $? -ne 0 ]; then
23 echo "FAIL: parameter changes to pci config space failed"
24 exit 1
25else
26 echo "PASS: parameter changes to pci config space success"
27fi
28
29IFCONFIG=`which ifconfig`
30
31$IFCONFIG $ethernet_interface up
32$IFCONFIG | grep $ethernet_interface
33if [ $? -ne 0 ]; then
34 echo "FAIL: pci-e ethernet card device $ethernet_interface is not up"
35 exit 1
36else
37 echo "PASS: pci-e ethernet card device $ethernet_interface is up"
38fi
39
40if [ "x$ethernet_ipaddr" != "x" ]; then
41 $IFCONFIG $ethernet_interface $ethernet_ipaddr
42fi
43
44$IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}'
45if [ $? -ne 0 ]; then
46 echo "FAIL: ipaddr of pci-e ethernet card device $ethernet_interface setup failed"
47 exit 1
48else
49 echo "PASS: ipaddr of pci-e ethernet card device $ethernet_interface setup success"
50fi
51
52mindatasize=56
53maxdatasize=650
54stepsize=100
55iteration=1
56datasize=$mindatasize
57logfile=`/bin/mktemp`
58statistics=`/bin/mktemp`
59error=0
60
61trap cleanup SIGHUP SIGINT SIGTERM
62
63clean_tasks() {
64 echo "Executing clean up tasks"
65 rm -f $logfile $statistics
66}
67
68cleanup() {
69 echo "Aborting script execution"
70 clean_tasks
71 exit 0
72}
73
74echo "start ping test for pci-e ethernet card device $ethernet_interface..."
75
76while [ $datasize -le $maxdatasize ]; do
77 for i in `seq 1 $iteration`; do
78 ping -c 1 -s $datasize $ethernet_ping_ipaddr > $statistics
79 ping_err=`echo $?`
80 echo "" && cat $statistics | grep -r "PING"
81 cat $statistics | grep -r "received"
82 [ `echo $?` -eq 0 ] || packets_received=0 && \
83 packets_received=`cat $statistics | \
84 grep -r "received" | awk '{print$4}'`
85
86 # Evaluate possible errors on the ping operation
87 if [ $ping_err -ne 0 ] || [ $packets_received -eq 0 ]; then
88 error=1
89 echo -e `cat $statistics | grep -r PING` >> $logfile
90 echo -e "Size: $datasize Iteration: $i\n" >> $logfile
91 fi
92 done
93 let datasize=$datasize+$stepsize
94done
95
96# Report failures
97if [ $error -eq 1 ]; then
98 echo -e "=================== error report ===================\n"
99 cat $logfile
100 echo -e "====================================================\n"
101 clean_tasks
102 echo -e "FAIL: ping test for pci-e ethernet card device $ethernet_interface failed\n"
103 exit 1
104else
105 clean_tasks
106 echo -e "PASS: ping test for pci-e ethernet card device $ethernet_interface success\n"
107fi
108
109exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/p3041ds/sata b/recipes-test/ddt-runner/files/scripts/p3041ds/sata
deleted file mode 100755
index e996b41..0000000
--- a/recipes-test/ddt-runner/files/scripts/p3041ds/sata
+++ /dev/null
@@ -1,80 +0,0 @@
1#!/bin/sh
2#
3#This script is to test sata devices on target
4#
5result=0
6devpath=""
7satainfo=""
8SD=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'`
9if [ -z "$SD" ]; then
10 echo "FAIL: find sata device"
11 exit 1
12else
13 echo "PASS: find sata device"
14fi
15HDPARM=`which hdparm`
16if [ -z $HDPARM ]; then
17 result=$?
18 echo "FAIL: find hdparm"
19fi
20 echo "PASS: find hdparm"
21
22
23for s in $SD
24 do
25 devpath=`echo "$s" | awk -F "," '{print "/sys/dev/block/" $1 ":" $2}'`
26 satainfo=`ls -l $devpath | grep sata`
27
28 if [ -z "$satainfo" ] ; then
29 continue
30 fi
31 s=`echo "$s" | awk -F "," '{print $3}'`
32
33 echo "testing $s"
34 $HDPARM -I $s
35 if [ $? -ne 0 ]; then
36 result=$?
37 echo "FAIL: $HDPARM -I $s Detailed/current information directly from $s"
38 else
39 echo "PASS: $HDPARM -I $s Detailed/current information directly from $s"
40 fi
41 $HDPARM -tT $s
42 if [ $? -ne 0 ]; then
43 result=$?
44 echo "FAIL: $HDPARM -tT $s Perform device/cache read timings on $s"
45 else
46 echo "PASS: $HDPARM -tT $s Perform device/cache read timings on $s"
47 fi
48
49 mkdir -p /mnt/sata_tmp
50 for partition in `ls "$s"[1-9]`
51 do
52 mount "$partition" /mnt/sata_tmp
53 if [ $? -ne 0 ]; then
54 result=$?
55 echo "FAIL: Mount $s"
56 else
57 echo "PASS: Mount $s"
58 dd if=/dev/urandom of=/mnt/sata_tmp/writefile bs=1M count=50
59 if [ $? -ne 0 ]; then
60 result=$?
61 echo "FAIL: write test on $s"
62 else
63 echo "PASS: write test on $s"
64 rm -f /mnt/sata_tmp/writefile
65 fi
66 dd if=$s of=/mnt/sata_tmp/readfile bs=1M count=10
67 if [ $? -ne 0 ]; then
68 result=$?
69 echo "FAIL: read test on $s"
70 else
71 echo "PASS: read test on $s"
72 rm -f /mnt/sata_tmp/readfile
73 fi
74 umount /mnt/sata_tmp
75 fi
76 done
77
78 rm -fr /mnt/sata_tmp
79done
80exit $result
diff --git a/recipes-test/ddt-runner/files/scripts/p3041ds/sdhc b/recipes-test/ddt-runner/files/scripts/p3041ds/sdhc
deleted file mode 100755
index b1bdab2..0000000
--- a/recipes-test/ddt-runner/files/scripts/p3041ds/sdhc
+++ /dev/null
@@ -1,40 +0,0 @@
1#!/bin/sh
2
3#the content of SD will be lost by running this test case.
4
5SDHC_DEVICE="/dev/mmcblk0p1"
6
7if [ ! -e $SDHC_DEVICE ]; then
8 echo "FAIL: $SDHC_DEVICE does not exist"
9 exit 1
10else
11 echo "PASS: $SDHC_DEVICE device exists"
12fi
13
14mount |grep mmcblk0p1
15if [ $? -eq 0 ]; then
16 umount $SDHC_DEVICE
17fi
18
19/sbin/mkfs.ext2 $SDHC_DEVICE
20if [ $? -ne 0 ]; then
21 echo "FAIL: format $SDHC_DEVICE fail"
22 exit 1
23else
24 mkdir -p /mnt/sdhc
25 mount $SDHC_DEVICE /mnt/sdhc
26 if [ $? -ne 0 ]; then
27 echo "FAIL: mount $SDHC_DEVICE fail"
28 exit 1
29 else
30 cp /bin/busybox /mnt/sdhc
31 ls /mnt/sdhc |grep busybox
32 if [ $? -ne 0 ]; then
33 echo "FAIL: read or write $SDHC_DEVICE fail"
34 exit 1
35 else
36 umount $SDHC_DEVICE
37 echo "PASS: read or write $SDHC_DEVICE success"
38 fi
39 fi
40fi
diff --git a/recipes-test/ddt-runner/files/scripts/p3041ds/usb b/recipes-test/ddt-runner/files/scripts/p3041ds/usb
deleted file mode 100755
index e515ed5..0000000
--- a/recipes-test/ddt-runner/files/scripts/p3041ds/usb
+++ /dev/null
@@ -1,48 +0,0 @@
1#!/bin/sh
2#
3#This script is to test usb devices on p3041rdb target
4#
5
6USB_DISK=`ls /dev/sd*[1-9] | sort | tail -n 1`
7
8usbutils_is_installed=`which lsusb`
9if [ -z $usbutils_is_installed ]; then
10 echo "FAIL: Cannot find lsusb"
11 exit 1
12else
13 echo "PASS: usbutils found"
14fi
15
16usbdev_num=`lsusb | grep -v root\ hub | wc -l`
17if [ $usbdev_num -eq 0 ]; then
18 echo "FAIL: USB device is not connected"
19 exit 1
20else
21 echo "PASS: $usbdev_num USB device(s) connected"
22fi
23
24lsusb | grep -v root\ hub
25mkdir -p /mnt/usb_ehci
26mount $USB_DISK /mnt/usb_ehci
27if [ $? -ne 0 ]; then
28 echo "FAIL: Mount USB device failed"
29 exit 1
30else
31 echo "PASS: Mount USB device succeed"
32fi
33
34echo "Begin test usb device..."
35dd if=/dev/urandom of=/mnt/usb_ehci/testfile bs=1M count=50
36if [ $? -ne 0 ]; then
37 echo "FAIL: test failed"
38 rm -f /mnt/usb_ehci_testfile
39 umount /mnt/usb_ehci
40 rm -fr /mnt/usb_ehci
41 exit 1
42fi
43
44echo "PASS: test succeed"
45rm -f /mnt/usb_ehci_testfile
46umount /mnt/usb_ehci
47rm -fr /mnt/usb_ehci
48exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/p4080ds/ethernet b/recipes-test/ddt-runner/files/scripts/p4080ds/ethernet
deleted file mode 100755
index 5355f10..0000000
--- a/recipes-test/ddt-runner/files/scripts/p4080ds/ethernet
+++ /dev/null
@@ -1,88 +0,0 @@
1#!/bin/sh
2
3ethernet_interface="eth1"
4ethernet_ping_ipaddr="172.21.3.22"
5ethernet_ipaddr=$1
6
7IFCONFIG=`which ifconfig`
8
9$IFCONFIG $ethernet_interface up
10$IFCONFIG | grep $ethernet_interface
11if [ $? -ne 0 ]; then
12 echo "FAIL: $ethernet_interface is not up"
13 exit 1
14else
15 echo "PASS: $ethernet_interface is up"
16fi
17
18if [ "x$ethernet_ipaddr" != "x" ]; then
19 $IFCONFIG $ethernet_interface $ethernet_ipaddr
20fi
21
22$IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}'
23if [ $? -ne 0 ]; then
24 echo "FAIL: ipaddr of $ethernet_interface setup failed"
25 exit 1
26else
27 echo "PASS: ipaddr of $ethernet_interface setup success"
28fi
29
30mindatasize=56
31maxdatasize=650
32stepsize=100
33iteration=1
34datasize=$mindatasize
35logfile=`/bin/mktemp`
36statistics=`/bin/mktemp`
37error=0
38
39trap cleanup SIGHUP SIGINT SIGTERM
40
41clean_tasks() {
42 echo "Executing clean up tasks"
43 rm -f $logfile $statistics
44}
45
46cleanup() {
47 echo "Aborting script execution"
48 clean_tasks
49 exit 0
50}
51
52echo "start ping test for $ethernet_interface..."
53
54while [ $datasize -le $maxdatasize ]; do
55 for i in `seq 1 $iteration`; do
56 ping -c 1 -s $datasize $ethernet_ping_ipaddr > $statistics
57 ping_err=`echo $?`
58 echo "" && cat $statistics | grep -r "PING"
59 cat $statistics | grep -r "received"
60 [ `echo $?` -eq 0 ] || packets_received=0 && \
61 packets_received=`cat $statistics | \
62 grep -r "received" | awk '{print$4}'`
63
64 # Evaluate possible errors on the ping operation
65 if [ $ping_err -ne 0 ] || [ $packets_received -eq 0 ]; then
66 error=1
67 echo -e `cat $statistics | grep -r PING` >> $logfile
68 echo -e "Size: $datasize Iteration: $i\n" >> $logfile
69 fi
70 done
71 let datasize=$datasize+$stepsize
72done
73
74# Report failures
75if [ $error -eq 1 ]; then
76 echo -e "=================== error report ===================\n"
77 cat $logfile
78 echo -e "====================================================\n"
79 clean_tasks
80 echo -e "FAIL: ping test for $ethernet_interface failed\n"
81 exit 1
82else
83 clean_tasks
84 echo -e "PASS: ping test for $ethernet_interface success\n"
85fi
86
87echo "PASS: $ethernet_interface test passed"
88exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/p4080ds/flash b/recipes-test/ddt-runner/files/scripts/p4080ds/flash
deleted file mode 100755
index 19f95aa..0000000
--- a/recipes-test/ddt-runner/files/scripts/p4080ds/flash
+++ /dev/null
@@ -1,20 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test flash driver functionality. I removed the write
4# operations since all partition are in use in p4080ds and there might be
5# possibility of corrupting data even if we backup in test script.
6
7if part_num=`cat /proc/mtd | grep -c 'mtd'`; then
8 echo "PASS: show $part_num partitions"
9else
10 echo "FAIL: show $part_num partitions"
11fi
12
13for((part=0; part<$part_num-1; part++));
14do
15 if [ $(mtd_debug info /dev/mtd$part | grep -c 'mtd.type') ]; then
16 echo "PASS: show partition $part debug info"
17 else
18 echo "FAIL: show partition $part debug info"
19 fi
20done
diff --git a/recipes-test/ddt-runner/files/scripts/p4080ds/i2c b/recipes-test/ddt-runner/files/scripts/p4080ds/i2c
deleted file mode 100755
index 5b312b9..0000000
--- a/recipes-test/ddt-runner/files/scripts/p4080ds/i2c
+++ /dev/null
@@ -1,24 +0,0 @@
1#!/bin/sh
2
3if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then
4 echo "PASS: found $I2C_ADAPTERS i2c adapters"
5else
6 echo "FAIL: no i2c adapters found"
7 exit 1
8fi
9
10if [ -z "$adapters" ]; then
11 adapters=0
12fi
13
14while [ $adapters -lt $I2C_ADAPTERS ]
15do
16 i2cdetect -y $adapters
17 if [ $? -ne 0 ]; then
18 echo "FAIL: detect i2c adapter $adapters failed"
19 else
20 echo "PASS: detect i2c adapter $adapters success"
21 fi
22 adapters=`expr $adapters + 1`
23 sleep 1
24done
diff --git a/recipes-test/ddt-runner/files/scripts/p4080ds/rtc b/recipes-test/ddt-runner/files/scripts/p4080ds/rtc
deleted file mode 100755
index 0d38293..0000000
--- a/recipes-test/ddt-runner/files/scripts/p4080ds/rtc
+++ /dev/null
@@ -1,42 +0,0 @@
1#!/bin/sh
2
3RTC_DEVICE="/dev/rtc"
4
5if [ ! -e $RTC_DEVICE ]; then
6 echo "FAIL: rtc device does not exist"
7 exit 1
8else
9 echo "PASS: rtc device exists"
10fi
11
12/sbin/hwclock -f $RTC_DEVICE
13if [ $? -ne 0 ]; then
14 echo "FAIL: rtc device open failed"
15 exit 1
16else
17 echo "PASS: rtc device open success"
18fi
19
20
21/sbin/hwclock --systohc
22if [ $? -ne 0 ]; then
23 echo "FAIL: sync system clock and hardware clock failed"
24 exit 1
25else
26 echo "PASS: sync system clock and hardware clock success"
27fi
28
29RTC_TIME=$(/sbin/hwclock -r |awk '{print $4}')
30echo $RTC_TIME
31SYS_TIME=$(date +%m/%d/%Y-%X |awk '{print $1}' |awk -F- '{print $2}')
32echo $SYS_TIME
33
34if [ "$RTC_TIME" = "$SYS_TIME" ] ; then
35 echo "PASS: system time same with hardware time"
36else
37 echo "FAIL: system time different with hardware time"
38 exit 1
39fi
40
41echo "PASS: rtc test successful"
42exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/p4080ds/sdhc b/recipes-test/ddt-runner/files/scripts/p4080ds/sdhc
deleted file mode 100755
index 31a7c2f..0000000
--- a/recipes-test/ddt-runner/files/scripts/p4080ds/sdhc
+++ /dev/null
@@ -1,65 +0,0 @@
1#!/bin/sh
2# This script is used to test sdhc functionality for p4080ds.
3# The content of SD will be lost by running this test case.
4
5SDHC_DEVICE="/dev/mmcblk0"
6SDHC_DEVICE_PART="/dev/mmcblk0p1"
7SFDISK=`which sfdisk`
8
9if [ -e $SDHC_DEVICE ]; then
10 echo "PASS: $SDHC_DEVICE device exists"
11else
12 echo "FAIL: $SDHC_DEVICE does not exist"
13 exit 1
14fi
15
16if [ -e $SDHC_DEVICE_PART ]; then
17 echo "PASS: $SDHC_DEVICE_PART device exists"
18elif [ ! -z $SFDISK ]; then
19
20 echo "Try to create a partition"
21
22$SFDISK $SDHC_DEVICE << EOF
23,,L
24EOF
25
26 if [ -e $SDHC_DEVICE_PART ]; then
27 echo "PASS: $SDHC_DEVICE_PART device exists"
28 else
29 echo "FAIL: $SDHC_DEVICE_PART does not exist"
30 exit 1
31 fi
32
33else
34 echo "FAIL: $SDHC_DEVICE_PART does not exist"
35 exit 1
36fi
37
38mount |grep mmcblk0p1
39if [ $? -eq 0 ]; then
40 umount $SDHC_DEVICE_PART
41fi
42
43/sbin/mkfs.ext2 $SDHC_DEVICE_PART
44if [ $? -ne 0 ]; then
45 echo "FAIL: format $SDHC_DEVICE_PART fail"
46 exit 1
47else
48 mkdir -p /mnt/sdhc
49 mount $SDHC_DEVICE_PART /mnt/sdhc
50 if [ $? -ne 0 ]; then
51 echo "FAIL: mount $SDHC_DEVICE_PART fail"
52 exit 1
53 else
54 cp /bin/busybox /mnt/sdhc
55 ls /mnt/sdhc |grep busybox
56 if [ $? -ne 0 ]; then
57 echo "FAIL: read or write $SDHC_DEVICE_PART fail"
58 exit 1
59 else
60 umount $SDHC_DEVICE_PART
61 echo "PASS: read or write $SDHC_DEVICE_PART success"
62 fi
63 fi
64fi
65
diff --git a/recipes-test/ddt-runner/files/scripts/p4080ds/spi b/recipes-test/ddt-runner/files/scripts/p4080ds/spi
deleted file mode 100755
index b4df851..0000000
--- a/recipes-test/ddt-runner/files/scripts/p4080ds/spi
+++ /dev/null
@@ -1,48 +0,0 @@
1#!/bin/sh
2
3#An spi flash M25P80 connect to p4080 cpu by spi bus, so the method
4#is to read/write spi flash to verify whether the spi bus driver worked
5#or not.
6
7MTD_CHAR_DEVICE="/dev/mtd4"
8MTD_BLOCK_DEVICE="/dev/mtdblock4"
9
10if [ ! -e $MTD_CHAR_DEVICE ]; then
11 echo "FAIL: spi flash device $MTD_CHAR_DEVICE does not exist"
12 exit 1
13else
14 echo "PASS: spi flash device $MTD_CHAR_DEVICE exists"
15fi
16
17if [ ! -e $MTD_BLOCK_DEVICE ]; then
18 echo "FAIL: spi flash device $MTD_BLOCK_DEVICE does not exist"
19 exit 1
20else
21 echo "PASS: spi flash device $MTD_BLOCK_DEVICE exists"
22fi
23
24/usr/sbin/flash_erase -j $MTD_CHAR_DEVICE 0 0
25if [ $? -ne 0 ]; then
26 echo "FAIL: format spi flash device $MTD_BLOCK_DEVICE fail"
27 exit 1
28else
29 mkdir -p /mnt/spi
30 mount -t jffs2 $MTD_BLOCK_DEVICE /mnt/spi
31 if [ $? -ne 0 ]; then
32 echo "FAIL: mount spi flash device $MTD_BLOCK_DEVICE fail"
33 exit 1
34 else
35 cp /bin/busybox /mnt/spi
36 ls /mnt/spi |grep busybox
37 if [ $? -ne 0 ]; then
38 echo "FAIL: read or write spi flash device $MTD_BLOCK_DEVICE fail"
39 exit 1
40 else
41 umount $MTD_BLOCK_DEVICE
42 echo "PASS: read or write spi flash device $MTD_BLOCK_DEVICE success"
43 fi
44 fi
45fi
46
47echo "PASS: spi bus test passed"
48exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/p4080ds/usb b/recipes-test/ddt-runner/files/scripts/p4080ds/usb
deleted file mode 100755
index 970e913..0000000
--- a/recipes-test/ddt-runner/files/scripts/p4080ds/usb
+++ /dev/null
@@ -1,100 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test usb functionality for p4080ds.
4#
5
6result=0
7devpath=""
8usbinfo=""
9
10usbutils_is_installed=`which lsusb`
11if [ -z $usbutils_is_installed ]; then
12 echo "FAIL: Cannot find lsusb"
13 exit 1
14fi
15
16usbdev_num=`lsusb | grep -v root\ hub | wc -l`
17if [ $usbdev_num -eq 0 ]; then
18 echo "FAIL: USB device is not connected"
19 exit 1
20else
21 echo "$usbdev_num USB device(s) connected"
22fi
23
24sd=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'`
25if [ -z "$sd" ]; then
26 echo "FAIL: find sd device"
27 exit 1
28else
29 echo "PASS: find sd device"
30fi
31
32HDPARM=`which hdparm`
33if [ -z $HDPARM ]; then
34 result=$?
35 echo "FAIL: find hdparm"
36fi
37 echo "PASS: find hdparm"
38
39for s in $sd
40do
41 devpath=`echo "$s" | awk -F "," '{print "/sys/dev/block/" $1 ":" $2}'`
42 usbinfo=`ls -l $devpath | grep usb`
43
44 if [ -z "$usbinfo" ] ; then
45 continue
46 fi
47
48 s=`echo "$s" | awk -F "," '{print $3}'`
49
50 echo "Testing $s"
51 $HDPARM -I $s
52 if [ $? -ne 0 ]; then
53 result=$?
54 echo "FAIL: $HDPARM -I $s Detailed/current information directly from $s"
55 else
56 echo "PASS: $HDPARM -I $s Detailed/current information directly from $s"
57 fi
58
59 $HDPARM -tT $s
60 if [ $? -ne 0 ]; then
61 result=$?
62 echo "FAIL: $HDPARM -tT $s Perform device/cache read timings on $s"
63 else
64 echo "PASS: $HDPARM -tT $s Perform device/cache read timings on $s"
65 fi
66
67 mkdir -p /mnt/usb_tmp
68 for partition in `ls "$s"[1-9]`
69 do
70 echo "Testing $partition"
71
72 mount "$partition" /mnt/usb_tmp
73 if [ $? -ne 0 ]; then
74 result=$?
75 echo "FAIL: mount $s"
76 else
77 echo "PASS: mount $s"
78 dd if=/dev/urandom of=/mnt/usb_tmp/writefile bs=1M count=50
79 if [ $? -ne 0 ]; then
80 result=$?
81 echo "FAIL: write test on $s"
82 else
83 echo "PASS: write test on $s"
84 rm -f /mnt/usb_tmp/writefile
85 fi
86 dd if=$s of=/mnt/usb_tmp/readfile bs=1M count=10
87 if [ $? -ne 0 ]; then
88 result=$?
89 echo "FAIL: read test on $s"
90 else
91 echo "PASS: read test on $s"
92 rm -f /mnt/usb_tmp/readfile
93 fi
94 umount /mnt/usb_tmp
95 fi
96 done
97
98 rm -fr /mnt/usb_tmp
99done
100exit $result
diff --git a/recipes-test/ddt-runner/files/scripts/pandaboard/ethernet b/recipes-test/ddt-runner/files/scripts/pandaboard/ethernet
deleted file mode 100755
index 5355f10..0000000
--- a/recipes-test/ddt-runner/files/scripts/pandaboard/ethernet
+++ /dev/null
@@ -1,88 +0,0 @@
1#!/bin/sh
2
3ethernet_interface="eth1"
4ethernet_ping_ipaddr="172.21.3.22"
5ethernet_ipaddr=$1
6
7IFCONFIG=`which ifconfig`
8
9$IFCONFIG $ethernet_interface up
10$IFCONFIG | grep $ethernet_interface
11if [ $? -ne 0 ]; then
12 echo "FAIL: $ethernet_interface is not up"
13 exit 1
14else
15 echo "PASS: $ethernet_interface is up"
16fi
17
18if [ "x$ethernet_ipaddr" != "x" ]; then
19 $IFCONFIG $ethernet_interface $ethernet_ipaddr
20fi
21
22$IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}'
23if [ $? -ne 0 ]; then
24 echo "FAIL: ipaddr of $ethernet_interface setup failed"
25 exit 1
26else
27 echo "PASS: ipaddr of $ethernet_interface setup success"
28fi
29
30mindatasize=56
31maxdatasize=650
32stepsize=100
33iteration=1
34datasize=$mindatasize
35logfile=`/bin/mktemp`
36statistics=`/bin/mktemp`
37error=0
38
39trap cleanup SIGHUP SIGINT SIGTERM
40
41clean_tasks() {
42 echo "Executing clean up tasks"
43 rm -f $logfile $statistics
44}
45
46cleanup() {
47 echo "Aborting script execution"
48 clean_tasks
49 exit 0
50}
51
52echo "start ping test for $ethernet_interface..."
53
54while [ $datasize -le $maxdatasize ]; do
55 for i in `seq 1 $iteration`; do
56 ping -c 1 -s $datasize $ethernet_ping_ipaddr > $statistics
57 ping_err=`echo $?`
58 echo "" && cat $statistics | grep -r "PING"
59 cat $statistics | grep -r "received"
60 [ `echo $?` -eq 0 ] || packets_received=0 && \
61 packets_received=`cat $statistics | \
62 grep -r "received" | awk '{print$4}'`
63
64 # Evaluate possible errors on the ping operation
65 if [ $ping_err -ne 0 ] || [ $packets_received -eq 0 ]; then
66 error=1
67 echo -e `cat $statistics | grep -r PING` >> $logfile
68 echo -e "Size: $datasize Iteration: $i\n" >> $logfile
69 fi
70 done
71 let datasize=$datasize+$stepsize
72done
73
74# Report failures
75if [ $error -eq 1 ]; then
76 echo -e "=================== error report ===================\n"
77 cat $logfile
78 echo -e "====================================================\n"
79 clean_tasks
80 echo -e "FAIL: ping test for $ethernet_interface failed\n"
81 exit 1
82else
83 clean_tasks
84 echo -e "PASS: ping test for $ethernet_interface success\n"
85fi
86
87echo "PASS: $ethernet_interface test passed"
88exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/pandaboard/i2c b/recipes-test/ddt-runner/files/scripts/pandaboard/i2c
deleted file mode 100755
index 5b312b9..0000000
--- a/recipes-test/ddt-runner/files/scripts/pandaboard/i2c
+++ /dev/null
@@ -1,24 +0,0 @@
1#!/bin/sh
2
3if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then
4 echo "PASS: found $I2C_ADAPTERS i2c adapters"
5else
6 echo "FAIL: no i2c adapters found"
7 exit 1
8fi
9
10if [ -z "$adapters" ]; then
11 adapters=0
12fi
13
14while [ $adapters -lt $I2C_ADAPTERS ]
15do
16 i2cdetect -y $adapters
17 if [ $? -ne 0 ]; then
18 echo "FAIL: detect i2c adapter $adapters failed"
19 else
20 echo "PASS: detect i2c adapter $adapters success"
21 fi
22 adapters=`expr $adapters + 1`
23 sleep 1
24done
diff --git a/recipes-test/ddt-runner/files/scripts/pandaboard/rtc b/recipes-test/ddt-runner/files/scripts/pandaboard/rtc
deleted file mode 100755
index 0d38293..0000000
--- a/recipes-test/ddt-runner/files/scripts/pandaboard/rtc
+++ /dev/null
@@ -1,42 +0,0 @@
1#!/bin/sh
2
3RTC_DEVICE="/dev/rtc"
4
5if [ ! -e $RTC_DEVICE ]; then
6 echo "FAIL: rtc device does not exist"
7 exit 1
8else
9 echo "PASS: rtc device exists"
10fi
11
12/sbin/hwclock -f $RTC_DEVICE
13if [ $? -ne 0 ]; then
14 echo "FAIL: rtc device open failed"
15 exit 1
16else
17 echo "PASS: rtc device open success"
18fi
19
20
21/sbin/hwclock --systohc
22if [ $? -ne 0 ]; then
23 echo "FAIL: sync system clock and hardware clock failed"
24 exit 1
25else
26 echo "PASS: sync system clock and hardware clock success"
27fi
28
29RTC_TIME=$(/sbin/hwclock -r |awk '{print $4}')
30echo $RTC_TIME
31SYS_TIME=$(date +%m/%d/%Y-%X |awk '{print $1}' |awk -F- '{print $2}')
32echo $SYS_TIME
33
34if [ "$RTC_TIME" = "$SYS_TIME" ] ; then
35 echo "PASS: system time same with hardware time"
36else
37 echo "FAIL: system time different with hardware time"
38 exit 1
39fi
40
41echo "PASS: rtc test successful"
42exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/pandaboard/sdhc b/recipes-test/ddt-runner/files/scripts/pandaboard/sdhc
deleted file mode 100755
index e341ebc..0000000
--- a/recipes-test/ddt-runner/files/scripts/pandaboard/sdhc
+++ /dev/null
@@ -1,65 +0,0 @@
1#!/bin/sh
2# This script is used to test sdhc functionality for pandaboard.
3# The content of SD will be lost by running this test case.
4
5SDHC_DEVICE="/dev/mmcblk0"
6SDHC_DEVICE_PART="/dev/mmcblk0p1"
7SFDISK=`which sfdisk`
8
9if [ -e $SDHC_DEVICE ]; then
10 echo "PASS: $SDHC_DEVICE device exists"
11else
12 echo "FAIL: $SDHC_DEVICE does not exist"
13 exit 1
14fi
15
16if [ -e $SDHC_DEVICE_PART ]; then
17 echo "PASS: $SDHC_DEVICE_PART device exists"
18elif [ ! -z $SFDISK ]; then
19
20 echo "Try to create a partition"
21
22$SFDISK $SDHC_DEVICE << EOF
23,,L
24EOF
25
26 if [ -e $SDHC_DEVICE_PART ]; then
27 echo "PASS: $SDHC_DEVICE_PART device exists"
28 else
29 echo "FAIL: $SDHC_DEVICE_PART does not exist"
30 exit 1
31 fi
32
33else
34 echo "FAIL: $SDHC_DEVICE_PART does not exist"
35 exit 1
36fi
37
38mount |grep mmcblk0p1
39if [ $? -eq 0 ]; then
40 umount $SDHC_DEVICE_PART
41fi
42
43/sbin/mkfs.ext2 $SDHC_DEVICE_PART
44if [ $? -ne 0 ]; then
45 echo "FAIL: format $SDHC_DEVICE_PART fail"
46 exit 1
47else
48 mkdir -p /mnt/sdhc
49 mount $SDHC_DEVICE_PART /mnt/sdhc
50 if [ $? -ne 0 ]; then
51 echo "FAIL: mount $SDHC_DEVICE_PART fail"
52 exit 1
53 else
54 cp /bin/busybox /mnt/sdhc
55 ls /mnt/sdhc |grep busybox
56 if [ $? -ne 0 ]; then
57 echo "FAIL: read or write $SDHC_DEVICE_PART fail"
58 exit 1
59 else
60 umount $SDHC_DEVICE_PART
61 echo "PASS: read or write $SDHC_DEVICE_PART success"
62 fi
63 fi
64fi
65
diff --git a/recipes-test/ddt-runner/files/scripts/pandaboard/usb b/recipes-test/ddt-runner/files/scripts/pandaboard/usb
deleted file mode 100755
index 15c417a..0000000
--- a/recipes-test/ddt-runner/files/scripts/pandaboard/usb
+++ /dev/null
@@ -1,100 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test usb functionality for romley-ivb.
4#
5
6result=0
7devpath=""
8usbinfo=""
9
10usbutils_is_installed=`which lsusb`
11if [ -z $usbutils_is_installed ]; then
12 echo "FAIL: Cannot find lsusb"
13 exit 1
14fi
15
16usbdev_num=`lsusb | grep -v root\ hub | wc -l`
17if [ $usbdev_num -eq 0 ]; then
18 echo "FAIL: USB device is not connected"
19 exit 1
20else
21 echo "$usbdev_num USB device(s) connected"
22fi
23
24sd=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'`
25if [ -z "$sd" ]; then
26 echo "FAIL: find sd device"
27 exit 1
28else
29 echo "PASS: find sd device"
30fi
31
32HDPARM=`which hdparm`
33if [ -z $HDPARM ]; then
34 result=$?
35 echo "FAIL: find hdparm"
36fi
37 echo "PASS: find hdparm"
38
39for s in $sd
40do
41 devpath=`echo "$s" | awk -F "," '{print "/sys/dev/block/" $1 ":" $2}'`
42 usbinfo=`ls -l $devpath | grep usb`
43
44 if [ -z "$usbinfo" ] ; then
45 continue
46 fi
47
48 s=`echo "$s" | awk -F "," '{print $3}'`
49
50 echo "Testing $s"
51 $HDPARM -I $s
52 if [ $? -ne 0 ]; then
53 result=$?
54 echo "FAIL: $HDPARM -I $s Detailed/current information directly from $s"
55 else
56 echo "PASS: $HDPARM -I $s Detailed/current information directly from $s"
57 fi
58
59 $HDPARM -tT $s
60 if [ $? -ne 0 ]; then
61 result=$?
62 echo "FAIL: $HDPARM -tT $s Perform device/cache read timings on $s"
63 else
64 echo "PASS: $HDPARM -tT $s Perform device/cache read timings on $s"
65 fi
66
67 mkdir -p /mnt/usb_tmp
68 for partition in `ls "$s"[1-9]`
69 do
70 echo "Testing $partition"
71
72 mount "$partition" /mnt/usb_tmp
73 if [ $? -ne 0 ]; then
74 result=$?
75 echo "FAIL: mount $s"
76 else
77 echo "PASS: mount $s"
78 dd if=/dev/urandom of=/mnt/usb_tmp/writefile bs=1M count=50
79 if [ $? -ne 0 ]; then
80 result=$?
81 echo "FAIL: write test on $s"
82 else
83 echo "PASS: write test on $s"
84 rm -f /mnt/usb_tmp/writefile
85 fi
86 dd if=$s of=/mnt/usb_tmp/readfile bs=1M count=10
87 if [ $? -ne 0 ]; then
88 result=$?
89 echo "FAIL: read test on $s"
90 else
91 echo "PASS: read test on $s"
92 rm -f /mnt/usb_tmp/readfile
93 fi
94 umount /mnt/usb_tmp
95 fi
96 done
97
98 rm -fr /mnt/usb_tmp
99done
100exit $result
diff --git a/recipes-test/ddt-runner/files/scripts/proliant-m800/ethernet b/recipes-test/ddt-runner/files/scripts/proliant-m800/ethernet
deleted file mode 100755
index 5355f10..0000000
--- a/recipes-test/ddt-runner/files/scripts/proliant-m800/ethernet
+++ /dev/null
@@ -1,88 +0,0 @@
1#!/bin/sh
2
3ethernet_interface="eth1"
4ethernet_ping_ipaddr="172.21.3.22"
5ethernet_ipaddr=$1
6
7IFCONFIG=`which ifconfig`
8
9$IFCONFIG $ethernet_interface up
10$IFCONFIG | grep $ethernet_interface
11if [ $? -ne 0 ]; then
12 echo "FAIL: $ethernet_interface is not up"
13 exit 1
14else
15 echo "PASS: $ethernet_interface is up"
16fi
17
18if [ "x$ethernet_ipaddr" != "x" ]; then
19 $IFCONFIG $ethernet_interface $ethernet_ipaddr
20fi
21
22$IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}'
23if [ $? -ne 0 ]; then
24 echo "FAIL: ipaddr of $ethernet_interface setup failed"
25 exit 1
26else
27 echo "PASS: ipaddr of $ethernet_interface setup success"
28fi
29
30mindatasize=56
31maxdatasize=650
32stepsize=100
33iteration=1
34datasize=$mindatasize
35logfile=`/bin/mktemp`
36statistics=`/bin/mktemp`
37error=0
38
39trap cleanup SIGHUP SIGINT SIGTERM
40
41clean_tasks() {
42 echo "Executing clean up tasks"
43 rm -f $logfile $statistics
44}
45
46cleanup() {
47 echo "Aborting script execution"
48 clean_tasks
49 exit 0
50}
51
52echo "start ping test for $ethernet_interface..."
53
54while [ $datasize -le $maxdatasize ]; do
55 for i in `seq 1 $iteration`; do
56 ping -c 1 -s $datasize $ethernet_ping_ipaddr > $statistics
57 ping_err=`echo $?`
58 echo "" && cat $statistics | grep -r "PING"
59 cat $statistics | grep -r "received"
60 [ `echo $?` -eq 0 ] || packets_received=0 && \
61 packets_received=`cat $statistics | \
62 grep -r "received" | awk '{print$4}'`
63
64 # Evaluate possible errors on the ping operation
65 if [ $ping_err -ne 0 ] || [ $packets_received -eq 0 ]; then
66 error=1
67 echo -e `cat $statistics | grep -r PING` >> $logfile
68 echo -e "Size: $datasize Iteration: $i\n" >> $logfile
69 fi
70 done
71 let datasize=$datasize+$stepsize
72done
73
74# Report failures
75if [ $error -eq 1 ]; then
76 echo -e "=================== error report ===================\n"
77 cat $logfile
78 echo -e "====================================================\n"
79 clean_tasks
80 echo -e "FAIL: ping test for $ethernet_interface failed\n"
81 exit 1
82else
83 clean_tasks
84 echo -e "PASS: ping test for $ethernet_interface success\n"
85fi
86
87echo "PASS: $ethernet_interface test passed"
88exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/proliant-m800/i2c b/recipes-test/ddt-runner/files/scripts/proliant-m800/i2c
deleted file mode 100755
index 5202950..0000000
--- a/recipes-test/ddt-runner/files/scripts/proliant-m800/i2c
+++ /dev/null
@@ -1,24 +0,0 @@
1#!/bin/sh
2
3if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then
4 echo "PASS: found $I2C_ADAPTERS i2c adapters"
5else
6 echo "FAIL: no i2c adapters found"
7 exit 1
8fi
9
10if [ -z "$adapters" ]; then
11 adapters=0
12fi
13
14while [ $adapters -lt $I2C_ADAPTERS ]
15do
16 i2cdetect -y $adapters
17 if [ $? -ne 0 ]; then
18 echo "FAIL: detect i2c adapter $adapters failed"
19 else
20 echo "PASS: detect i2c adapter $adapters success"
21 fi
22 adapters=`expr $adapters + 1`
23 sleep 1
24done
diff --git a/recipes-test/ddt-runner/files/scripts/proliant-m800/sata b/recipes-test/ddt-runner/files/scripts/proliant-m800/sata
deleted file mode 100755
index 25bf15a..0000000
--- a/recipes-test/ddt-runner/files/scripts/proliant-m800/sata
+++ /dev/null
@@ -1,81 +0,0 @@
1#!/bin/sh
2#
3#This script is to test sata devices on target
4#
5result=0
6devpath=""
7satainfo=""
8SD=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'`
9if [ -z "$SD" ]; then
10 echo "FAIL: find sata device"
11 exit 1
12else
13 echo "PASS: find sata device"
14fi
15HDPARM=`which hdparm`
16if [ -z $HDPARM ]; then
17 result=$?
18 echo "FAIL: find hdparm"
19fi
20 echo "PASS: find hdparm"
21
22
23for s in $SD
24 do
25 devpath=`echo "$s" | awk -F "," '{print "/sys/dev/block/" $1 ":" $2}'`
26 satainfo=`ls -l $devpath | grep sata`
27
28 if [ -z "$satainfo" ] ; then
29 continue
30 fi
31 s=`echo "$s" | awk -F "," '{print $3}'`
32
33 echo "testing $s"
34 $HDPARM -I $s
35 if [ $? -ne 0 ]; then
36 result=$?
37 echo "FAIL: $HDPARM -I $s Detailed/current information directly from $s"
38 else
39 echo "PASS: $HDPARM -I $s Detailed/current information directly from $s"
40 fi
41 $HDPARM -tT $s
42 if [ $? -ne 0 ]; then
43 result=$?
44 echo "FAIL: $HDPARM -tT $s Perform device/cache read timings on $s"
45 else
46 echo "PASS: $HDPARM -tT $s Perform device/cache read timings on $s"
47 fi
48
49
50 mkdir -p /mnt/sata_tmp
51 for partition in `ls "$s"[1-9]`
52 do
53 mount "$partition" /mnt/sata_tmp
54 if [ $? -ne 0 ]; then
55 result=$?
56 echo "FAIL: Mount $s"
57 else
58 echo "PASS: Mount $s"
59 dd if=/dev/urandom of=/mnt/sata_tmp/writefile bs=1M count=50
60 if [ $? -ne 0 ]; then
61 result=$?
62 echo "FAIL: write test on $s"
63 else
64 echo "PASS: write test on $s"
65 rm -f /mnt/sata_tmp/writefile
66 fi
67 dd if=$s of=/mnt/sata_tmp/readfile bs=1M count=10
68 if [ $? -ne 0 ]; then
69 result=$?
70 echo "FAIL: read test on $s"
71 else
72 echo "PASS: read test on $s"
73 rm -f /mnt/sata_tmp/readfile
74 fi
75 umount /mnt/sata_tmp
76 fi
77 done
78
79 rm -fr /mnt/sata_tmp
80done
81exit $result
diff --git a/recipes-test/ddt-runner/files/scripts/romley-ivb/ethernet b/recipes-test/ddt-runner/files/scripts/romley-ivb/ethernet
deleted file mode 100755
index 5355f10..0000000
--- a/recipes-test/ddt-runner/files/scripts/romley-ivb/ethernet
+++ /dev/null
@@ -1,88 +0,0 @@
1#!/bin/sh
2
3ethernet_interface="eth1"
4ethernet_ping_ipaddr="172.21.3.22"
5ethernet_ipaddr=$1
6
7IFCONFIG=`which ifconfig`
8
9$IFCONFIG $ethernet_interface up
10$IFCONFIG | grep $ethernet_interface
11if [ $? -ne 0 ]; then
12 echo "FAIL: $ethernet_interface is not up"
13 exit 1
14else
15 echo "PASS: $ethernet_interface is up"
16fi
17
18if [ "x$ethernet_ipaddr" != "x" ]; then
19 $IFCONFIG $ethernet_interface $ethernet_ipaddr
20fi
21
22$IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}'
23if [ $? -ne 0 ]; then
24 echo "FAIL: ipaddr of $ethernet_interface setup failed"
25 exit 1
26else
27 echo "PASS: ipaddr of $ethernet_interface setup success"
28fi
29
30mindatasize=56
31maxdatasize=650
32stepsize=100
33iteration=1
34datasize=$mindatasize
35logfile=`/bin/mktemp`
36statistics=`/bin/mktemp`
37error=0
38
39trap cleanup SIGHUP SIGINT SIGTERM
40
41clean_tasks() {
42 echo "Executing clean up tasks"
43 rm -f $logfile $statistics
44}
45
46cleanup() {
47 echo "Aborting script execution"
48 clean_tasks
49 exit 0
50}
51
52echo "start ping test for $ethernet_interface..."
53
54while [ $datasize -le $maxdatasize ]; do
55 for i in `seq 1 $iteration`; do
56 ping -c 1 -s $datasize $ethernet_ping_ipaddr > $statistics
57 ping_err=`echo $?`
58 echo "" && cat $statistics | grep -r "PING"
59 cat $statistics | grep -r "received"
60 [ `echo $?` -eq 0 ] || packets_received=0 && \
61 packets_received=`cat $statistics | \
62 grep -r "received" | awk '{print$4}'`
63
64 # Evaluate possible errors on the ping operation
65 if [ $ping_err -ne 0 ] || [ $packets_received -eq 0 ]; then
66 error=1
67 echo -e `cat $statistics | grep -r PING` >> $logfile
68 echo -e "Size: $datasize Iteration: $i\n" >> $logfile
69 fi
70 done
71 let datasize=$datasize+$stepsize
72done
73
74# Report failures
75if [ $error -eq 1 ]; then
76 echo -e "=================== error report ===================\n"
77 cat $logfile
78 echo -e "====================================================\n"
79 clean_tasks
80 echo -e "FAIL: ping test for $ethernet_interface failed\n"
81 exit 1
82else
83 clean_tasks
84 echo -e "PASS: ping test for $ethernet_interface success\n"
85fi
86
87echo "PASS: $ethernet_interface test passed"
88exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/romley-ivb/rtc b/recipes-test/ddt-runner/files/scripts/romley-ivb/rtc
deleted file mode 100755
index 0d38293..0000000
--- a/recipes-test/ddt-runner/files/scripts/romley-ivb/rtc
+++ /dev/null
@@ -1,42 +0,0 @@
1#!/bin/sh
2
3RTC_DEVICE="/dev/rtc"
4
5if [ ! -e $RTC_DEVICE ]; then
6 echo "FAIL: rtc device does not exist"
7 exit 1
8else
9 echo "PASS: rtc device exists"
10fi
11
12/sbin/hwclock -f $RTC_DEVICE
13if [ $? -ne 0 ]; then
14 echo "FAIL: rtc device open failed"
15 exit 1
16else
17 echo "PASS: rtc device open success"
18fi
19
20
21/sbin/hwclock --systohc
22if [ $? -ne 0 ]; then
23 echo "FAIL: sync system clock and hardware clock failed"
24 exit 1
25else
26 echo "PASS: sync system clock and hardware clock success"
27fi
28
29RTC_TIME=$(/sbin/hwclock -r |awk '{print $4}')
30echo $RTC_TIME
31SYS_TIME=$(date +%m/%d/%Y-%X |awk '{print $1}' |awk -F- '{print $2}')
32echo $SYS_TIME
33
34if [ "$RTC_TIME" = "$SYS_TIME" ] ; then
35 echo "PASS: system time same with hardware time"
36else
37 echo "FAIL: system time different with hardware time"
38 exit 1
39fi
40
41echo "PASS: rtc test successful"
42exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/romley-ivb/sata b/recipes-test/ddt-runner/files/scripts/romley-ivb/sata
deleted file mode 100755
index 25bf15a..0000000
--- a/recipes-test/ddt-runner/files/scripts/romley-ivb/sata
+++ /dev/null
@@ -1,81 +0,0 @@
1#!/bin/sh
2#
3#This script is to test sata devices on target
4#
5result=0
6devpath=""
7satainfo=""
8SD=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'`
9if [ -z "$SD" ]; then
10 echo "FAIL: find sata device"
11 exit 1
12else
13 echo "PASS: find sata device"
14fi
15HDPARM=`which hdparm`
16if [ -z $HDPARM ]; then
17 result=$?
18 echo "FAIL: find hdparm"
19fi
20 echo "PASS: find hdparm"
21
22
23for s in $SD
24 do
25 devpath=`echo "$s" | awk -F "," '{print "/sys/dev/block/" $1 ":" $2}'`
26 satainfo=`ls -l $devpath | grep sata`
27
28 if [ -z "$satainfo" ] ; then
29 continue
30 fi
31 s=`echo "$s" | awk -F "," '{print $3}'`
32
33 echo "testing $s"
34 $HDPARM -I $s
35 if [ $? -ne 0 ]; then
36 result=$?
37 echo "FAIL: $HDPARM -I $s Detailed/current information directly from $s"
38 else
39 echo "PASS: $HDPARM -I $s Detailed/current information directly from $s"
40 fi
41 $HDPARM -tT $s
42 if [ $? -ne 0 ]; then
43 result=$?
44 echo "FAIL: $HDPARM -tT $s Perform device/cache read timings on $s"
45 else
46 echo "PASS: $HDPARM -tT $s Perform device/cache read timings on $s"
47 fi
48
49
50 mkdir -p /mnt/sata_tmp
51 for partition in `ls "$s"[1-9]`
52 do
53 mount "$partition" /mnt/sata_tmp
54 if [ $? -ne 0 ]; then
55 result=$?
56 echo "FAIL: Mount $s"
57 else
58 echo "PASS: Mount $s"
59 dd if=/dev/urandom of=/mnt/sata_tmp/writefile bs=1M count=50
60 if [ $? -ne 0 ]; then
61 result=$?
62 echo "FAIL: write test on $s"
63 else
64 echo "PASS: write test on $s"
65 rm -f /mnt/sata_tmp/writefile
66 fi
67 dd if=$s of=/mnt/sata_tmp/readfile bs=1M count=10
68 if [ $? -ne 0 ]; then
69 result=$?
70 echo "FAIL: read test on $s"
71 else
72 echo "PASS: read test on $s"
73 rm -f /mnt/sata_tmp/readfile
74 fi
75 umount /mnt/sata_tmp
76 fi
77 done
78
79 rm -fr /mnt/sata_tmp
80done
81exit $result
diff --git a/recipes-test/ddt-runner/files/scripts/romley-ivb/usb b/recipes-test/ddt-runner/files/scripts/romley-ivb/usb
deleted file mode 100755
index 15c417a..0000000
--- a/recipes-test/ddt-runner/files/scripts/romley-ivb/usb
+++ /dev/null
@@ -1,100 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test usb functionality for romley-ivb.
4#
5
6result=0
7devpath=""
8usbinfo=""
9
10usbutils_is_installed=`which lsusb`
11if [ -z $usbutils_is_installed ]; then
12 echo "FAIL: Cannot find lsusb"
13 exit 1
14fi
15
16usbdev_num=`lsusb | grep -v root\ hub | wc -l`
17if [ $usbdev_num -eq 0 ]; then
18 echo "FAIL: USB device is not connected"
19 exit 1
20else
21 echo "$usbdev_num USB device(s) connected"
22fi
23
24sd=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'`
25if [ -z "$sd" ]; then
26 echo "FAIL: find sd device"
27 exit 1
28else
29 echo "PASS: find sd device"
30fi
31
32HDPARM=`which hdparm`
33if [ -z $HDPARM ]; then
34 result=$?
35 echo "FAIL: find hdparm"
36fi
37 echo "PASS: find hdparm"
38
39for s in $sd
40do
41 devpath=`echo "$s" | awk -F "," '{print "/sys/dev/block/" $1 ":" $2}'`
42 usbinfo=`ls -l $devpath | grep usb`
43
44 if [ -z "$usbinfo" ] ; then
45 continue
46 fi
47
48 s=`echo "$s" | awk -F "," '{print $3}'`
49
50 echo "Testing $s"
51 $HDPARM -I $s
52 if [ $? -ne 0 ]; then
53 result=$?
54 echo "FAIL: $HDPARM -I $s Detailed/current information directly from $s"
55 else
56 echo "PASS: $HDPARM -I $s Detailed/current information directly from $s"
57 fi
58
59 $HDPARM -tT $s
60 if [ $? -ne 0 ]; then
61 result=$?
62 echo "FAIL: $HDPARM -tT $s Perform device/cache read timings on $s"
63 else
64 echo "PASS: $HDPARM -tT $s Perform device/cache read timings on $s"
65 fi
66
67 mkdir -p /mnt/usb_tmp
68 for partition in `ls "$s"[1-9]`
69 do
70 echo "Testing $partition"
71
72 mount "$partition" /mnt/usb_tmp
73 if [ $? -ne 0 ]; then
74 result=$?
75 echo "FAIL: mount $s"
76 else
77 echo "PASS: mount $s"
78 dd if=/dev/urandom of=/mnt/usb_tmp/writefile bs=1M count=50
79 if [ $? -ne 0 ]; then
80 result=$?
81 echo "FAIL: write test on $s"
82 else
83 echo "PASS: write test on $s"
84 rm -f /mnt/usb_tmp/writefile
85 fi
86 dd if=$s of=/mnt/usb_tmp/readfile bs=1M count=10
87 if [ $? -ne 0 ]; then
88 result=$?
89 echo "FAIL: read test on $s"
90 else
91 echo "PASS: read test on $s"
92 rm -f /mnt/usb_tmp/readfile
93 fi
94 umount /mnt/usb_tmp
95 fi
96 done
97
98 rm -fr /mnt/usb_tmp
99done
100exit $result
diff --git a/recipes-test/ddt-runner/files/scripts/zc702-zynq7/ethernet b/recipes-test/ddt-runner/files/scripts/zc702-zynq7/ethernet
deleted file mode 100755
index 5355f10..0000000
--- a/recipes-test/ddt-runner/files/scripts/zc702-zynq7/ethernet
+++ /dev/null
@@ -1,88 +0,0 @@
1#!/bin/sh
2
3ethernet_interface="eth1"
4ethernet_ping_ipaddr="172.21.3.22"
5ethernet_ipaddr=$1
6
7IFCONFIG=`which ifconfig`
8
9$IFCONFIG $ethernet_interface up
10$IFCONFIG | grep $ethernet_interface
11if [ $? -ne 0 ]; then
12 echo "FAIL: $ethernet_interface is not up"
13 exit 1
14else
15 echo "PASS: $ethernet_interface is up"
16fi
17
18if [ "x$ethernet_ipaddr" != "x" ]; then
19 $IFCONFIG $ethernet_interface $ethernet_ipaddr
20fi
21
22$IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}'
23if [ $? -ne 0 ]; then
24 echo "FAIL: ipaddr of $ethernet_interface setup failed"
25 exit 1
26else
27 echo "PASS: ipaddr of $ethernet_interface setup success"
28fi
29
30mindatasize=56
31maxdatasize=650
32stepsize=100
33iteration=1
34datasize=$mindatasize
35logfile=`/bin/mktemp`
36statistics=`/bin/mktemp`
37error=0
38
39trap cleanup SIGHUP SIGINT SIGTERM
40
41clean_tasks() {
42 echo "Executing clean up tasks"
43 rm -f $logfile $statistics
44}
45
46cleanup() {
47 echo "Aborting script execution"
48 clean_tasks
49 exit 0
50}
51
52echo "start ping test for $ethernet_interface..."
53
54while [ $datasize -le $maxdatasize ]; do
55 for i in `seq 1 $iteration`; do
56 ping -c 1 -s $datasize $ethernet_ping_ipaddr > $statistics
57 ping_err=`echo $?`
58 echo "" && cat $statistics | grep -r "PING"
59 cat $statistics | grep -r "received"
60 [ `echo $?` -eq 0 ] || packets_received=0 && \
61 packets_received=`cat $statistics | \
62 grep -r "received" | awk '{print$4}'`
63
64 # Evaluate possible errors on the ping operation
65 if [ $ping_err -ne 0 ] || [ $packets_received -eq 0 ]; then
66 error=1
67 echo -e `cat $statistics | grep -r PING` >> $logfile
68 echo -e "Size: $datasize Iteration: $i\n" >> $logfile
69 fi
70 done
71 let datasize=$datasize+$stepsize
72done
73
74# Report failures
75if [ $error -eq 1 ]; then
76 echo -e "=================== error report ===================\n"
77 cat $logfile
78 echo -e "====================================================\n"
79 clean_tasks
80 echo -e "FAIL: ping test for $ethernet_interface failed\n"
81 exit 1
82else
83 clean_tasks
84 echo -e "PASS: ping test for $ethernet_interface success\n"
85fi
86
87echo "PASS: $ethernet_interface test passed"
88exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/zc702-zynq7/flash b/recipes-test/ddt-runner/files/scripts/zc702-zynq7/flash
deleted file mode 100755
index 7fa897c..0000000
--- a/recipes-test/ddt-runner/files/scripts/zc702-zynq7/flash
+++ /dev/null
@@ -1,20 +0,0 @@
1#!/bin/sh
2#
3# This script is used to test flash driver functionality. I removed the write
4# operations since all partition are in use in zc702-zynq7 and there might be
5# possibility of corrupting data even if we backup in test script.
6
7if part_num=`cat /proc/mtd | grep -c 'mtd'`; then
8 echo "PASS: show $part_num partitions"
9else
10 echo "FAIL: show $part_num partitions"
11fi
12
13for((part=0; part<$part_num-1; part++));
14do
15 if [ $(mtd_debug info /dev/mtd$part | grep -c 'mtd.type') ]; then
16 echo "PASS: show partition $part debug info"
17 else
18 echo "FAIL: show partition $part debug info"
19 fi
20done
diff --git a/recipes-test/ddt-runner/files/scripts/zc702-zynq7/i2c b/recipes-test/ddt-runner/files/scripts/zc702-zynq7/i2c
deleted file mode 100755
index 5b312b9..0000000
--- a/recipes-test/ddt-runner/files/scripts/zc702-zynq7/i2c
+++ /dev/null
@@ -1,24 +0,0 @@
1#!/bin/sh
2
3if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then
4 echo "PASS: found $I2C_ADAPTERS i2c adapters"
5else
6 echo "FAIL: no i2c adapters found"
7 exit 1
8fi
9
10if [ -z "$adapters" ]; then
11 adapters=0
12fi
13
14while [ $adapters -lt $I2C_ADAPTERS ]
15do
16 i2cdetect -y $adapters
17 if [ $? -ne 0 ]; then
18 echo "FAIL: detect i2c adapter $adapters failed"
19 else
20 echo "PASS: detect i2c adapter $adapters success"
21 fi
22 adapters=`expr $adapters + 1`
23 sleep 1
24done
diff --git a/recipes-test/ddt-runner/files/scripts/zc702-zynq7/rtc b/recipes-test/ddt-runner/files/scripts/zc702-zynq7/rtc
deleted file mode 100755
index 0d38293..0000000
--- a/recipes-test/ddt-runner/files/scripts/zc702-zynq7/rtc
+++ /dev/null
@@ -1,42 +0,0 @@
1#!/bin/sh
2
3RTC_DEVICE="/dev/rtc"
4
5if [ ! -e $RTC_DEVICE ]; then
6 echo "FAIL: rtc device does not exist"
7 exit 1
8else
9 echo "PASS: rtc device exists"
10fi
11
12/sbin/hwclock -f $RTC_DEVICE
13if [ $? -ne 0 ]; then
14 echo "FAIL: rtc device open failed"
15 exit 1
16else
17 echo "PASS: rtc device open success"
18fi
19
20
21/sbin/hwclock --systohc
22if [ $? -ne 0 ]; then
23 echo "FAIL: sync system clock and hardware clock failed"
24 exit 1
25else
26 echo "PASS: sync system clock and hardware clock success"
27fi
28
29RTC_TIME=$(/sbin/hwclock -r |awk '{print $4}')
30echo $RTC_TIME
31SYS_TIME=$(date +%m/%d/%Y-%X |awk '{print $1}' |awk -F- '{print $2}')
32echo $SYS_TIME
33
34if [ "$RTC_TIME" = "$SYS_TIME" ] ; then
35 echo "PASS: system time same with hardware time"
36else
37 echo "FAIL: system time different with hardware time"
38 exit 1
39fi
40
41echo "PASS: rtc test successful"
42exit 0
diff --git a/recipes-test/ddt-runner/files/scripts/zc702-zynq7/sdhc b/recipes-test/ddt-runner/files/scripts/zc702-zynq7/sdhc
deleted file mode 100755
index e341ebc..0000000
--- a/recipes-test/ddt-runner/files/scripts/zc702-zynq7/sdhc
+++ /dev/null
@@ -1,65 +0,0 @@
1#!/bin/sh
2# This script is used to test sdhc functionality for pandaboard.
3# The content of SD will be lost by running this test case.
4
5SDHC_DEVICE="/dev/mmcblk0"
6SDHC_DEVICE_PART="/dev/mmcblk0p1"
7SFDISK=`which sfdisk`
8
9if [ -e $SDHC_DEVICE ]; then
10 echo "PASS: $SDHC_DEVICE device exists"
11else
12 echo "FAIL: $SDHC_DEVICE does not exist"
13 exit 1
14fi
15
16if [ -e $SDHC_DEVICE_PART ]; then
17 echo "PASS: $SDHC_DEVICE_PART device exists"
18elif [ ! -z $SFDISK ]; then
19
20 echo "Try to create a partition"
21
22$SFDISK $SDHC_DEVICE << EOF
23,,L
24EOF
25
26 if [ -e $SDHC_DEVICE_PART ]; then
27 echo "PASS: $SDHC_DEVICE_PART device exists"
28 else
29 echo "FAIL: $SDHC_DEVICE_PART does not exist"
30 exit 1
31 fi
32
33else
34 echo "FAIL: $SDHC_DEVICE_PART does not exist"
35 exit 1
36fi
37
38mount |grep mmcblk0p1
39if [ $? -eq 0 ]; then
40 umount $SDHC_DEVICE_PART
41fi
42
43/sbin/mkfs.ext2 $SDHC_DEVICE_PART
44if [ $? -ne 0 ]; then
45 echo "FAIL: format $SDHC_DEVICE_PART fail"
46 exit 1
47else
48 mkdir -p /mnt/sdhc
49 mount $SDHC_DEVICE_PART /mnt/sdhc
50 if [ $? -ne 0 ]; then
51 echo "FAIL: mount $SDHC_DEVICE_PART fail"
52 exit 1
53 else
54 cp /bin/busybox /mnt/sdhc
55 ls /mnt/sdhc |grep busybox
56 if [ $? -ne 0 ]; then
57 echo "FAIL: read or write $SDHC_DEVICE_PART fail"
58 exit 1
59 else
60 umount $SDHC_DEVICE_PART
61 echo "PASS: read or write $SDHC_DEVICE_PART success"
62 fi
63 fi
64fi
65
diff --git a/recipes-test/ddt-runner/files/scripts/zc702-zynq7/spi b/recipes-test/ddt-runner/files/scripts/zc702-zynq7/spi
deleted file mode 100755
index 15df9bc..0000000
--- a/recipes-test/ddt-runner/files/scripts/zc702-zynq7/spi
+++ /dev/null
@@ -1,48 +0,0 @@
1#!/bin/sh
2
3#An spi flash M25P80 connect to pandaboard cpu by spi bus, so the method
4#is to read/write spi flash to verify whether the spi bus driver worked
5#or not.
6
7MTD_CHAR_DEVICE="/dev/mtd4"
8MTD_BLOCK_DEVICE="/dev/mtdblock4"
9
10if [ ! -e $MTD_CHAR_DEVICE ]; then
11 echo "FAIL: spi flash device $MTD_CHAR_DEVICE does not exist"
12 exit 1
13else
14 echo "PASS: spi flash device $MTD_CHAR_DEVICE exists"
15fi
16
17if [ ! -e $MTD_BLOCK_DEVICE ]; then
18 echo "FAIL: spi flash device $MTD_BLOCK_DEVICE does not exist"
19 exit 1
20else
21 echo "PASS: spi flash device $MTD_BLOCK_DEVICE exists"
22fi
23
24/usr/sbin/flash_erase -j $MTD_CHAR_DEVICE 0 0
25if [ $? -ne 0 ]; then
26 echo "FAIL: format spi flash device $MTD_BLOCK_DEVICE fail"
27 exit 1
28else
29 mkdir -p /mnt/spi
30 mount -t jffs2 $MTD_BLOCK_DEVICE /mnt/spi
31 if [ $? -ne 0 ]; then
32 echo "FAIL: mount spi flash device $MTD_BLOCK_DEVICE fail"
33 exit 1
34 else
35 cp /bin/busybox /mnt/spi
36 ls /mnt/spi |grep busybox
37 if [ $? -ne 0 ]; then
38 echo "FAIL: read or write spi flash device $MTD_BLOCK_DEVICE fail"
39 exit 1
40 else
41 umount $MTD_BLOCK_DEVICE
42 echo "PASS: read or write spi flash device $MTD_BLOCK_DEVICE success"
43 fi
44 fi
45fi
46
47echo "PASS: spi bus test passed"
48exit 0
diff --git a/recipes-test/perf-networking/files/perf-networking b/recipes-test/perf-networking/files/perf-networking
deleted file mode 100755
index f865374..0000000
--- a/recipes-test/perf-networking/files/perf-networking
+++ /dev/null
@@ -1,14 +0,0 @@
1#!/bin/sh
2server_ip="172.24.0.50"
3
4if ping -c1 $server_ip > /dev/null
5then
6netperf -H $server_ip -t TCP_STREAM
7netperf -H $server_ip -t TCP_MAERTS
8netperf -H $server_ip -t TCP_RR
9netperf -H $server_ip -t TCP_CRR
10netperf -H $server_ip -t UDP_STREAM
11netperf -H $server_ip -t UDP_RR
12else
13echo "Error: Server is down!"
14fi
diff --git a/recipes-test/perf-networking/perf-networking_1.0.bb b/recipes-test/perf-networking/perf-networking_1.0.bb
deleted file mode 100644
index aa32a7d..0000000
--- a/recipes-test/perf-networking/perf-networking_1.0.bb
+++ /dev/null
@@ -1,19 +0,0 @@
1SUMMARY = "A simple shell script to run network performance tests"
2DESCRIPTION = "The perf-networking package installs the perf-networking \
3shell script which runs tests using the netperf package"
4SRC_URI += "file://perf-networking"
5
6LICENSE = "MIT"
7LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
8 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
9
10RDEPENDS_${PN}= "netperf"
11
12do_install () {
13 install -D ${WORKDIR}/perf-networking ${D}${bindir}/perf-networking
14}
15
16do_patch[noexec] = "1"
17do_configure[noexec] = "1"
18do_compile[noexec] = "1"
19do_build[noexec] = "1"
diff --git a/recipes-test/rt-bmark/rt-bmark.bb b/recipes-test/rt-bmark/rt-bmark.bb
deleted file mode 100644
index efd56a2..0000000
--- a/recipes-test/rt-bmark/rt-bmark.bb
+++ /dev/null
@@ -1,23 +0,0 @@
1LICENSE = "BSD"
2LIC_FILES_CHKSUM = "file://README;md5=0db98e009b4bd9c1d6e074f701c9f9dd"
3DESCRIPTION = "RT Benachmarks"
4INHIBIT_DEFAULT_DEPS = "1"
5
6SRCREV = "189a84fc3112afba2f7bee28dcec3ea75c86e34a"
7SRC_URI = "git://gitlab.enea.se/thomas.lundstrom/rt-benchmarks.git;protocol=http"
8
9TEST_SCRIPT_DIR = "${libdir}/benchtest-runner/tests"
10
11FILES_${PN} += " ${TEST_SCRIPT_DIR}"
12
13RDEPENDS_${PN} += " stress rt-tests python"
14
15do_install () {
16 mkdir -p ${D}${TEST_SCRIPT_DIR}
17 install ${WORKDIR}/git/rt_bmark ${D}${TEST_SCRIPT_DIR}
18}
19
20do_patch[noexec] = "1"
21do_configure[noexec] = "1"
22do_compile[noexec] = "1"
23do_build[noexec] = "1"
diff --git a/recipes-test/stress/files/stress-itemx-after-item-only.patch b/recipes-test/stress/files/stress-itemx-after-item-only.patch
deleted file mode 100644
index 5ef40bb..0000000
--- a/recipes-test/stress/files/stress-itemx-after-item-only.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1stress: fix documentation build failure on Fedora
2
3Building the documentation for stress failed due to errors like this
4one:
5 stress.texi:68: @itemx must follow @item
6
7Upstream-Status: Submitted [Amos Waterland <apw@debian.org>]
8
9Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
10--- a/doc/stress.texi 2005-03-10 02:16:02.000000000 +0100
11+++ b/doc/stress.texi 2014-04-17 17:10:25.826749256 +0200
12@@ -65,7 +65,7 @@
13 @itemx --help
14 Show help information.
15
16-@itemx --version
17+@item --version
18 Show version information.
19
20 @item -v
21@@ -84,7 +84,7 @@
22 @itemx --timeout @var{secs}
23 Time out after @var{secs} seconds.
24
25-@itemx --backoff @var{usecs}
26+@item --backoff @var{usecs}
27 Wait for factor of @var{usecs} microseconds before starting work.
28
29 @item -c @var{forks}
30@@ -99,10 +99,10 @@
31 @itemx --vm @var{forks}
32 Spawn @var{forks} processes each spinning on @samp{malloc()}.
33
34-@itemx --vm-bytes @var{bytes}
35+@item --vm-bytes @var{bytes}
36 Allocate @var{bytes} number of bytes. The default is 1.
37
38-@itemx --vm-hang
39+@item --vm-hang
40 Instruct each vm hog process to go to sleep after allocating memory. This
41 contrasts with their normal behavior, which is to free the memory and
42 reallocate @emph{ad infinitum}. This is useful for simulating low memory
43@@ -117,10 +117,10 @@
44 @itemx --hdd @var{forks}
45 Spawn @var{forks} processes each spinning on @samp{write()}.
46
47-@itemx --hdd-bytes @var{bytes}
48+@item --hdd-bytes @var{bytes}
49 Write @var{bytes} number of bytes. The default is 1GB.
50
51-@itemx --hdd-noclean
52+@item --hdd-noclean
53 Do not unlink file(s) to which random ASCII data is written.
54
55 @end table
diff --git a/recipes-test/stress/stress_1.0.4.bb b/recipes-test/stress/stress_1.0.4.bb
deleted file mode 100644
index af69de4..0000000
--- a/recipes-test/stress/stress_1.0.4.bb
+++ /dev/null
@@ -1,13 +0,0 @@
1inherit autotools
2
3HOMEPAGE = "http://people.seas.harvard.edu/~apw/stress/"
4DESCRIPTION = "stress is a deliberately simple workload generator for POSIX systems. It imposes a configurable amount of CPU, memory, I/O, and disk stress on the system. It is written in C, and is free software licensed under the GPLv2."
5
6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
8
9SRC_URI="http://people.seas.harvard.edu/~apw/stress/stress-${PV}.tar.gz;name=tar \
10 file://stress-itemx-after-item-only.patch"
11
12SRC_URI[tar.md5sum] = "890a4236dd1656792f3ef9a190cf99ef"
13SRC_URI[tar.sha256sum] = "057e4fc2a7706411e1014bf172e4f94b63a12f18412378fca8684ca92408825b"
diff --git a/recipes-test/systest-runner/files/systest-runner b/recipes-test/systest-runner/files/systest-runner
deleted file mode 100644
index 13ad005..0000000
--- a/recipes-test/systest-runner/files/systest-runner
+++ /dev/null
@@ -1,30 +0,0 @@
1#!/bin/sh
2
3while true; do
4 if [ -d /usr/lib/systest-runner/tests ]; then
5 cd /usr/lib/systest-runner/tests >/dev/null
6 break
7 fi
8 if [ -d /usr/lib32/systest-runner/tests ]; then
9 cd /usr/lib32/systest-runner/tests >/dev/null
10 break
11 fi
12 if [ -d /usr/lib64/systest-runner/tests ]; then
13 cd /usr/lib64/systest-runner/tests >/dev/null
14 break
15 fi
16 break
17done
18
19for x in *
20do
21 echo $x
22 if [[ -f $x ]]; then
23 date +%Y-%m-%dT%H:%M
24 echo "BEGIN: $x"
25 ./$x
26 echo "END: $x"
27 date +%Y-%m-%dT%H:%M
28 fi
29done
30
diff --git a/recipes-test/systest-runner/files/tests/ltp b/recipes-test/systest-runner/files/tests/ltp
deleted file mode 100755
index ebdc32f..0000000
--- a/recipes-test/systest-runner/files/tests/ltp
+++ /dev/null
@@ -1,23 +0,0 @@
1#!/bin/sh
2
3cd /opt/ltp >/dev/null
4addgroup nobody
5sed -i -e "/mounts | sort -b$/s/$/ | grep -v deleted/" ./testscripts/test_fs_bind.sh
6
7logname=`date +"%Y_%m_%d_%H_%M_%S"`".log"
8./runltp -p -d /tmp -l $logname
9
10if [ ! -d ./results ]; then
11 echo "FAIL: no result found"
12 exit 1
13fi
14
15cat ./results/$logname | while read line
16do
17 resultLine=`echo $line | grep -c -E "PASS|FAIL"`
18 if [ $resultLine -eq 1 ]; then
19 testcase=`echo $line | awk '{print $1}'`
20 result=`echo $line | awk '{print $2}'`
21 echo "$result: $testcase"
22 fi
23done
diff --git a/recipes-test/systest-runner/files/tests/perf-network b/recipes-test/systest-runner/files/tests/perf-network
deleted file mode 100755
index 28d88d5..0000000
--- a/recipes-test/systest-runner/files/tests/perf-network
+++ /dev/null
@@ -1,13 +0,0 @@
1#!/bin/sh
2
3logname=`date +"%Y_%m_%d_%H_%M_%S"`".log"
4perf-networking |tee /tmp/$logname
5
6if grep -Fq "Error:" /tmp/$logname
7then
8 echo "FAIL: Test failed"
9 exit 1
10else
11 echo "PASS: Performed the netperf tests"
12 exit 0
13fi
diff --git a/recipes-test/systest-runner/files/tests/posixtest b/recipes-test/systest-runner/files/tests/posixtest
deleted file mode 100755
index cf92261..0000000
--- a/recipes-test/systest-runner/files/tests/posixtest
+++ /dev/null
@@ -1,40 +0,0 @@
1#!/bin/sh
2
3printit() {
4 echo ""
5 sed -i -e "s|FAILED:|FAIL:|g" -e "s|UNRESOLVED:|FAIL:|g" -e "s|UNSUPPORTED:|SKIP:|g" -e "s|UNTESTED:|SKIP:|g" $1
6 cat $1 | while read line
7 do
8 resultLine=`echo $line | grep -c -E "PASS|FAIL"`
9 if [ $resultLine -eq 1 ]; then
10 testcase=`echo $line | awk -F: '{print $1}'`
11 result=`echo $line | awk -F: '{print $3}'`
12 if [ -n "$testcase" ] && [ -n "$result" ]; then
13 echo "$result: $testcase"
14 fi
15 fi
16 done
17}
18
19cd /opt/ltp/testcases/open_posix_testsuite >/dev/null
20
21make test
22
23FILES=$(find . -name "logfile.*-test")
24for f in $FILES
25do
26 printit $f
27done
28
29printf "\n\nRunning POSIX Option Group Feature Tests"
30printf "\n========================================\n"
31
32./bin/run-all-posix-option-group-tests.sh
33
34FILES=$(find . -name "logfile")
35for f in $FILES
36do
37 printit $f
38done
39
40
diff --git a/recipes-test/systest-runner/systest-runner.bb b/recipes-test/systest-runner/systest-runner.bb
deleted file mode 100644
index 2ae040e..0000000
--- a/recipes-test/systest-runner/systest-runner.bb
+++ /dev/null
@@ -1,29 +0,0 @@
1
2LICENSE = "BSD"
3LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
4DESCRIPTION = "Execute all scripts under systest-runner/tests folder"
5INHIBIT_DEFAULT_DEPS = "1"
6
7SRC_URI = "file://systest-runner \
8 file://tests/ltp \
9 file://tests/perf-network \
10 file://tests/posixtest \
11 "
12
13STEST_PATH="${libdir}/${PN}"
14
15FILES_${PN} +="${STEST_PATH}"
16FILES_${PN} += "${bindir}/systest-runner"
17
18do_install () {
19 install -D ${WORKDIR}/systest-runner ${D}${bindir}/systest-runner
20 install -d ${D}${STEST_PATH}/tests
21 for file in ${WORKDIR}/tests/* ; do
22 install $file ${D}${STEST_PATH}/tests
23 done
24}
25
26do_patch[noexec] = "1"
27do_configure[noexec] = "1"
28do_compile[noexec] = "1"
29do_build[noexec] = "1"