diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2016-01-15 17:14:05 +0100 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2016-01-15 17:14:05 +0100 |
commit | 7456bb37db08a401a05ed06009a9e2b3572787be (patch) | |
tree | 1fd6b516decaae83c949d95fa5d7b34e0c378f1a | |
parent | 49e3f5a83e0150115261225287385fdd2c93d811 (diff) | |
download | meta-enea-7456bb37db08a401a05ed06009a9e2b3572787be.tar.gz |
intial comit for Enea Linux 5.0-ppc
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
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 @@ | |||
1 | require conf/distro/poky-lsb.conf | ||
2 | DISTRO = "enea-cgl" | ||
3 | DISTRO_NAME = "Enea Linux" | ||
4 | DISTRO_VERSION_MAJOR = "5.0" | ||
5 | DISTRO_VERSION_MINOR ??= "" | ||
6 | DISTRO_VERSION = "${DISTRO_VERSION_MAJOR}${DISTRO_VERSION_MINOR}" | ||
7 | |||
8 | |||
9 | SDK_VENDOR = "-eneasdk" | ||
10 | SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" | ||
11 | |||
12 | MAINTAINER = "ENEA <linux-maintainers@enea.com>" | ||
13 | |||
14 | TARGET_VENDOR = "-enea" | ||
15 | |||
16 | PRSERV_HOST ?= "localhost:0" | ||
17 | |||
18 | SANITY_TESTED_DISTROS += "\ | ||
19 | CentOS-6.1 \n \ | ||
20 | RedHatEnterpriseServer-6.1 \n \ | ||
21 | RedHatEnterpriseServer-6.4 \n \ | ||
22 | Ubuntu-12.10 \n \ | ||
23 | " | ||
24 | |||
25 | CONNECTIVITY_CHECK_URIS = " \ | ||
26 | http://linux.enea.com" | ||
27 | |||
28 | BB_DANGLINGAPPENDS_WARNONLY ?= "1" | ||
29 | |||
30 | DISTRO_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 | ||
26 | IMAGE_INSTALL = " \ | 25 | USDPAA_PKGS = " \ |
26 | eth-config \ | ||
27 | flib \ | ||
28 | fmc \ | ||
29 | fmlib \ | ||
30 | usdpaa \ | ||
31 | " | ||
32 | |||
33 | IMAGE_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 | ||
79 | IMAGE_INSTALL_append_powerpc64 = " ${USDPAA_PKGS}" | ||
80 | IMAGE_INSTALL_append_powerpc = " ${USDPAA_PKGS}" | ||
81 | |||
75 | IMAGE_ROOTFS_EXTRA_SPACE = "1048576" | 82 | IMAGE_ROOTFS_EXTRA_SPACE = "1048576" |
76 | IMAGE_OVERHEAD_FACTOR = "1.5" | 83 | IMAGE_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 | ||
47 | RDEPENDS_${PN}_append_fslmachine = " u-boot" | 47 | RDEPENDS_${PN}_append_fslmachine = " u-boot" |
48 | RDEPENDS_${PN}_append_p2041 = " fm-ucode rcw" | 48 | RDEPENDS_${PN}_append_p2041 = " rcw" |
49 | RDEPENDS_${PN}_append_p4080 = " fm-ucode rcw" | 49 | RDEPENDS_${PN}_append_p4080 = " rcw" |
50 | RDEPENDS_${PN} += "\ | 50 | RDEPENDS_${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 | ||
15 | RRECOMMENDS_${PN} = "\ | 15 | RRECOMMENDS_${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 @@ | |||
1 | From abc07cd01c51fb54088c6bc8ee654d104a5ec7d9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rabin Vincent <rabin@rab.in> | ||
3 | Date: Wed, 29 Oct 2014 23:06:58 +0100 | ||
4 | Subject: tracing/syscalls: Ignore numbers outside NR_syscalls' range | ||
5 | |||
6 | commit 086ba77a6db00ed858ff07451bedee197df868c9 upstream. | ||
7 | |||
8 | ARM has some private syscalls (for example, set_tls(2)) which lie | ||
9 | outside the range of NR_syscalls. If any of these are called while | ||
10 | syscall tracing is being performed, out-of-bounds array access will | ||
11 | occur 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 | |||
32 | Fix this by ignoring out-of-NR_syscalls-bounds syscall numbers. | ||
33 | |||
34 | Commit cd0980fc8add "tracing: Check invalid syscall nr while tracing syscalls" | ||
35 | added the check for less than zero, but it should have also checked | ||
36 | for greater than NR_syscalls. | ||
37 | |||
38 | Link: http://lkml.kernel.org/p/1414620418-29472-1-git-send-email-rabin@rab.in | ||
39 | |||
40 | Fixes: cd0980fc8add "tracing: Check invalid syscall nr while tracing syscalls" | ||
41 | CVE-2014-7825 and CVE-2014-7826. | ||
42 | Upstream-Status: Backport | ||
43 | |||
44 | Signed-off-by: Rabin Vincent <rabin@rab.in> | ||
45 | Signed-off-by: Steven Rostedt <rostedt@goodmis.org> | ||
46 | Signed-off-by: Jiri Slaby <jslaby@suse.cz> | ||
47 | Signed-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 | |||
52 | diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c | ||
53 | index 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 | -- | ||
93 | cgit 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 @@ | |||
1 | CONFIG_TUN=y | 1 | CONFIG_TUN=y |
2 | CONFIG_KSM=y | 2 | CONFIG_KSM=y |
3 | CONFIG_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 @@ | |||
1 | CONFIG_NET=y | ||
2 | CONFIG_INET=y | ||
3 | CONFIG_IPV6=y | ||
4 | CONFIG_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 @@ | |||
1 | CONFIG_NFSD_V3=y | ||
2 | CONFIG_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 @@ | |||
1 | CONFIG_VFAT_FS=y | ||
2 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
3 | CONFIG_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 @@ | |||
1 | CONFIG_NET=y | ||
2 | CONFIG_INET=y | ||
3 | CONFIG_OPENVSWITCH=y | ||
4 | CONFIG_NET_IPGRE_DEMUX=y | ||
5 | CONFIG_OPENVSWITCH_GRE=y | ||
6 | CONFIG_VXLAN=y | ||
7 | CONFIG_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 | ||
2 | CONFIG_UIO_FSL_SRIO=y | ||
3 | # CONFIG_FSL_DMA is not set | ||
4 | CONFIG_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 @@ | |||
1 | From 8ffea99d6f2be99790611282f326da95a84a8cab Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Halcrow <mhalcrow@google.com> | ||
3 | Date: Wed, 26 Nov 2014 09:09:16 -0800 | ||
4 | Subject: eCryptfs: Remove buggy and unnecessary write in file name decode | ||
5 | routine | ||
6 | |||
7 | commit 942080643bce061c3dd9d5718d3b745dcb39a8bc upstream. | ||
8 | |||
9 | Dmitry Chernenkov used KASAN to discover that eCryptfs writes past the | ||
10 | end of the allocated buffer during encrypted filename decoding. This | ||
11 | fix corrects the issue by getting rid of the unnecessary 0 write when | ||
12 | the current bit offset is 2. | ||
13 | |||
14 | Fixes CVE-2014-9683. | ||
15 | Upstream-Status: Backport | ||
16 | |||
17 | Signed-off-by: Michael Halcrow <mhalcrow@google.com> | ||
18 | Reported-by: Dmitry Chernenkov <dmitryc@google.com> | ||
19 | Suggested-by: Kees Cook <keescook@chromium.org> | ||
20 | Signed-off-by: Tyler Hicks <tyhicks@canonical.com> | ||
21 | Signed-off-by: Jiri Slaby <jslaby@suse.cz> | ||
22 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
23 | --- | ||
24 | fs/ecryptfs/crypto.c | 1 - | ||
25 | 1 file changed, 1 deletion(-) | ||
26 | |||
27 | diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c | ||
28 | index 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 | -- | ||
40 | cgit 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 @@ | |||
1 | From 24ca30b26943cb92bf613ed8bab37f6f4f61ed7c Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Nora=20Bj=C3=B6rklund?= <nora.bjorklund@enea.com> | ||
3 | Date: Mon, 9 Nov 2015 14:44:34 +0100 | ||
4 | Subject: [PATCH][PATCHv1 1/1] powerpc: Add missing I/O expander to | ||
5 | p2041rdb.dts | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | A gpio expander called pca9672 is connected to a i2c bus on | ||
11 | p2041rdb. This commit adds the i2c bus and the gpio-expander | ||
12 | to the device-tree. | ||
13 | |||
14 | Signed-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 | |||
19 | diff --git a/arch/powerpc/boot/dts/p2041rdb.dts b/arch/powerpc/boot/dts/p2041rdb.dts | ||
20 | index 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 | -- | ||
38 | 1.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 @@ | |||
1 | From 1bb0aca1e0881dfd34a6f39fd44e1e995fc302a1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sasha Levin <sasha.levin@oracle.com> | ||
3 | Date: Mon, 29 Dec 2014 09:39:01 -0500 | ||
4 | Subject: KEYS: close race between key lookup and freeing | ||
5 | |||
6 | commit a3a8784454692dd72e5d5d34dcdab17b4420e74c upstream. | ||
7 | |||
8 | When a key is being garbage collected, it's key->user would get put before | ||
9 | the ->destroy() callback is called, where the key is removed from it's | ||
10 | respective tracking structures. | ||
11 | |||
12 | This leaves a key hanging in a semi-invalid state which leaves a window open | ||
13 | for a different task to try an access key->user. An example is | ||
14 | find_keyring_by_name() which would dereference key->user for a key that is | ||
15 | in 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 | |||
18 | This would cause either a panic, or corrupt memory. | ||
19 | |||
20 | Fixes CVE-2014-9529. | ||
21 | Upstream-Status: Backport | ||
22 | |||
23 | Signed-off-by: Sasha Levin <sasha.levin@oracle.com> | ||
24 | Signed-off-by: David Howells <dhowells@redhat.com> | ||
25 | Signed-off-by: Jiri Slaby <jslaby@suse.cz> | ||
26 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
27 | --- | ||
28 | security/keys/gc.c | 4 ++-- | ||
29 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
30 | |||
31 | diff --git a/security/keys/gc.c b/security/keys/gc.c | ||
32 | index 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 | -- | ||
51 | cgit 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 @@ | |||
1 | From 2fb11da9d9016f6c0a4fcb99b8ebd63495c79005 Mon Sep 17 00:00:00 2001 | ||
2 | From: Florian Westphal <fw@strlen.de> | ||
3 | Date: Fri, 26 Sep 2014 11:35:42 +0200 | ||
4 | Subject: netfilter: conntrack: disable generic tracking for known protocols | ||
5 | |||
6 | commit db29a9508a9246e77087c5531e45b2c88ec6988b upstream. | ||
7 | |||
8 | Given 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 | |||
15 | One would assume that this allows SCTP on port 9 and TCP on port 80. | ||
16 | Unfortunately, if the SCTP conntrack module is not loaded, this allows | ||
17 | *all* SCTP communication, to pass though, i.e. -p sctp -j ACCEPT, | ||
18 | which we think is a security issue. | ||
19 | |||
20 | This is because on the first SCTP packet on port 9, we create a dummy | ||
21 | "generic l4" conntrack entry without any port information (since | ||
22 | conntrack doesn't know how to extract this information). | ||
23 | |||
24 | All subsequent packets that are unknown will then be in established | ||
25 | state since they will fallback to proto_generic and will match the | ||
26 | 'generic' entry. | ||
27 | |||
28 | Our originally proposed version [1] completely disabled generic protocol | ||
29 | tracking, but Jozsef suggests to not track protocols for which a more | ||
30 | suitable helper is available, hence we now mitigate the issue for in | ||
31 | tree known ct protocol helpers only, so that at least NAT and direction | ||
32 | information will still be preserved for others. | ||
33 | |||
34 | [1] http://www.spinics.net/lists/netfilter-devel/msg33430.html | ||
35 | |||
36 | Joint work with Daniel Borkmann. | ||
37 | |||
38 | Fixes CVE-2014-8160. | ||
39 | Upstream-Status: Backport | ||
40 | |||
41 | Signed-off-by: Florian Westphal <fw@strlen.de> | ||
42 | Signed-off-by: Daniel Borkmann <dborkman@redhat.com> | ||
43 | Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | ||
44 | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | ||
45 | Signed-off-by: Zhiqiang Zhang <zhangzhiqiang.zhang@huawei.com> | ||
46 | Signed-off-by: Jiri Slaby <jslaby@suse.cz> | ||
47 | Signed-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 | |||
52 | diff --git a/net/netfilter/nf_conntrack_proto_generic.c b/net/netfilter/nf_conntrack_proto_generic.c | ||
53 | index 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 | -- | ||
97 | cgit 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 @@ | |||
1 | From 62c97a8612f753ffa6c5c7bebe140cc0951e539f Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrey Vagin <avagin@openvz.org> | ||
3 | Date: Fri, 28 Mar 2014 13:54:32 +0400 | ||
4 | Subject: netfilter: nf_conntrack: reserve two bytes for nf_ct_ext->len | ||
5 | |||
6 | commit 223b02d923ecd7c84cf9780bb3686f455d279279 upstream. | ||
7 | |||
8 | "len" contains sizeof(nf_ct_ext) and size of extensions. In a worst | ||
9 | case it can contain all extensions. Bellow you can find sizes for all | ||
10 | types of extensions. Their sum is definitely bigger than 256. | ||
11 | |||
12 | nf_ct_ext_types[0]->len = 24 | ||
13 | nf_ct_ext_types[1]->len = 32 | ||
14 | nf_ct_ext_types[2]->len = 24 | ||
15 | nf_ct_ext_types[3]->len = 32 | ||
16 | nf_ct_ext_types[4]->len = 152 | ||
17 | nf_ct_ext_types[5]->len = 2 | ||
18 | nf_ct_ext_types[6]->len = 16 | ||
19 | nf_ct_ext_types[7]->len = 8 | ||
20 | |||
21 | I have seen "len" up to 280 and my host has crashes w/o this patch. | ||
22 | |||
23 | The right way to fix this problem is reducing the size of the ecache | ||
24 | extension (4) and Florian is going to do this, but these changes will | ||
25 | be quite large to be appropriate for a stable tree. | ||
26 | |||
27 | Fixes CVE-2014-9715. | ||
28 | Upstream-Status: Backport | ||
29 | |||
30 | Fixes: 5b423f6a40a0 (netfilter: nf_conntrack: fix racy timer handling with reliable) | ||
31 | Cc: Pablo Neira Ayuso <pablo@netfilter.org> | ||
32 | Cc: Patrick McHardy <kaber@trash.net> | ||
33 | Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | ||
34 | Cc: "David S. Miller" <davem@davemloft.net> | ||
35 | Signed-off-by: Andrey Vagin <avagin@openvz.org> | ||
36 | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | ||
37 | Signed-off-by: Jiri Slaby <jslaby@suse.cz> | ||
38 | Signed-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 | |||
43 | diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h | ||
44 | index 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 | -- | ||
59 | cgit 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 @@ | |||
1 | From d7e3ae47c441894b11dce376ff8d110780872d0d Mon Sep 17 00:00:00 2001 | ||
2 | From: Ben Hutchings <ben@decadent.org.uk> | ||
3 | Date: Thu, 29 Jan 2015 02:50:33 +0000 | ||
4 | Subject: splice: Apply generic position and size checks to each write | ||
5 | |||
6 | We need to check the position and size of file writes against various | ||
7 | limits, using generic_write_check(). This was not being done for | ||
8 | the splice write path. It was fixed upstream by commit 8d0207652cbe | ||
9 | ("->splice_write() via ->write_iter()") but we can't apply that. | ||
10 | |||
11 | CVE-2014-7822 | ||
12 | Upstream-Status: Backport | ||
13 | |||
14 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
15 | [ kamal: port to 3.13-stable: context ] | ||
16 | Signed-off-by: Kamal Mostafa <kamal@canonical.com> | ||
17 | Signed-off-by: Jiri Slaby <jslaby@suse.cz> | ||
18 | Signed-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 | |||
24 | diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c | ||
25 | index 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); | ||
51 | diff --git a/fs/splice.c b/fs/splice.c | ||
52 | index 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 | -- | ||
76 | cgit 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 | ||
34 | STAGING_KERNEL_FEATURES="\ | 47 | SRC_URI_append_p2041rdb = " file://include_pca9672_io_in_dts.patch \ |
48 | file://cfg/00052-gpio_pcf857x.cfg" | ||
49 | |||
50 | SRC_URI_append_t4240rdb-64b = " file://dts/t4240rdb-usdpaa-enea.dts" | ||
51 | SRC_URI_append_p2041rdb = " file://dts/p2041rdb-usdpaa-enea.dts" | ||
52 | SRC_URI_append_p3041ds = " file://dts/p3041ds-usdpaa-enea.dts" | ||
53 | |||
54 | STAGING_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 | ||
49 | STAGING_KERNEL_FEATURES_append_p2020rdb="cfg/00015-uio.cfg" | 71 | STAGING_KERNEL_FEATURES_append_p2020rdb = " \ |
72 | cfg/00015-uio.cfg \ | ||
73 | " | ||
74 | |||
75 | STAGING_KERNEL_FEATURES_remove_t4240rdb-64b = "cfg/00044-numa.cfg" | ||
50 | 76 | ||
51 | DELTA_KERNEL_DEFCONFIG += " ${STAGING_KERNEL_FEATURES} \ | 77 | DELTA_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 | ||
92 | DELTA_KERNEL_DEFCONFIG_append_p2041rdb = " cfg/00052-gpio_pcf857x.cfg" | ||
93 | |||
94 | KERNEL_DEVICETREE_append_t4240rdb-64b = " t4240rdb-usdpaa-enea.dtb" | ||
95 | KERNEL_DEVICETREE_append_p2041rdb = " p2041rdb-usdpaa-enea.dtb" | ||
96 | KERNEL_DEVICETREE_append_p3041ds = " p3041ds-usdpaa-enea.dtb" | ||
97 | |||
98 | do_configure_prepend_t4240rdb-64b() { | ||
99 | cp ${WORKDIR}/dts/t4240rdb-usdpaa-enea.dts ${S}/arch/powerpc/boot/dts/ | ||
100 | } | ||
101 | |||
102 | do_configure_prepend_p2041rdb() { | ||
103 | cp ${WORKDIR}/dts/p2041rdb-usdpaa-enea.dts ${S}/arch/powerpc/boot/dts/ | ||
104 | } | ||
105 | |||
106 | do_configure_prepend_p3041ds() { | ||
107 | cp ${WORKDIR}/dts/p3041ds-usdpaa-enea.dts ${S}/arch/powerpc/boot/dts/ | ||
108 | } | ||
109 | |||
62 | require recipes-kernel/linux/staging-kernel.inc | 110 | require recipes-kernel/linux/staging-kernel.inc |
63 | require recipes-kernel/linux/pramfs-3.12.inc | 111 | require 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 | |||
2 | LICENSE = "BSD" | ||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" | ||
4 | DESCRIPTION = "Execute all benchmark scripts in current directory" | ||
5 | INHIBIT_DEFAULT_DEPS = "1" | ||
6 | |||
7 | SRC_URI = "file://benchtest-runner \ | ||
8 | " | ||
9 | |||
10 | BTEST_PATH = "${libdir}/${PN}" | ||
11 | |||
12 | FILES_${PN} = "${bindir}/benchtest-runner \ | ||
13 | ${BTEST_PATH}" | ||
14 | |||
15 | do_install () { | ||
16 | install -D ${WORKDIR}/benchtest-runner ${D}${bindir}/benchtest-runner | ||
17 | install -d ${D}${BTEST_PATH}/tests | ||
18 | } | ||
19 | |||
20 | do_patch[noexec] = "1" | ||
21 | do_configure[noexec] = "1" | ||
22 | do_compile[noexec] = "1" | ||
23 | do_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 | |||
3 | if [ -d /usr/lib/benchtest-runner/tests ]; then | ||
4 | cd /usr/lib/benchtest-runner/tests | ||
5 | elif [ -d /usr/lib32/benchtest-runner/tests ]; then | ||
6 | cd /usr/lib32/benchtest-runner/tests | ||
7 | elif [ -d /usr/lib64/benchtest-runner/tests ]; then | ||
8 | cd /usr/lib64/benchtest-runner/tests | ||
9 | else | ||
10 | echo "ERROR: Could not find directory containing benchmark tests" | ||
11 | exit 1 | ||
12 | fi | ||
13 | |||
14 | for x in `ls` | ||
15 | do | ||
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 | ||
24 | done | ||
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 @@ | |||
1 | LICENSE = "BSD" | ||
2 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" | ||
3 | DESCRIPTION = "Script to automatize Device Driver Tests" | ||
4 | INHIBIT_DEFAULT_DEPS = "1" | ||
5 | |||
6 | SRC_URI = "file://ddt-runner \ | ||
7 | file://scripts" | ||
8 | |||
9 | FILES_${PN} += "${libdir}/${PN}" | ||
10 | FILES_${PN} += "${bindir}/ddt-runner" | ||
11 | |||
12 | do_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 | |||
22 | do_patch[noexec] = "1" | ||
23 | do_configure[noexec] = "1" | ||
24 | do_compile[noexec] = "1" | ||
25 | do_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 | |||
3 | if [[ ! -d "/usr/lib/ddt-runner/scripts" ]]; then | ||
4 | echo "SKIP: No available driver testcase" | ||
5 | exit | ||
6 | fi | ||
7 | |||
8 | cd /usr/lib/ddt-runner/scripts | ||
9 | # 10 minutes until timeout | ||
10 | timeout=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 | ||
14 | check_freq=1 | ||
15 | |||
16 | killrunning () { | ||
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 | |||
31 | for x in * | ||
32 | do | ||
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 | ||
51 | done | ||
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 | |||
6 | ethernet_interface="eth0" | ||
7 | ethernet_ping_ipaddr="172.21.3.22" | ||
8 | ethernet_ipaddr=$1 | ||
9 | |||
10 | IFCONFIG=`which ifconfig` | ||
11 | |||
12 | for((num=0; num<16; num++)); | ||
13 | do | ||
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 | ||
21 | done | ||
22 | |||
23 | if [ $num -eq 16 ]; then | ||
24 | echo "FAIL: $ethernet_interface is not up" | ||
25 | exit 1 | ||
26 | fi | ||
27 | |||
28 | if [ "x$ethernet_ipaddr" != "x" ]; then | ||
29 | $IFCONFIG $ethernet_interface $ethernet_ipaddr | ||
30 | fi | ||
31 | |||
32 | $IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}' | ||
33 | if [ $? -ne 0 ]; then | ||
34 | echo "FAIL: ipaddr of $ethernet_interface setup failed" | ||
35 | exit 1 | ||
36 | else | ||
37 | echo "PASS: ipaddr of $ethernet_interface setup success" | ||
38 | fi | ||
39 | |||
40 | mindatasize=56 | ||
41 | maxdatasize=650 | ||
42 | stepsize=100 | ||
43 | iteration=1 | ||
44 | datasize=$mindatasize | ||
45 | logfile=`/bin/mktemp` | ||
46 | statistics=`/bin/mktemp` | ||
47 | error=0 | ||
48 | |||
49 | trap cleanup SIGHUP SIGINT SIGTERM | ||
50 | |||
51 | clean_tasks() { | ||
52 | echo "Executing clean up tasks" | ||
53 | rm -f $logfile $statistics | ||
54 | } | ||
55 | |||
56 | cleanup() { | ||
57 | echo "Aborting script execution" | ||
58 | clean_tasks | ||
59 | exit 0 | ||
60 | } | ||
61 | |||
62 | echo "start ping test for $ethernet_interface..." | ||
63 | |||
64 | while [ $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 | ||
82 | done | ||
83 | |||
84 | # Report failures | ||
85 | if [ $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 | ||
92 | else | ||
93 | clean_tasks | ||
94 | echo -e "PASS: ping test for $ethernet_interface success\n" | ||
95 | fi | ||
96 | |||
97 | echo "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 | |||
5 | if part_num=`cat /proc/mtd | grep -c 'mtd'`; then | ||
6 | echo "PASS: show $part_num partitions" | ||
7 | else | ||
8 | echo "FAIL: show $part_num partitions" | ||
9 | fi | ||
10 | |||
11 | for((part=0; part<$part_num-1; part++)); | ||
12 | do | ||
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 | ||
18 | done | ||
19 | |||
20 | let "test_part=part_num-2" | ||
21 | |||
22 | if [ $(flash_erase -j /dev/mtd${test_part} 0 0 | grep -c '100 % complete') ]; then | ||
23 | echo "PASS: erase and format partition ${test_part}" | ||
24 | else | ||
25 | echo "FAIL: erase and format partition ${test_part}" | ||
26 | fi | ||
27 | |||
28 | mkdir -p /mnt/flash | ||
29 | mount -t jffs2 /dev/mtdblock${test_part} /mnt/flash | ||
30 | if [ $? -eq 0 ]; then | ||
31 | echo "PASS: mount partition ${test_part} as /mnt/flash" | ||
32 | else | ||
33 | echo "FAIL: mount partition ${test_part} as /mnt/flash" | ||
34 | fi | ||
35 | |||
36 | cd /mnt/flash | ||
37 | touch test | ||
38 | if [ $(ls | grep -c 'test') ]; then | ||
39 | echo "PASS: touch a file on partition ${test_part}" | ||
40 | else | ||
41 | echo "FAIL: touch a file on partition ${test_part}" | ||
42 | fi | ||
43 | |||
44 | cd ~ | ||
45 | umount /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 | |||
3 | ethernet_interface="eth0" | ||
4 | ethernet_ping_ipaddr="172.21.3.22" | ||
5 | ethernet_ipaddr=$1 | ||
6 | |||
7 | #Intel Corporation 82574L Gigabit Network Card (intel e1000e) | ||
8 | vendor_id="8086" | ||
9 | product_id="10d3" | ||
10 | |||
11 | #find vendor id & product id | ||
12 | lspci -nn |grep $vendor_id:$product_id | ||
13 | if [ $? -ne 0 ]; then | ||
14 | echo "FAIL: pci-e ethernet card device does not exist" | ||
15 | exit 1 | ||
16 | else | ||
17 | echo "PASS: got pci-e ethernet card device" | ||
18 | fi | ||
19 | |||
20 | setpci -v -d $vendor_id:$product_id latency_timer=b0 | ||
21 | if [ $? -ne 0 ]; then | ||
22 | echo "FAIL: parameter changes to pci config space failed" | ||
23 | exit 1 | ||
24 | else | ||
25 | echo "PASS: parameter changes to pci config space success" | ||
26 | fi | ||
27 | |||
28 | IFCONFIG=`which ifconfig` | ||
29 | |||
30 | $IFCONFIG $ethernet_interface up | ||
31 | $IFCONFIG | grep $ethernet_interface | ||
32 | if [ $? -ne 0 ]; then | ||
33 | echo "FAIL: pci-e ethernet card device $ethernet_interface is not up" | ||
34 | exit 1 | ||
35 | else | ||
36 | echo "PASS: pci-e ethernet card device $ethernet_interface is up" | ||
37 | fi | ||
38 | |||
39 | if [ "x$ethernet_ipaddr" != "x" ]; then | ||
40 | $IFCONFIG $ethernet_interface $ethernet_ipaddr | ||
41 | fi | ||
42 | |||
43 | $IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}' | ||
44 | if [ $? -ne 0 ]; then | ||
45 | echo "FAIL: ipaddr of pci-e ethernet card device $ethernet_interface setup failed" | ||
46 | exit 1 | ||
47 | else | ||
48 | echo "PASS: ipaddr of pci-e ethernet card device $ethernet_interface setup success" | ||
49 | fi | ||
50 | |||
51 | mindatasize=56 | ||
52 | maxdatasize=650 | ||
53 | stepsize=100 | ||
54 | iteration=1 | ||
55 | datasize=$mindatasize | ||
56 | logfile=`/bin/mktemp` | ||
57 | statistics=`/bin/mktemp` | ||
58 | error=0 | ||
59 | |||
60 | trap cleanup SIGHUP SIGINT SIGTERM | ||
61 | |||
62 | clean_tasks() { | ||
63 | echo "Executing clean up tasks" | ||
64 | rm -f $logfile $statistics | ||
65 | } | ||
66 | |||
67 | cleanup() { | ||
68 | echo "Aborting script execution" | ||
69 | clean_tasks | ||
70 | exit 0 | ||
71 | } | ||
72 | |||
73 | echo "start ping test for pci-e ethernet card device $ethernet_interface..." | ||
74 | |||
75 | while [ $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 | ||
93 | done | ||
94 | |||
95 | # Report failures | ||
96 | if [ $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 | ||
103 | else | ||
104 | clean_tasks | ||
105 | echo -e "PASS: ping test for pci-e ethernet card device $ethernet_interface success\n" | ||
106 | fi | ||
107 | |||
108 | echo "PASS: pci express test passed" | ||
109 | exit 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 | |||
6 | result=0 | ||
7 | devpath="" | ||
8 | usbinfo="" | ||
9 | |||
10 | usbutils_is_installed=`which lsusb` | ||
11 | if [ -z $usbutils_is_installed ]; then | ||
12 | echo "FAIL: Cannot find lsusb" | ||
13 | exit 1 | ||
14 | fi | ||
15 | |||
16 | usbdev_num=`lsusb | grep -v root\ hub | wc -l` | ||
17 | if [ $usbdev_num -eq 0 ]; then | ||
18 | echo "FAIL: USB device is not connected" | ||
19 | exit 1 | ||
20 | else | ||
21 | echo "$usbdev_num USB device(s) connected" | ||
22 | fi | ||
23 | |||
24 | sd=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'` | ||
25 | if [ -z "$sd" ]; then | ||
26 | echo "FAIL: find sd device" | ||
27 | exit 1 | ||
28 | else | ||
29 | echo "PASS: find sd device" | ||
30 | fi | ||
31 | |||
32 | HDPARM=`which hdparm` | ||
33 | if [ -z $HDPARM ]; then | ||
34 | result=$? | ||
35 | echo "FAIL: find hdparm" | ||
36 | fi | ||
37 | echo "PASS: find hdparm" | ||
38 | |||
39 | for s in $sd | ||
40 | do | ||
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 | ||
99 | done | ||
100 | exit $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 | |||
3 | ethernet_interface="eth1" | ||
4 | ethernet_ping_ipaddr="172.21.3.22" | ||
5 | ethernet_ipaddr=$1 | ||
6 | |||
7 | IFCONFIG=`which ifconfig` | ||
8 | |||
9 | $IFCONFIG $ethernet_interface up | ||
10 | $IFCONFIG | grep $ethernet_interface | ||
11 | if [ $? -ne 0 ]; then | ||
12 | echo "FAIL: $ethernet_interface is not up" | ||
13 | exit 1 | ||
14 | else | ||
15 | echo "PASS: $ethernet_interface is up" | ||
16 | fi | ||
17 | |||
18 | if [ "x$ethernet_ipaddr" != "x" ]; then | ||
19 | $IFCONFIG $ethernet_interface $ethernet_ipaddr | ||
20 | fi | ||
21 | |||
22 | $IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}' | ||
23 | if [ $? -ne 0 ]; then | ||
24 | echo "FAIL: ipaddr of $ethernet_interface setup failed" | ||
25 | exit 1 | ||
26 | else | ||
27 | echo "PASS: ipaddr of $ethernet_interface setup success" | ||
28 | fi | ||
29 | |||
30 | mindatasize=56 | ||
31 | maxdatasize=650 | ||
32 | stepsize=100 | ||
33 | iteration=1 | ||
34 | datasize=$mindatasize | ||
35 | logfile=`/bin/mktemp` | ||
36 | statistics=`/bin/mktemp` | ||
37 | error=0 | ||
38 | |||
39 | trap cleanup SIGHUP SIGINT SIGTERM | ||
40 | |||
41 | clean_tasks() { | ||
42 | echo "Executing clean up tasks" | ||
43 | rm -f $logfile $statistics | ||
44 | } | ||
45 | |||
46 | cleanup() { | ||
47 | echo "Aborting script execution" | ||
48 | clean_tasks | ||
49 | exit 0 | ||
50 | } | ||
51 | |||
52 | echo "start ping test for $ethernet_interface..." | ||
53 | |||
54 | while [ $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 | ||
72 | done | ||
73 | |||
74 | # Report failures | ||
75 | if [ $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 | ||
82 | else | ||
83 | clean_tasks | ||
84 | echo -e "PASS: ping test for $ethernet_interface success\n" | ||
85 | fi | ||
86 | |||
87 | echo "PASS: $ethernet_interface test passed" | ||
88 | exit 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 | |||
7 | if part_num=`cat /proc/mtd | grep -c 'mtd'`; then | ||
8 | echo "PASS: show $part_num partitions" | ||
9 | else | ||
10 | echo "FAIL: show $part_num partitions" | ||
11 | fi | ||
12 | |||
13 | for((part=0; part<$part_num-1; part++)); | ||
14 | do | ||
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 | ||
20 | done | ||
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 | |||
3 | if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then | ||
4 | echo "PASS: found $I2C_ADAPTERS i2c adapters" | ||
5 | else | ||
6 | echo "FAIL: no i2c adapters found" | ||
7 | exit 1 | ||
8 | fi | ||
9 | |||
10 | if [ -z "$adapters" ]; then | ||
11 | adapters=0 | ||
12 | fi | ||
13 | |||
14 | while [ $adapters -lt $I2C_ADAPTERS ] | ||
15 | do | ||
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 | ||
24 | done | ||
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 | |||
3 | RTC_DEVICE="/dev/rtc" | ||
4 | |||
5 | if [ ! -e $RTC_DEVICE ]; then | ||
6 | echo "FAIL: rtc device does not exist" | ||
7 | exit 1 | ||
8 | else | ||
9 | echo "PASS: rtc device exists" | ||
10 | fi | ||
11 | |||
12 | /sbin/hwclock -f $RTC_DEVICE | ||
13 | if [ $? -ne 0 ]; then | ||
14 | echo "FAIL: rtc device open failed" | ||
15 | exit 1 | ||
16 | else | ||
17 | echo "PASS: rtc device open success" | ||
18 | fi | ||
19 | |||
20 | |||
21 | /sbin/hwclock --systohc | ||
22 | if [ $? -ne 0 ]; then | ||
23 | echo "FAIL: sync system clock and hardware clock failed" | ||
24 | exit 1 | ||
25 | else | ||
26 | echo "PASS: sync system clock and hardware clock success" | ||
27 | fi | ||
28 | |||
29 | RTC_TIME=$(/sbin/hwclock -r |awk '{print $4}') | ||
30 | echo $RTC_TIME | ||
31 | SYS_TIME=$(date +%m/%d/%Y-%X |awk '{print $1}' |awk -F- '{print $2}') | ||
32 | echo $SYS_TIME | ||
33 | |||
34 | if [ "$RTC_TIME" = "$SYS_TIME" ] ; then | ||
35 | echo "PASS: system time same with hardware time" | ||
36 | else | ||
37 | echo "FAIL: system time different with hardware time" | ||
38 | exit 1 | ||
39 | fi | ||
40 | |||
41 | echo "PASS: rtc test successful" | ||
42 | exit 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 | |||
7 | MTD_CHAR_DEVICE="/dev/mtd4" | ||
8 | MTD_BLOCK_DEVICE="/dev/mtdblock4" | ||
9 | |||
10 | if [ ! -e $MTD_CHAR_DEVICE ]; then | ||
11 | echo "FAIL: spi flash device $MTD_CHAR_DEVICE does not exist" | ||
12 | exit 1 | ||
13 | else | ||
14 | echo "PASS: spi flash device $MTD_CHAR_DEVICE exists" | ||
15 | fi | ||
16 | |||
17 | if [ ! -e $MTD_BLOCK_DEVICE ]; then | ||
18 | echo "FAIL: spi flash device $MTD_BLOCK_DEVICE does not exist" | ||
19 | exit 1 | ||
20 | else | ||
21 | echo "PASS: spi flash device $MTD_BLOCK_DEVICE exists" | ||
22 | fi | ||
23 | |||
24 | /usr/sbin/flash_erase -j $MTD_CHAR_DEVICE 0 0 | ||
25 | if [ $? -ne 0 ]; then | ||
26 | echo "FAIL: format spi flash device $MTD_BLOCK_DEVICE fail" | ||
27 | exit 1 | ||
28 | else | ||
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 | ||
45 | fi | ||
46 | |||
47 | echo "PASS: spi bus test passed" | ||
48 | exit 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 | |||
4 | ethernet_interface="eth0" | ||
5 | ethernet_ping_ipaddr="172.21.3.22" | ||
6 | ethernet_ipaddr=$1 | ||
7 | |||
8 | IFCONFIG=`which ifconfig` | ||
9 | |||
10 | $IFCONFIG $ethernet_interface up | ||
11 | $IFCONFIG | grep $ethernet_interface | ||
12 | if [ $? -ne 0 ]; then | ||
13 | echo "FAIL: $ethernet_interface is not up" | ||
14 | exit 1 | ||
15 | else | ||
16 | echo "PASS: $ethernet_interface is up" | ||
17 | fi | ||
18 | |||
19 | if [ "x$ethernet_ipaddr" != "x" ]; then | ||
20 | $IFCONFIG $ethernet_interface $ethernet_ipaddr | ||
21 | fi | ||
22 | |||
23 | $IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}' | ||
24 | if [ $? -ne 0 ]; then | ||
25 | echo "FAIL: ipaddr of $ethernet_interface setup failed" | ||
26 | exit 1 | ||
27 | else | ||
28 | echo "PASS: ipaddr of $ethernet_interface setup success" | ||
29 | fi | ||
30 | |||
31 | mindatasize=56 | ||
32 | maxdatasize=650 | ||
33 | stepsize=100 | ||
34 | iteration=1 | ||
35 | datasize=$mindatasize | ||
36 | logfile=`/bin/mktemp` | ||
37 | statistics=`/bin/mktemp` | ||
38 | error=0 | ||
39 | |||
40 | trap cleanup SIGHUP SIGINT SIGTERM | ||
41 | |||
42 | clean_tasks() { | ||
43 | echo "Executing clean up tasks" | ||
44 | rm -f $logfile $statistics | ||
45 | } | ||
46 | |||
47 | cleanup() { | ||
48 | echo "Aborting script execution" | ||
49 | clean_tasks | ||
50 | exit 0 | ||
51 | } | ||
52 | |||
53 | echo "start ping test for $ethernet_interface..." | ||
54 | |||
55 | while [ $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 | ||
73 | done | ||
74 | |||
75 | # Report failures | ||
76 | if [ $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 | ||
83 | else | ||
84 | clean_tasks | ||
85 | echo -e "PASS: ping test for $ethernet_interface success\n" | ||
86 | fi | ||
87 | |||
88 | echo "PASS: $ethernet_interface test passed" | ||
89 | exit 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 | |||
8 | if part_num=`cat /proc/mtd | grep -c 'mtd'`; then | ||
9 | echo "PASS: $part_num partitions found" | ||
10 | else | ||
11 | echo "FAIL: $part_num partitions found" | ||
12 | exit 1 | ||
13 | fi | ||
14 | |||
15 | for((part=0; part<$part_num; part++)); | ||
16 | do | ||
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 | ||
23 | done | ||
24 | |||
25 | READ_TEST=`find / -name mtd_readtest.ko -print` | ||
26 | |||
27 | if [ ! -e $READ_TEST ]; then | ||
28 | echo "FAIL: $READ_TEST does not exist" | ||
29 | exit 1 | ||
30 | else | ||
31 | echo "PASS: $READ_TEST exists" | ||
32 | fi | ||
33 | |||
34 | for((part=0; part<$part_num; part++)); | ||
35 | do | ||
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 | ||
48 | done | ||
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 | |||
4 | I2C_DETECT=`which i2cdetect` | ||
5 | if [ "x$I2C_DETECT" != "x" ]; then | ||
6 | echo "PASS: i2cdetect found" | ||
7 | else | ||
8 | echo "FAIL: i2cdetect not found" | ||
9 | exit 1 | ||
10 | fi | ||
11 | |||
12 | I2C_SET=`which i2cset` | ||
13 | if [ "x$I2C_SET" != "x" ]; then | ||
14 | echo "PASS: i2cset found" | ||
15 | else | ||
16 | echo "FAIL: i2cset not found" | ||
17 | exit 1 | ||
18 | fi | ||
19 | |||
20 | I2C_GET=`which i2cget` | ||
21 | if [ "x$I2C_GET" != "x" ]; then | ||
22 | echo "PASS: i2cget found" | ||
23 | else | ||
24 | echo "FAIL: i2cget not found" | ||
25 | exit 1 | ||
26 | fi | ||
27 | |||
28 | if I2C_ADAPTERS=`$I2C_DETECT -l |wc -l`; then | ||
29 | echo "PASS: $I2C_ADAPTERS i2c adapters found" | ||
30 | else | ||
31 | echo "FAIL: no i2c adapters found" | ||
32 | exit 1 | ||
33 | fi | ||
34 | |||
35 | adapters=0 | ||
36 | while [ $adapters -lt $I2C_ADAPTERS ] | ||
37 | do | ||
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 | ||
46 | done | ||
47 | |||
48 | # Area of bus:i2c-0 addr:0x52 is free to read and write | ||
49 | $I2C_SET -y 0 0x52 0 0x55 | ||
50 | if [ $? -eq 0 ]; then | ||
51 | echo "PASS: i2c_set -y 0 0x52 0 0x55 success" | ||
52 | else | ||
53 | echo "FAIL: i2c_set -y 0 0x52 0 0x55 fail" | ||
54 | fi | ||
55 | |||
56 | num=`$I2C_GET -y 0 0x52 0 | grep -c '0x55'` | ||
57 | if [ $num -eq 1 ]; then | ||
58 | echo "PASS: i2c_get -y 0 0x52 0 success" | ||
59 | else | ||
60 | echo "FAIL: i2c_get -y 0 0x52 0 fail" | ||
61 | fi | ||
62 | |||
63 | $I2C_SET -y 0 0x52 0 0xaa | ||
64 | if [ $? -eq 0 ]; then | ||
65 | echo "PASS: i2c_set -y 0 0x52 0 0xaa success" | ||
66 | else | ||
67 | echo "FAIL: i2c_set -y 0 0x52 0 0xaa fail" | ||
68 | fi | ||
69 | |||
70 | num=`$I2C_GET -y 0 0x52 0 | grep -c '0xaa'` | ||
71 | if [ $num -eq 1 ]; then | ||
72 | echo "PASS: i2c_get -y 0 0x52 0 success" | ||
73 | else | ||
74 | echo "FAIL: i2c_get -y 0 0x52 0 fail" | ||
75 | fi | ||
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 | |||
6 | uname -a | grep "PREEMPT RT" | ||
7 | if [ $? -ne 0 ]; then | ||
8 | echo "FAIL: The kernel include real-time patch" | ||
9 | echo 1 | ||
10 | fi | ||
11 | echo "PASS: The kernel include real-time patch" | ||
12 | |||
13 | ps | grep '\(\[irq/\)' | ||
14 | if [ $? -ne 0 ]; then | ||
15 | echo "FAIL: The IRQ handlers are treated by a patched kernel in kernel thread context." | ||
16 | exit 1 | ||
17 | fi | ||
18 | echo "PASS: The IRQ handlers are treated by a patched kernel in kernel thread context." | ||
19 | |||
20 | cyclictest -t5 -p 80 -i 10000 -l 100 | ||
21 | if [ $? -ne 0 ]; then | ||
22 | echo "FAIL: Test case: POSIX interval timer, Interval 10000 micro seconds,. 100 loops." | ||
23 | exit 1 | ||
24 | fi | ||
25 | echo "PASS: Test case: POSIX interval timer, Interval 10000 micro seconds,. 100 loops." | ||
26 | |||
27 | cyclictest -t5 -p 80 -n -i 10000 -l 100 | ||
28 | if [ $? -ne 0 ]; then | ||
29 | echo "FAIL: Test case: clock_nanosleep(TIME_ABSTIME), Interval 10000 micro seconds,. 100 loops." | ||
30 | exit 1 | ||
31 | fi | ||
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 | |||
6 | MTD_CHAR_DEVICE="/dev/mtd8" | ||
7 | MTD_BLOCK_DEVICE="/dev/mtdblock8" | ||
8 | |||
9 | FLASH_ERASE=`which flash_erase` | ||
10 | if [ "x$FLASH_ERASE" != "x" ]; then | ||
11 | echo "PASS: flash_erase found" | ||
12 | else | ||
13 | echo "FAIL: flash_erase not found" | ||
14 | exit 1 | ||
15 | fi | ||
16 | |||
17 | if [ ! -e $MTD_CHAR_DEVICE ]; then | ||
18 | echo "FAIL: spi flash device $MTD_CHAR_DEVICE does not exist" | ||
19 | exit 1 | ||
20 | else | ||
21 | echo "PASS: spi flash device $MTD_CHAR_DEVICE exists" | ||
22 | fi | ||
23 | |||
24 | if [ ! -e $MTD_BLOCK_DEVICE ]; then | ||
25 | echo "FAIL: spi flash device $MTD_BLOCK_DEVICE does not exist" | ||
26 | exit 1 | ||
27 | else | ||
28 | echo "PASS: spi flash device $MTD_BLOCK_DEVICE exists" | ||
29 | fi | ||
30 | |||
31 | $FLASH_ERASE -j $MTD_CHAR_DEVICE 0 0 | ||
32 | if [ $? -ne 0 ]; then | ||
33 | echo "FAIL: format spi flash device $MTD_BLOCK_DEVICE fail" | ||
34 | exit 1 | ||
35 | else | ||
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 | ||
53 | fi | ||
54 | |||
55 | echo "PASS: spi bus test passed" | ||
56 | exit 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 | |||
5 | WATCHDOG=`which watchdog` | ||
6 | if [ "x$WATCHDOG" != "x" ]; then | ||
7 | echo "PASS: watchdog found" | ||
8 | else | ||
9 | echo "FAIL: watchdog not found" | ||
10 | exit 1 | ||
11 | fi | ||
12 | |||
13 | WATCHDOG_CONF=/etc/watchdog.conf | ||
14 | if [ -f $WATCHDOG_CONF ]; then | ||
15 | echo "PASS: watchdog config file found" | ||
16 | sed -i '23,23 s/#//' $WATCHDOG_CONF | ||
17 | else | ||
18 | echo "FAIL: watchdog config file not found" | ||
19 | exit 1 | ||
20 | fi | ||
21 | |||
22 | $WATCHDOG -v /dev/watchdog | ||
23 | watchdog_thread=`ps | grep -c 'watchdog -v /dev/watchdog'` | ||
24 | if [ $watchdog_thread -eq 2 ]; then | ||
25 | echo "PASS: Watchdog daemon started successfully" | ||
26 | else | ||
27 | echo "FAIL: Failed to start watchdog daemon" | ||
28 | exit 1 | ||
29 | fi | ||
30 | |||
31 | sleep 5s | ||
32 | |||
33 | killall watchdog | ||
34 | |||
35 | retry=0 | ||
36 | while [ $retry -lt 10 ] | ||
37 | do | ||
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` | ||
45 | done | ||
46 | |||
47 | if [ $retry -eq 10 ]; then | ||
48 | echo "FAIL: Failed to stop watchdog daemon" | ||
49 | fi | ||
50 | |||
51 | found=0 | ||
52 | while read line | ||
53 | do | ||
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 | ||
59 | done < /var/log/messages | ||
60 | |||
61 | if [ $found -eq 0 ]; then | ||
62 | echo "FAIL: Watchdog is not alive after 1 interval" | ||
63 | fi | ||
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 | |||
4 | ethernet_interface="eth0" | ||
5 | ethernet_ping_ipaddr="172.21.3.22" | ||
6 | ethernet_ipaddr=$1 | ||
7 | |||
8 | IFCONFIG=`which ifconfig` | ||
9 | |||
10 | $IFCONFIG $ethernet_interface up | ||
11 | $IFCONFIG | grep $ethernet_interface | ||
12 | if [ $? -ne 0 ]; then | ||
13 | echo "FAIL: $ethernet_interface is not up" | ||
14 | exit 1 | ||
15 | else | ||
16 | echo "PASS: $ethernet_interface is up" | ||
17 | fi | ||
18 | |||
19 | if [ "x$ethernet_ipaddr" != "x" ]; then | ||
20 | $IFCONFIG $ethernet_interface $ethernet_ipaddr | ||
21 | fi | ||
22 | |||
23 | $IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}' | ||
24 | if [ $? -ne 0 ]; then | ||
25 | echo "FAIL: ipaddr of $ethernet_interface setup failed" | ||
26 | exit 1 | ||
27 | else | ||
28 | echo "PASS: ipaddr of $ethernet_interface setup success" | ||
29 | fi | ||
30 | |||
31 | mindatasize=56 | ||
32 | maxdatasize=650 | ||
33 | stepsize=100 | ||
34 | iteration=1 | ||
35 | datasize=$mindatasize | ||
36 | logfile=`/bin/mktemp` | ||
37 | statistics=`/bin/mktemp` | ||
38 | error=0 | ||
39 | |||
40 | trap cleanup SIGHUP SIGINT SIGTERM | ||
41 | |||
42 | clean_tasks() { | ||
43 | echo "Executing clean up tasks" | ||
44 | rm -f $logfile $statistics | ||
45 | } | ||
46 | |||
47 | cleanup() { | ||
48 | echo "Aborting script execution" | ||
49 | clean_tasks | ||
50 | exit 0 | ||
51 | } | ||
52 | |||
53 | echo "start ping test for $ethernet_interface..." | ||
54 | |||
55 | while [ $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 | ||
73 | done | ||
74 | |||
75 | # Report failures | ||
76 | if [ $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 | ||
83 | else | ||
84 | clean_tasks | ||
85 | echo -e "PASS: ping test for $ethernet_interface success\n" | ||
86 | fi | ||
87 | |||
88 | echo "PASS: $ethernet_interface test passed" | ||
89 | exit 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 | |||
8 | if part_num=`cat /proc/mtd | grep -c 'mtd'`; then | ||
9 | echo "PASS: $part_num partitions found" | ||
10 | else | ||
11 | echo "FAIL: $part_num partitions found" | ||
12 | exit 1 | ||
13 | fi | ||
14 | |||
15 | for((part=0; part<$part_num; part++)); | ||
16 | do | ||
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 | ||
23 | done | ||
24 | |||
25 | READ_TEST=`find / -name mtd_readtest.ko -print` | ||
26 | |||
27 | if [ ! -e $READ_TEST ]; then | ||
28 | echo "FAIL: $READ_TEST does not exist" | ||
29 | exit 1 | ||
30 | else | ||
31 | echo "PASS: $READ_TEST exists" | ||
32 | fi | ||
33 | |||
34 | for((part=0; part<$part_num; part++)); | ||
35 | do | ||
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 | ||
48 | done | ||
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 | |||
4 | I2C_DETECT=`which i2cdetect` | ||
5 | if [ "x$I2C_DETECT" != "x" ]; then | ||
6 | echo "PASS: i2cdetect found" | ||
7 | else | ||
8 | echo "FAIL: i2cdetect not found" | ||
9 | exit 1 | ||
10 | fi | ||
11 | |||
12 | I2C_SET=`which i2cset` | ||
13 | if [ "x$I2C_SET" != "x" ]; then | ||
14 | echo "PASS: i2cset found" | ||
15 | else | ||
16 | echo "FAIL: i2cset not found" | ||
17 | exit 1 | ||
18 | fi | ||
19 | |||
20 | I2C_GET=`which i2cget` | ||
21 | if [ "x$I2C_GET" != "x" ]; then | ||
22 | echo "PASS: i2cget found" | ||
23 | else | ||
24 | echo "FAIL: i2cget not found" | ||
25 | exit 1 | ||
26 | fi | ||
27 | |||
28 | if I2C_ADAPTERS=`$I2C_DETECT -l |wc -l`; then | ||
29 | echo "PASS: $I2C_ADAPTERS i2c adapters found" | ||
30 | else | ||
31 | echo "FAIL: no i2c adapters found" | ||
32 | exit 1 | ||
33 | fi | ||
34 | |||
35 | adapters=0 | ||
36 | while [ $adapters -lt $I2C_ADAPTERS ] | ||
37 | do | ||
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 | ||
46 | done | ||
47 | |||
48 | # Area of bus:i2c-0 addr:0x52 is free to read and write | ||
49 | $I2C_SET -y 0 0x52 0 0x55 | ||
50 | if [ $? -eq 0 ]; then | ||
51 | echo "PASS: i2c_set -y 0 0x52 0 0x55 success" | ||
52 | else | ||
53 | echo "FAIL: i2c_set -y 0 0x52 0 0x55 fail" | ||
54 | fi | ||
55 | |||
56 | num=`$I2C_GET -y 0 0x52 0 | grep -c '0x55'` | ||
57 | if [ $num -eq 1 ]; then | ||
58 | echo "PASS: i2c_get -y 0 0x52 0 success" | ||
59 | else | ||
60 | echo "FAIL: i2c_get -y 0 0x52 0 fail" | ||
61 | fi | ||
62 | |||
63 | $I2C_SET -y 0 0x52 0 0xaa | ||
64 | if [ $? -eq 0 ]; then | ||
65 | echo "PASS: i2c_set -y 0 0x52 0 0xaa success" | ||
66 | else | ||
67 | echo "FAIL: i2c_set -y 0 0x52 0 0xaa fail" | ||
68 | fi | ||
69 | |||
70 | num=`$I2C_GET -y 0 0x52 0 | grep -c '0xaa'` | ||
71 | if [ $num -eq 1 ]; then | ||
72 | echo "PASS: i2c_get -y 0 0x52 0 success" | ||
73 | else | ||
74 | echo "FAIL: i2c_get -y 0 0x52 0 fail" | ||
75 | fi | ||
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 | |||
6 | uname -a | grep "PREEMPT RT" | ||
7 | if [ $? -ne 0 ]; then | ||
8 | echo "FAIL: The kernel include real-time patch" | ||
9 | echo 1 | ||
10 | fi | ||
11 | echo "PASS: The kernel include real-time patch" | ||
12 | |||
13 | ps | grep '\(\[irq/\)' | ||
14 | if [ $? -ne 0 ]; then | ||
15 | echo "FAIL: The IRQ handlers are treated by a patched kernel in kernel thread context." | ||
16 | exit 1 | ||
17 | fi | ||
18 | echo "PASS: The IRQ handlers are treated by a patched kernel in kernel thread context." | ||
19 | |||
20 | cyclictest -t5 -p 80 -i 10000 -l 100 | ||
21 | if [ $? -ne 0 ]; then | ||
22 | echo "FAIL: Test case: POSIX interval timer, Interval 10000 micro seconds,. 100 loops." | ||
23 | exit 1 | ||
24 | fi | ||
25 | echo "PASS: Test case: POSIX interval timer, Interval 10000 micro seconds,. 100 loops." | ||
26 | |||
27 | cyclictest -t5 -p 80 -n -i 10000 -l 100 | ||
28 | if [ $? -ne 0 ]; then | ||
29 | echo "FAIL: Test case: clock_nanosleep(TIME_ABSTIME), Interval 10000 micro seconds,. 100 loops." | ||
30 | exit 1 | ||
31 | fi | ||
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 | |||
4 | DEV="mmc0:e624" | ||
5 | |||
6 | if [ -f /sys/bus/mmc/drivers/mmcblk/bind ]; then | ||
7 | echo "PASS: /sys/bus/mmc/drivers/mmcblk/bind found" | ||
8 | else | ||
9 | echo "FAIL: /sys/bus/mmc/drivers/mmcblk/bind not found" | ||
10 | exit 1 | ||
11 | fi | ||
12 | |||
13 | if [ -f /sys/bus/mmc/drivers/mmcblk/unbind ]; then | ||
14 | echo "PASS: /sys/bus/mmc/drivers/mmcblk/unbind found" | ||
15 | else | ||
16 | echo "FAIL: /sys/bus/mmc/drivers/mmcblk/unbind not found" | ||
17 | exit 1 | ||
18 | fi | ||
19 | |||
20 | if [ -f /sys/bus/mmc/drivers/mmc_test/bind ]; then | ||
21 | echo "PASS: /sys/bus/mmc/drivers/mmc_test/bind found" | ||
22 | else | ||
23 | echo "FAIL: /sys/bus/mmc/drivers/mmc_test/bind not found" | ||
24 | exit 1 | ||
25 | fi | ||
26 | |||
27 | if [ -f /sys/bus/mmc/drivers/mmc_test/unbind ]; then | ||
28 | echo "PASS: /sys/bus/mmc/drivers/mmc_test/unbind found" | ||
29 | else | ||
30 | echo "FAIL: /sys/bus/mmc/drivers/mmc_test/unbind not found" | ||
31 | exit 1 | ||
32 | fi | ||
33 | |||
34 | mount -t debugfs none /sys/kernel/debug | ||
35 | if [ $? -eq 0 ]; then | ||
36 | echo "PASS: successfully mount /sys/kernel/debug" | ||
37 | else | ||
38 | echo "FAIL: failed to mount /sys/kernel/debug" | ||
39 | fi | ||
40 | |||
41 | echo $DEV > /sys/bus/mmc/drivers/mmcblk/unbind | ||
42 | if [ $? -eq 0 ]; then | ||
43 | echo "PASS: successfully unbind mmcblk driver" | ||
44 | else | ||
45 | echo "FAIL: failed to unbind mmcblk driver" | ||
46 | fi | ||
47 | |||
48 | echo $DEV > /sys/bus/mmc/drivers/mmc_test/bind | ||
49 | if [ $? -eq 0 ]; then | ||
50 | echo "PASS: successfully bind mmc_test driver" | ||
51 | else | ||
52 | echo "FAIL: failed to bind mmc_test driver" | ||
53 | fi | ||
54 | |||
55 | # echo 0 means test all supported test cases | ||
56 | fail_num=`echo 0 > /sys/kernel/debug/mmc0/mmc0\:e624/test | grep -E -c 'FAILED|ERROR'` | ||
57 | if [ $fail_num -eq 0 ]; then | ||
58 | echo "PASS: all test cases passed" | ||
59 | else | ||
60 | echo "FAIL: some test cases failed" | ||
61 | fi | ||
62 | |||
63 | cat /sys/kernel/debug/mmc0/mmc0\:e624/test | ||
64 | |||
65 | echo $DEV > /sys/bus/mmc/drivers/mmc_test/unbind | ||
66 | if [ $? -eq 0 ]; then | ||
67 | echo "PASS: successfully unbind mmc_test driver" | ||
68 | else | ||
69 | echo "FAIL: failed to unbind mmc_test driver" | ||
70 | fi | ||
71 | |||
72 | echo $DEV > /sys/bus/mmc/drivers/mmcblk/bind | ||
73 | if [ $? -eq 0 ]; then | ||
74 | echo "PASS: successfully bind mmcblk driver" | ||
75 | else | ||
76 | echo "FAIL: failed to bind mmcblk driver" | ||
77 | fi | ||
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 | |||
6 | MTD_CHAR_DEVICE="/dev/mtd8" | ||
7 | MTD_BLOCK_DEVICE="/dev/mtdblock8" | ||
8 | |||
9 | FLASH_ERASE=`which flash_erase` | ||
10 | if [ "x$FLASH_ERASE" != "x" ]; then | ||
11 | echo "PASS: flash_erase found" | ||
12 | else | ||
13 | echo "FAIL: flash_erase not found" | ||
14 | exit 1 | ||
15 | fi | ||
16 | |||
17 | if [ ! -e $MTD_CHAR_DEVICE ]; then | ||
18 | echo "FAIL: spi flash device $MTD_CHAR_DEVICE does not exist" | ||
19 | exit 1 | ||
20 | else | ||
21 | echo "PASS: spi flash device $MTD_CHAR_DEVICE exists" | ||
22 | fi | ||
23 | |||
24 | if [ ! -e $MTD_BLOCK_DEVICE ]; then | ||
25 | echo "FAIL: spi flash device $MTD_BLOCK_DEVICE does not exist" | ||
26 | exit 1 | ||
27 | else | ||
28 | echo "PASS: spi flash device $MTD_BLOCK_DEVICE exists" | ||
29 | fi | ||
30 | |||
31 | $FLASH_ERASE -j $MTD_CHAR_DEVICE 0 0 | ||
32 | if [ $? -ne 0 ]; then | ||
33 | echo "FAIL: format spi flash device $MTD_BLOCK_DEVICE fail" | ||
34 | exit 1 | ||
35 | else | ||
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 | ||
53 | fi | ||
54 | |||
55 | echo "PASS: spi bus test passed" | ||
56 | exit 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 | |||
5 | WATCHDOG=`which watchdog` | ||
6 | if [ "x$WATCHDOG" != "x" ]; then | ||
7 | echo "PASS: watchdog found" | ||
8 | else | ||
9 | echo "FAIL: watchdog not found" | ||
10 | exit 1 | ||
11 | fi | ||
12 | |||
13 | WATCHDOG_CONF=/etc/watchdog.conf | ||
14 | if [ -f $WATCHDOG_CONF ]; then | ||
15 | echo "PASS: watchdog config file found" | ||
16 | sed -i '23,23 s/#//' $WATCHDOG_CONF | ||
17 | else | ||
18 | echo "FAIL: watchdog config file not found" | ||
19 | exit 1 | ||
20 | fi | ||
21 | |||
22 | $WATCHDOG -v /dev/watchdog | ||
23 | watchdog_thread=`ps | grep -c 'watchdog -v /dev/watchdog'` | ||
24 | if [ $watchdog_thread -eq 2 ]; then | ||
25 | echo "PASS: Watchdog daemon started successfully" | ||
26 | else | ||
27 | echo "FAIL: Failed to start watchdog daemon" | ||
28 | exit 1 | ||
29 | fi | ||
30 | |||
31 | sleep 5s | ||
32 | |||
33 | killall watchdog | ||
34 | |||
35 | retry=0 | ||
36 | while [ $retry -lt 10 ] | ||
37 | do | ||
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` | ||
45 | done | ||
46 | |||
47 | if [ $retry -eq 10 ]; then | ||
48 | echo "FAIL: Failed to stop watchdog daemon" | ||
49 | fi | ||
50 | |||
51 | found=0 | ||
52 | while read line | ||
53 | do | ||
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 | ||
59 | done < /var/log/messages | ||
60 | |||
61 | if [ $found -eq 0 ]; then | ||
62 | echo "FAIL: Watchdog is not alive after 1 interval" | ||
63 | fi | ||
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 | |||
3 | ethernet_interface="eth0" | ||
4 | #sestord02 ip address | ||
5 | ethernet_ping_ipaddr="172.21.3.22" | ||
6 | ethernet_ipaddr=$1 | ||
7 | |||
8 | IFCONFIG=`which ifconfig` | ||
9 | |||
10 | $IFCONFIG $ethernet_interface up | ||
11 | $IFCONFIG | grep $ethernet_interface | ||
12 | if [ $? -ne 0 ]; then | ||
13 | echo "FAIL: $ethernet_interface is not up" | ||
14 | exit 1 | ||
15 | else | ||
16 | echo "PASS: $ethernet_interface is up" | ||
17 | fi | ||
18 | |||
19 | if [ "x$ethernet_ipaddr" != "x" ]; then | ||
20 | $IFCONFIG $ethernet_interface $ethernet_ipaddr | ||
21 | fi | ||
22 | |||
23 | $IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}' | ||
24 | if [ $? -ne 0 ]; then | ||
25 | echo "FAIL: ipaddr of $ethernet_interface setup failed" | ||
26 | exit 1 | ||
27 | else | ||
28 | echo "PASS: ipaddr of $ethernet_interface setup success" | ||
29 | fi | ||
30 | |||
31 | mindatasize=56 | ||
32 | maxdatasize=650 | ||
33 | stepsize=100 | ||
34 | iteration=1 | ||
35 | datasize=$mindatasize | ||
36 | logfile=`/bin/mktemp` | ||
37 | statistics=`/bin/mktemp` | ||
38 | error=0 | ||
39 | |||
40 | trap cleanup SIGHUP SIGINT SIGTERM | ||
41 | |||
42 | clean_tasks() { | ||
43 | echo "Executing clean up tasks" | ||
44 | rm -f $logfile $statistics | ||
45 | } | ||
46 | |||
47 | cleanup() { | ||
48 | echo "Aborting script execution" | ||
49 | clean_tasks | ||
50 | exit 0 | ||
51 | } | ||
52 | |||
53 | echo "start ping test for $ethernet_interface..." | ||
54 | |||
55 | while [ $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 | ||
73 | done | ||
74 | |||
75 | # Report failures | ||
76 | if [ $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 | ||
83 | else | ||
84 | clean_tasks | ||
85 | echo -e "PASS: ping test for $ethernet_interface success\n" | ||
86 | fi | ||
87 | |||
88 | exit 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 | |||
7 | if part_num=`cat /proc/mtd | grep -c 'mtd'`; then | ||
8 | echo "PASS: show $part_num partitions" | ||
9 | else | ||
10 | echo "FAIL: show $part_num partitions" | ||
11 | exit 1 | ||
12 | fi | ||
13 | |||
14 | for((part=0; part<$part_num; part++)); | ||
15 | do | ||
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 | ||
22 | done | ||
23 | |||
24 | READ_TEST=`find / -name mtd_readtest.ko -print` | ||
25 | |||
26 | if [ ! -e "$READ_TEST" ]; then | ||
27 | echo "FAIL: mtd_readtest.ko does not exist" | ||
28 | exit 1 | ||
29 | else | ||
30 | echo "PASS: mtd_readtest.ko exists" | ||
31 | fi | ||
32 | |||
33 | for((part=0; part<$part_num; part++)); | ||
34 | do | ||
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 | ||
49 | done | ||
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 | |||
4 | if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then | ||
5 | echo "PASS: found $I2C_ADAPTERS i2c adapters" | ||
6 | else | ||
7 | echo "FAIL: no i2c adapters found" | ||
8 | exit 1 | ||
9 | fi | ||
10 | |||
11 | if [ -z "$adapters" ]; then | ||
12 | adapters=0 | ||
13 | fi | ||
14 | |||
15 | while [ $adapters -lt $I2C_ADAPTERS ] | ||
16 | do | ||
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 | ||
25 | done | ||
26 | |||
27 | i2cdetect -y 0 | ||
28 | if [ $? -ne 0 ]; then | ||
29 | echo "FAIL: detect i2c bus 0 fail" | ||
30 | exit 1 | ||
31 | else | ||
32 | echo "PASS: detect i2c bus 0 success" | ||
33 | fi | ||
34 | |||
35 | #i2c bus 0, device address 0x52, DDR3 DIMM Socket 1, SPD EEPROM | ||
36 | i2cdump -f -y 0 0x52 |grep UG51U6400N8SU | ||
37 | if [ $? -ne 0 ]; then | ||
38 | echo "FAIL: read SPD EEPROM on i2c bus 0 fail" | ||
39 | exit 1 | ||
40 | else | ||
41 | echo "PASS: read SPD EEPROM on i2c bus 0 success" | ||
42 | fi | ||
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 | |||
3 | ethernet_interface="eth0" | ||
4 | #sestord02 ip address | ||
5 | ethernet_ping_ipaddr="172.21.3.22" | ||
6 | ethernet_ipaddr=$1 | ||
7 | |||
8 | #Intel Corporation 82574L Gigabit Network Card (intel e1000e) | ||
9 | vendor_id="8086" | ||
10 | product_id="10d3" | ||
11 | |||
12 | #find vendor id & product id | ||
13 | lspci -nn |grep $vendor_id:$product_id | ||
14 | if [ $? -ne 0 ]; then | ||
15 | echo "FAIL: pci-e ethernet card device does not exist" | ||
16 | exit 1 | ||
17 | else | ||
18 | echo "PASS: got pci-e ethernet card device" | ||
19 | fi | ||
20 | |||
21 | setpci -v -d $vendor_id:$product_id latency_timer=b0 | ||
22 | if [ $? -ne 0 ]; then | ||
23 | echo "FAIL: parameter changes to pci config space failed" | ||
24 | exit 1 | ||
25 | else | ||
26 | echo "PASS: parameter changes to pci config space success" | ||
27 | fi | ||
28 | |||
29 | IFCONFIG=`which ifconfig` | ||
30 | |||
31 | $IFCONFIG $ethernet_interface up | ||
32 | $IFCONFIG | grep $ethernet_interface | ||
33 | if [ $? -ne 0 ]; then | ||
34 | echo "FAIL: pci-e ethernet card device $ethernet_interface is not up" | ||
35 | exit 1 | ||
36 | else | ||
37 | echo "PASS: pci-e ethernet card device $ethernet_interface is up" | ||
38 | fi | ||
39 | |||
40 | if [ "x$ethernet_ipaddr" != "x" ]; then | ||
41 | $IFCONFIG $ethernet_interface $ethernet_ipaddr | ||
42 | fi | ||
43 | |||
44 | $IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}' | ||
45 | if [ $? -ne 0 ]; then | ||
46 | echo "FAIL: ipaddr of pci-e ethernet card device $ethernet_interface setup failed" | ||
47 | exit 1 | ||
48 | else | ||
49 | echo "PASS: ipaddr of pci-e ethernet card device $ethernet_interface setup success" | ||
50 | fi | ||
51 | |||
52 | mindatasize=56 | ||
53 | maxdatasize=650 | ||
54 | stepsize=100 | ||
55 | iteration=1 | ||
56 | datasize=$mindatasize | ||
57 | logfile=`/bin/mktemp` | ||
58 | statistics=`/bin/mktemp` | ||
59 | error=0 | ||
60 | |||
61 | trap cleanup SIGHUP SIGINT SIGTERM | ||
62 | |||
63 | clean_tasks() { | ||
64 | echo "Executing clean up tasks" | ||
65 | rm -f $logfile $statistics | ||
66 | } | ||
67 | |||
68 | cleanup() { | ||
69 | echo "Aborting script execution" | ||
70 | clean_tasks | ||
71 | exit 0 | ||
72 | } | ||
73 | |||
74 | echo "start ping test for pci-e ethernet card device $ethernet_interface..." | ||
75 | |||
76 | while [ $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 | ||
94 | done | ||
95 | |||
96 | # Report failures | ||
97 | if [ $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 | ||
104 | else | ||
105 | clean_tasks | ||
106 | echo -e "PASS: ping test for pci-e ethernet card device $ethernet_interface success\n" | ||
107 | fi | ||
108 | |||
109 | exit 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 | |||
3 | RTC_DEVICE="/dev/rtc" | ||
4 | |||
5 | if [ ! -e $RTC_DEVICE ]; then | ||
6 | echo "FAIL: rtc device does not exist" | ||
7 | exit 1 | ||
8 | else | ||
9 | echo "PASS: rtc device exists" | ||
10 | fi | ||
11 | |||
12 | /sbin/hwclock -f $RTC_DEVICE | ||
13 | if [ $? -ne 0 ]; then | ||
14 | echo "FAIL: rtc device open failed" | ||
15 | exit 1 | ||
16 | else | ||
17 | echo "PASS: rtc device open success" | ||
18 | fi | ||
19 | |||
20 | |||
21 | /sbin/hwclock --systohc | ||
22 | if [ $? -ne 0 ]; then | ||
23 | echo "FAIL: sync system clock and hardware clock failed" | ||
24 | exit 1 | ||
25 | else | ||
26 | echo "PASS: sync system clock and hardware clock success" | ||
27 | fi | ||
28 | |||
29 | RTC_TIME=$(/sbin/hwclock -r |awk '{print $4}') | ||
30 | echo $RTC_TIME | ||
31 | SYS_TIME=$(date +%m/%d/%Y-%X |awk '{print $1}' |awk -F- '{print $2}') | ||
32 | echo $SYS_TIME | ||
33 | |||
34 | if [ "$RTC_TIME" = "$SYS_TIME" ] ; then | ||
35 | echo "PASS: system time same with hardware time" | ||
36 | else | ||
37 | echo "FAIL: system time different with hardware time" | ||
38 | exit 1 | ||
39 | fi | ||
40 | |||
41 | echo "PASS: rtc test successful" | ||
42 | exit 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 | # | ||
5 | result=0 | ||
6 | devpath="" | ||
7 | satainfo="" | ||
8 | SD=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'` | ||
9 | if [ -z "$SD" ]; then | ||
10 | echo "FAIL: find sata device" | ||
11 | exit 1 | ||
12 | else | ||
13 | echo "PASS: find sata device" | ||
14 | fi | ||
15 | HDPARM=`which hdparm` | ||
16 | if [ -z $HDPARM ]; then | ||
17 | result=$? | ||
18 | echo "FAIL: find hdparm" | ||
19 | fi | ||
20 | echo "PASS: find hdparm" | ||
21 | |||
22 | |||
23 | for 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 | ||
80 | done | ||
81 | exit $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 | |||
5 | SDHC_DEVICE="/dev/mmcblk0p1" | ||
6 | |||
7 | if [ ! -e $SDHC_DEVICE ]; then | ||
8 | echo "FAIL: $SDHC_DEVICE does not exist" | ||
9 | exit 1 | ||
10 | else | ||
11 | echo "PASS: $SDHC_DEVICE device exists" | ||
12 | fi | ||
13 | |||
14 | mount |grep mmcblk0p1 | ||
15 | if [ $? -eq 0 ]; then | ||
16 | umount $SDHC_DEVICE | ||
17 | fi | ||
18 | |||
19 | /sbin/mkfs.ext2 $SDHC_DEVICE | ||
20 | if [ $? -ne 0 ]; then | ||
21 | echo "FAIL: format $SDHC_DEVICE fail" | ||
22 | exit 1 | ||
23 | else | ||
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 | ||
40 | fi | ||
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 | |||
7 | MTD_CHAR_DEVICE="/dev/mtd2" | ||
8 | MTD_BLOCK_DEVICE="/dev/mtdblock2" | ||
9 | |||
10 | if [ ! -e $MTD_CHAR_DEVICE ]; then | ||
11 | echo "FAIL: spi flash device $MTD_CHAR_DEVICE does not exist" | ||
12 | exit 1 | ||
13 | else | ||
14 | echo "PASS: spi flash device $MTD_CHAR_DEVICE exists" | ||
15 | fi | ||
16 | |||
17 | if [ ! -e $MTD_BLOCK_DEVICE ]; then | ||
18 | echo "FAIL: spi flash device $MTD_BLOCK_DEVICE does not exist" | ||
19 | exit 1 | ||
20 | else | ||
21 | echo "PASS: spi flash device $MTD_BLOCK_DEVICE exists" | ||
22 | fi | ||
23 | |||
24 | /usr/sbin/flash_erase -j $MTD_CHAR_DEVICE 0 0 | ||
25 | if [ $? -ne 0 ]; then | ||
26 | echo "FAIL: format spi flash device $MTD_BLOCK_DEVICE fail" | ||
27 | exit 1 | ||
28 | else | ||
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 | ||
45 | fi | ||
46 | |||
47 | echo "PASS: spi bus test passed" | ||
48 | exit 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 | |||
6 | USB_DISK=`ls /dev/sd*[1-9] | sort | tail -n 1` | ||
7 | |||
8 | usbutils_is_installed=`which lsusb` | ||
9 | if [ -z $usbutils_is_installed ]; then | ||
10 | echo "FAIL: Cannot find lsusb" | ||
11 | exit 1 | ||
12 | else | ||
13 | echo "PASS: usbutils found" | ||
14 | fi | ||
15 | |||
16 | usbdev_num=`lsusb | grep -v root\ hub | wc -l` | ||
17 | if [ $usbdev_num -eq 0 ]; then | ||
18 | echo "FAIL: USB device is not connected" | ||
19 | exit 1 | ||
20 | else | ||
21 | echo "PASS: $usbdev_num USB device(s) connected" | ||
22 | fi | ||
23 | |||
24 | lsusb | grep -v root\ hub | ||
25 | mkdir -p /mnt/usb_ehci | ||
26 | mount $USB_DISK /mnt/usb_ehci | ||
27 | if [ $? -ne 0 ]; then | ||
28 | echo "FAIL: Mount USB device failed" | ||
29 | exit 1 | ||
30 | else | ||
31 | echo "PASS: Mount USB device succeed" | ||
32 | fi | ||
33 | |||
34 | echo "Begin test usb device..." | ||
35 | dd if=/dev/urandom of=/mnt/usb_ehci/testfile bs=1M count=50 | ||
36 | if [ $? -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 | ||
42 | fi | ||
43 | |||
44 | echo "PASS: test succeed" | ||
45 | rm -f /mnt/usb_ehci_testfile | ||
46 | umount /mnt/usb_ehci | ||
47 | rm -fr /mnt/usb_ehci | ||
48 | exit 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 | |||
5 | WATCHDOG=`which watchdog` | ||
6 | if [ "x$WATCHDOG" != "x" ]; then | ||
7 | echo "PASS: watchdog found" | ||
8 | else | ||
9 | echo "FAIL: watchdog not found" | ||
10 | exit 1 | ||
11 | fi | ||
12 | |||
13 | WATCHDOG_CONF=/etc/watchdog.conf | ||
14 | if [ -f $WATCHDOG_CONF ]; then | ||
15 | echo "PASS: watchdog config file found" | ||
16 | sed -i '23,23 s/#//' $WATCHDOG_CONF | ||
17 | else | ||
18 | echo "FAIL: watchdog config file not found" | ||
19 | exit 1 | ||
20 | fi | ||
21 | |||
22 | $WATCHDOG -v /dev/watchdog | ||
23 | watchdog_thread=`ps | grep -c 'watchdog -v /dev/watchdog'` | ||
24 | if [ $watchdog_thread -eq 2 ]; then | ||
25 | echo "PASS: Watchdog daemon started successfully" | ||
26 | else | ||
27 | echo "FAIL: Failed to start watchdog daemon" | ||
28 | exit 1 | ||
29 | fi | ||
30 | |||
31 | sleep 5s | ||
32 | |||
33 | killall watchdog | ||
34 | |||
35 | retry=0 | ||
36 | while [ $retry -lt 10 ] | ||
37 | do | ||
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` | ||
45 | done | ||
46 | |||
47 | if [ $retry -eq 10 ]; then | ||
48 | echo "FAIL: Failed to stop watchdog daemon" | ||
49 | fi | ||
50 | |||
51 | found=0 | ||
52 | while read line | ||
53 | do | ||
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 | ||
59 | done < /var/log/messages | ||
60 | |||
61 | if [ $found -eq 0 ]; then | ||
62 | echo "FAIL: Watchdog is not alive after 1 interval" | ||
63 | fi | ||
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 | |||
3 | ethernet_interface="eth1" | ||
4 | #sestord02 ip address | ||
5 | ethernet_ping_ipaddr="172.21.3.22" | ||
6 | ethernet_ipaddr=$1 | ||
7 | |||
8 | IFCONFIG=`which ifconfig` | ||
9 | |||
10 | $IFCONFIG $ethernet_interface up | ||
11 | $IFCONFIG | grep $ethernet_interface | ||
12 | if [ $? -ne 0 ]; then | ||
13 | echo "FAIL: $ethernet_interface is not up" | ||
14 | exit 1 | ||
15 | else | ||
16 | echo "PASS: $ethernet_interface is up" | ||
17 | fi | ||
18 | |||
19 | if [ "x$ethernet_ipaddr" != "x" ]; then | ||
20 | $IFCONFIG $ethernet_interface $ethernet_ipaddr | ||
21 | fi | ||
22 | |||
23 | $IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}' | ||
24 | if [ $? -ne 0 ]; then | ||
25 | echo "FAIL: ipaddr of $ethernet_interface setup failed" | ||
26 | exit 1 | ||
27 | else | ||
28 | echo "PASS: ipaddr of $ethernet_interface setup success" | ||
29 | fi | ||
30 | |||
31 | mindatasize=56 | ||
32 | maxdatasize=650 | ||
33 | stepsize=100 | ||
34 | iteration=1 | ||
35 | datasize=$mindatasize | ||
36 | logfile=`/bin/mktemp` | ||
37 | statistics=`/bin/mktemp` | ||
38 | error=0 | ||
39 | |||
40 | trap cleanup SIGHUP SIGINT SIGTERM | ||
41 | |||
42 | clean_tasks() { | ||
43 | echo "Executing clean up tasks" | ||
44 | rm -f $logfile $statistics | ||
45 | } | ||
46 | |||
47 | cleanup() { | ||
48 | echo "Aborting script execution" | ||
49 | clean_tasks | ||
50 | exit 0 | ||
51 | } | ||
52 | |||
53 | echo "start ping test for $ethernet_interface..." | ||
54 | |||
55 | while [ $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 | ||
73 | done | ||
74 | |||
75 | # Report failures | ||
76 | if [ $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 | ||
83 | else | ||
84 | clean_tasks | ||
85 | echo -e "PASS: ping test for $ethernet_interface success\n" | ||
86 | fi | ||
87 | |||
88 | exit 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 | |||
7 | if part_num=`cat /proc/mtd | grep -c 'mtd'`; then | ||
8 | echo "PASS: show $part_num partitions" | ||
9 | else | ||
10 | echo "FAIL: show $part_num partitions" | ||
11 | exit 1 | ||
12 | fi | ||
13 | |||
14 | for((part=0; part<$part_num; part++)); | ||
15 | do | ||
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 | ||
22 | done | ||
23 | |||
24 | READ_TEST=`find / -name mtd_readtest.ko -print` | ||
25 | |||
26 | if [ ! -e $READ_TEST ]; then | ||
27 | echo "FAIL: $READ_TEST does not exist" | ||
28 | exit 1 | ||
29 | else | ||
30 | echo "PASS: $READ_TEST exists" | ||
31 | fi | ||
32 | |||
33 | for((part=0; part<$part_num; part++)); | ||
34 | do | ||
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 | ||
49 | done | ||
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 | |||
4 | if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then | ||
5 | echo "PASS: found $I2C_ADAPTERS i2c adapters" | ||
6 | else | ||
7 | echo "FAIL: no i2c adapters found" | ||
8 | exit 1 | ||
9 | fi | ||
10 | |||
11 | if [ -z "$adapters" ]; then | ||
12 | adapters=0 | ||
13 | fi | ||
14 | |||
15 | while [ $adapters -lt $I2C_ADAPTERS ] | ||
16 | do | ||
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 | ||
25 | done | ||
26 | |||
27 | i2cdetect -y 0 | ||
28 | if [ $? -ne 0 ]; then | ||
29 | echo "FAIL: detect i2c bus 0 fail" | ||
30 | exit 1 | ||
31 | else | ||
32 | echo "PASS: detect i2c bus 0 success" | ||
33 | fi | ||
34 | |||
35 | #i2c bus 0, device address 0x52, DDR3 DIMM Socket 1, SPD EEPROM | ||
36 | i2cdump -f -y 0 0x52 |grep UG51U6400N8SU | ||
37 | if [ $? -ne 0 ]; then | ||
38 | echo "FAIL: read SPD EEPROM on i2c bus 0 fail" | ||
39 | exit 1 | ||
40 | else | ||
41 | echo "PASS: read SPD EEPROM on i2c bus 0 success" | ||
42 | fi | ||
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 | |||
7 | MTD_CHAR_DEVICE="/dev/mtd4" | ||
8 | MTD_BLOCK_DEVICE="/dev/mtdblock4" | ||
9 | |||
10 | if [ ! -e $MTD_CHAR_DEVICE ]; then | ||
11 | echo "FAIL: spi flash device $MTD_CHAR_DEVICE does not exist" | ||
12 | exit 1 | ||
13 | else | ||
14 | echo "PASS: spi flash device $MTD_CHAR_DEVICE exists" | ||
15 | fi | ||
16 | |||
17 | if [ ! -e $MTD_BLOCK_DEVICE ]; then | ||
18 | echo "FAIL: spi flash device $MTD_BLOCK_DEVICE does not exist" | ||
19 | exit 1 | ||
20 | else | ||
21 | echo "PASS: spi flash device $MTD_BLOCK_DEVICE exists" | ||
22 | fi | ||
23 | |||
24 | /usr/sbin/flash_erase -j $MTD_CHAR_DEVICE 0 0 | ||
25 | if [ $? -ne 0 ]; then | ||
26 | echo "FAIL: format spi flash device $MTD_BLOCK_DEVICE fail" | ||
27 | exit 1 | ||
28 | else | ||
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 | ||
45 | fi | ||
46 | |||
47 | echo "PASS: spi bus test passed" | ||
48 | exit 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 | |||
3 | ethernet_interface="eth1" | ||
4 | ethernet_ping_ipaddr="172.21.3.22" | ||
5 | ethernet_ipaddr=$1 | ||
6 | |||
7 | IFCONFIG=`which ifconfig` | ||
8 | |||
9 | $IFCONFIG $ethernet_interface up | ||
10 | $IFCONFIG | grep $ethernet_interface | ||
11 | if [ $? -ne 0 ]; then | ||
12 | echo "FAIL: $ethernet_interface is not up" | ||
13 | exit 1 | ||
14 | else | ||
15 | echo "PASS: $ethernet_interface is up" | ||
16 | fi | ||
17 | |||
18 | if [ "x$ethernet_ipaddr" != "x" ]; then | ||
19 | $IFCONFIG $ethernet_interface $ethernet_ipaddr | ||
20 | fi | ||
21 | |||
22 | $IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}' | ||
23 | if [ $? -ne 0 ]; then | ||
24 | echo "FAIL: ipaddr of $ethernet_interface setup failed" | ||
25 | exit 1 | ||
26 | else | ||
27 | echo "PASS: ipaddr of $ethernet_interface setup success" | ||
28 | fi | ||
29 | |||
30 | mindatasize=56 | ||
31 | maxdatasize=650 | ||
32 | stepsize=100 | ||
33 | iteration=1 | ||
34 | datasize=$mindatasize | ||
35 | logfile=`/bin/mktemp` | ||
36 | statistics=`/bin/mktemp` | ||
37 | error=0 | ||
38 | |||
39 | trap cleanup SIGHUP SIGINT SIGTERM | ||
40 | |||
41 | clean_tasks() { | ||
42 | echo "Executing clean up tasks" | ||
43 | rm -f $logfile $statistics | ||
44 | } | ||
45 | |||
46 | cleanup() { | ||
47 | echo "Aborting script execution" | ||
48 | clean_tasks | ||
49 | exit 0 | ||
50 | } | ||
51 | |||
52 | echo "start ping test for $ethernet_interface..." | ||
53 | |||
54 | while [ $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 | ||
72 | done | ||
73 | |||
74 | # Report failures | ||
75 | if [ $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 | ||
82 | else | ||
83 | clean_tasks | ||
84 | echo -e "PASS: ping test for $ethernet_interface success\n" | ||
85 | fi | ||
86 | |||
87 | echo "PASS: $ethernet_interface test passed" | ||
88 | exit 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 | |||
7 | if part_num=`cat /proc/mtd | grep -c 'mtd'`; then | ||
8 | echo "PASS: show $part_num partitions" | ||
9 | else | ||
10 | echo "FAIL: show $part_num partitions" | ||
11 | fi | ||
12 | |||
13 | for((part=0; part<$part_num-1; part++)); | ||
14 | do | ||
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 | ||
20 | done | ||
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 | |||
3 | if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then | ||
4 | echo "PASS: found $I2C_ADAPTERS i2c adapters" | ||
5 | else | ||
6 | echo "FAIL: no i2c adapters found" | ||
7 | exit 1 | ||
8 | fi | ||
9 | |||
10 | if [ -z "$adapters" ]; then | ||
11 | adapters=0 | ||
12 | fi | ||
13 | |||
14 | while [ $adapters -lt $I2C_ADAPTERS ] | ||
15 | do | ||
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 | ||
24 | done | ||
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 | |||
7 | MTD_CHAR_DEVICE="/dev/mtd4" | ||
8 | MTD_BLOCK_DEVICE="/dev/mtdblock4" | ||
9 | |||
10 | if [ ! -e $MTD_CHAR_DEVICE ]; then | ||
11 | echo "FAIL: spi flash device $MTD_CHAR_DEVICE does not exist" | ||
12 | exit 1 | ||
13 | else | ||
14 | echo "PASS: spi flash device $MTD_CHAR_DEVICE exists" | ||
15 | fi | ||
16 | |||
17 | if [ ! -e $MTD_BLOCK_DEVICE ]; then | ||
18 | echo "FAIL: spi flash device $MTD_BLOCK_DEVICE does not exist" | ||
19 | exit 1 | ||
20 | else | ||
21 | echo "PASS: spi flash device $MTD_BLOCK_DEVICE exists" | ||
22 | fi | ||
23 | |||
24 | /usr/sbin/flash_erase -j $MTD_CHAR_DEVICE 0 0 | ||
25 | if [ $? -ne 0 ]; then | ||
26 | echo "FAIL: format spi flash device $MTD_BLOCK_DEVICE fail" | ||
27 | exit 1 | ||
28 | else | ||
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 | ||
45 | fi | ||
46 | |||
47 | echo "PASS: spi bus test passed" | ||
48 | exit 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 | |||
6 | result=0 | ||
7 | devpath="" | ||
8 | usbinfo="" | ||
9 | |||
10 | usbutils_is_installed=`which lsusb` | ||
11 | if [ -z $usbutils_is_installed ]; then | ||
12 | echo "FAIL: Cannot find lsusb" | ||
13 | exit 1 | ||
14 | fi | ||
15 | |||
16 | usbdev_num=`lsusb | grep -v root\ hub | wc -l` | ||
17 | if [ $usbdev_num -eq 0 ]; then | ||
18 | echo "FAIL: USB device is not connected" | ||
19 | exit 1 | ||
20 | else | ||
21 | echo "$usbdev_num USB device(s) connected" | ||
22 | fi | ||
23 | |||
24 | sd=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'` | ||
25 | if [ -z "$sd" ]; then | ||
26 | echo "FAIL: find sd device" | ||
27 | exit 1 | ||
28 | else | ||
29 | echo "PASS: find sd device" | ||
30 | fi | ||
31 | |||
32 | HDPARM=`which hdparm` | ||
33 | if [ -z $HDPARM ]; then | ||
34 | result=$? | ||
35 | echo "FAIL: find hdparm" | ||
36 | fi | ||
37 | echo "PASS: find hdparm" | ||
38 | |||
39 | for s in $sd | ||
40 | do | ||
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 | ||
99 | done | ||
100 | exit $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 | |||
4 | exit1() { | ||
5 | echo $@ >&2 | ||
6 | exit 1 | ||
7 | } | ||
8 | |||
9 | |||
10 | err() { | ||
11 | echo $@ >&2 | ||
12 | exit_status=1 | ||
13 | } | ||
14 | |||
15 | |||
16 | get_default_gw() { | ||
17 | echo $(route | grep default | awk '{ print $2 }') | ||
18 | } | ||
19 | |||
20 | |||
21 | test_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 | |||
52 | clean_tasks() { | ||
53 | echo "Executing clean up tasks" | ||
54 | rm -f $LOGFILE $STATISTICS | ||
55 | } | ||
56 | |||
57 | |||
58 | cleanup() { | ||
59 | echo "Aborting script execution" | ||
60 | clean_tasks | ||
61 | exit 1 | ||
62 | } | ||
63 | |||
64 | |||
65 | |||
66 | readonly LOGFILE=`/bin/mktemp` | ||
67 | readonly STATISTICS=`/bin/mktemp` | ||
68 | exit_status=0 | ||
69 | |||
70 | trap cleanup SIGHUP SIGINT SIGTERM | ||
71 | |||
72 | |||
73 | |||
74 | readonly DEF_GW=$(get_default_gw) | ||
75 | |||
76 | [ -n "$DEF_GW" ] && echo "Found default gw $DEF_GW" || | ||
77 | exit1 "FAIL: no default gw" | ||
78 | |||
79 | readonly S=: | ||
80 | readonly DEVS="$(route -n | tail -n +3 | sort -k8 -u | awk '{print $8"'$S'"$2}')" | ||
81 | |||
82 | if [ -n "$DEVS" ]; then | ||
83 | echo "Will test: $DEVS" | ||
84 | else | ||
85 | exit1 "FAIL: no ethernet devices to test" | ||
86 | fi | ||
87 | |||
88 | for 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 | ||
98 | done | ||
99 | |||
100 | # Report failures | ||
101 | if [ $exit_status -ne 0 ]; then | ||
102 | echo "=================== error report ===================" | ||
103 | cat $LOGFILE | ||
104 | echo "====================================================" | ||
105 | echo "FAIL: ping test" | ||
106 | else | ||
107 | echo "PASS: ping test success" | ||
108 | fi | ||
109 | |||
110 | clean_tasks | ||
111 | exit $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 | |||
7 | if part_num=`cat /proc/mtd | grep -c 'mtd'`; then | ||
8 | echo "PASS: show $part_num partitions" | ||
9 | else | ||
10 | echo "FAIL: show $part_num partitions" | ||
11 | exit 1 | ||
12 | fi | ||
13 | |||
14 | for((part=0; part<$part_num; part++)); | ||
15 | do | ||
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 | ||
22 | done | ||
23 | |||
24 | READ_TEST=`find / -name mtd_readtest.ko -print` | ||
25 | |||
26 | if [ ! -e $READ_TEST ]; then | ||
27 | echo "FAIL: $READ_TEST does not exist" | ||
28 | exit 1 | ||
29 | else | ||
30 | echo "PASS: $READ_TEST exists" | ||
31 | fi | ||
32 | |||
33 | for((part=0; part<$part_num; part++)); | ||
34 | do | ||
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 | ||
49 | done | ||
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 | |||
4 | if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then | ||
5 | echo "PASS: found $I2C_ADAPTERS i2c adapters" | ||
6 | else | ||
7 | echo "FAIL: no i2c adapters found" | ||
8 | exit 1 | ||
9 | fi | ||
10 | |||
11 | if [ -z "$adapters" ]; then | ||
12 | adapters=0 | ||
13 | fi | ||
14 | |||
15 | while [ $adapters -lt $I2C_ADAPTERS ] | ||
16 | do | ||
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 | ||
25 | done | ||
26 | |||
27 | i2cdetect -y 0 | ||
28 | if [ $? -ne 0 ]; then | ||
29 | echo "FAIL: detect i2c bus 0 fail" | ||
30 | exit 1 | ||
31 | else | ||
32 | echo "PASS: detect i2c bus 0 success" | ||
33 | fi | ||
34 | |||
35 | #i2c bus 0, device address 0x52, DDR3 DIMM Socket 1, SPD EEPROM | ||
36 | i2cdump -f -y 0 0x52 |grep UG51U6400N8SU | ||
37 | if [ $? -ne 0 ]; then | ||
38 | echo "FAIL: read SPD EEPROM on i2c bus 0 fail" | ||
39 | exit 1 | ||
40 | else | ||
41 | echo "PASS: read SPD EEPROM on i2c bus 0 success" | ||
42 | fi | ||
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 | |||
3 | ethernet_interface="eth0" | ||
4 | #sestord02 ip address | ||
5 | ethernet_ping_ipaddr="172.21.3.22" | ||
6 | ethernet_ipaddr=$1 | ||
7 | |||
8 | #Intel Corporation 82574L Gigabit Network Card (intel e1000e) | ||
9 | vendor_id="8086" | ||
10 | product_id="10d3" | ||
11 | |||
12 | #find vendor id & product id | ||
13 | lspci -nn |grep $vendor_id:$product_id | ||
14 | if [ $? -ne 0 ]; then | ||
15 | echo "FAIL: pci-e ethernet card device does not exist" | ||
16 | exit 1 | ||
17 | else | ||
18 | echo "PASS: got pci-e ethernet card device" | ||
19 | fi | ||
20 | |||
21 | setpci -v -d $vendor_id:$product_id latency_timer=b0 | ||
22 | if [ $? -ne 0 ]; then | ||
23 | echo "FAIL: parameter changes to pci config space failed" | ||
24 | exit 1 | ||
25 | else | ||
26 | echo "PASS: parameter changes to pci config space success" | ||
27 | fi | ||
28 | |||
29 | IFCONFIG=`which ifconfig` | ||
30 | |||
31 | $IFCONFIG $ethernet_interface up | ||
32 | $IFCONFIG | grep $ethernet_interface | ||
33 | if [ $? -ne 0 ]; then | ||
34 | echo "FAIL: pci-e ethernet card device $ethernet_interface is not up" | ||
35 | exit 1 | ||
36 | else | ||
37 | echo "PASS: pci-e ethernet card device $ethernet_interface is up" | ||
38 | fi | ||
39 | |||
40 | if [ "x$ethernet_ipaddr" != "x" ]; then | ||
41 | $IFCONFIG $ethernet_interface $ethernet_ipaddr | ||
42 | fi | ||
43 | |||
44 | $IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}' | ||
45 | if [ $? -ne 0 ]; then | ||
46 | echo "FAIL: ipaddr of pci-e ethernet card device $ethernet_interface setup failed" | ||
47 | exit 1 | ||
48 | else | ||
49 | echo "PASS: ipaddr of pci-e ethernet card device $ethernet_interface setup success" | ||
50 | fi | ||
51 | |||
52 | mindatasize=56 | ||
53 | maxdatasize=650 | ||
54 | stepsize=100 | ||
55 | iteration=1 | ||
56 | datasize=$mindatasize | ||
57 | logfile=`/bin/mktemp` | ||
58 | statistics=`/bin/mktemp` | ||
59 | error=0 | ||
60 | |||
61 | trap cleanup SIGHUP SIGINT SIGTERM | ||
62 | |||
63 | clean_tasks() { | ||
64 | echo "Executing clean up tasks" | ||
65 | rm -f $logfile $statistics | ||
66 | } | ||
67 | |||
68 | cleanup() { | ||
69 | echo "Aborting script execution" | ||
70 | clean_tasks | ||
71 | exit 0 | ||
72 | } | ||
73 | |||
74 | echo "start ping test for pci-e ethernet card device $ethernet_interface..." | ||
75 | |||
76 | while [ $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 | ||
94 | done | ||
95 | |||
96 | # Report failures | ||
97 | if [ $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 | ||
104 | else | ||
105 | clean_tasks | ||
106 | echo -e "PASS: ping test for pci-e ethernet card device $ethernet_interface success\n" | ||
107 | fi | ||
108 | |||
109 | exit 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 | # | ||
5 | result=0 | ||
6 | devpath="" | ||
7 | satainfo="" | ||
8 | SD=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'` | ||
9 | if [ -z "$SD" ]; then | ||
10 | echo "FAIL: find sata device" | ||
11 | exit 1 | ||
12 | else | ||
13 | echo "PASS: find sata device" | ||
14 | fi | ||
15 | HDPARM=`which hdparm` | ||
16 | if [ -z $HDPARM ]; then | ||
17 | result=$? | ||
18 | echo "FAIL: find hdparm" | ||
19 | fi | ||
20 | echo "PASS: find hdparm" | ||
21 | |||
22 | |||
23 | for 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 | ||
80 | done | ||
81 | exit $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 | |||
5 | SDHC_DEVICE="/dev/mmcblk0p1" | ||
6 | |||
7 | if [ ! -e $SDHC_DEVICE ]; then | ||
8 | echo "FAIL: $SDHC_DEVICE does not exist" | ||
9 | exit 1 | ||
10 | else | ||
11 | echo "PASS: $SDHC_DEVICE device exists" | ||
12 | fi | ||
13 | |||
14 | mount |grep mmcblk0p1 | ||
15 | if [ $? -eq 0 ]; then | ||
16 | umount $SDHC_DEVICE | ||
17 | fi | ||
18 | |||
19 | /sbin/mkfs.ext2 $SDHC_DEVICE | ||
20 | if [ $? -ne 0 ]; then | ||
21 | echo "FAIL: format $SDHC_DEVICE fail" | ||
22 | exit 1 | ||
23 | else | ||
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 | ||
40 | fi | ||
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 | ||
7 | SENSORS="adt7461-i2c-0-4c" | ||
8 | |||
9 | # Default accepted temperature range | ||
10 | tempmin=20 | ||
11 | tempmax=80 | ||
12 | |||
13 | usage="Usage: $0 min max" | ||
14 | |||
15 | SENSORS_CMD=`which sensors` | ||
16 | if [ -z $SENSORS_CMD ]; then | ||
17 | echo "FAIL: Cannot find sensors command" | ||
18 | exit 1 | ||
19 | fi | ||
20 | |||
21 | if [ -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 | ||
34 | fi | ||
35 | |||
36 | echo "Checking temperature sensor readings (valid range: $tempmin C - $tempmax C)" | ||
37 | |||
38 | for sensor in $SENSORS | ||
39 | do | ||
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 | ||
57 | done | ||
58 | |||
59 | echo "PASS: temperature sensors" | ||
60 | exit 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 | |||
6 | USB_DISK=`ls /dev/sd*[1-9] | sort | tail -n 1` | ||
7 | |||
8 | usbutils_is_installed=`which lsusb` | ||
9 | if [ -z $usbutils_is_installed ]; then | ||
10 | echo "FAIL: Cannot find lsusb" | ||
11 | exit 1 | ||
12 | else | ||
13 | echo "PASS: usbutils found" | ||
14 | fi | ||
15 | |||
16 | usbdev_num=`lsusb | grep -v root\ hub | wc -l` | ||
17 | if [ $usbdev_num -eq 0 ]; then | ||
18 | echo "FAIL: USB device is not connected" | ||
19 | exit 1 | ||
20 | else | ||
21 | echo "PASS: $usbdev_num USB device(s) connected" | ||
22 | fi | ||
23 | |||
24 | lsusb | grep -v root\ hub | ||
25 | mkdir -p /mnt/usb_ehci | ||
26 | mount $USB_DISK /mnt/usb_ehci | ||
27 | if [ $? -ne 0 ]; then | ||
28 | echo "FAIL: Mount USB device failed" | ||
29 | exit 1 | ||
30 | else | ||
31 | echo "PASS: Mount USB device succeed" | ||
32 | fi | ||
33 | |||
34 | echo "Begin test usb device..." | ||
35 | dd if=/dev/urandom of=/mnt/usb_ehci/testfile bs=1M count=50 | ||
36 | if [ $? -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 | ||
42 | fi | ||
43 | |||
44 | echo "PASS: test succeed" | ||
45 | rm -f /mnt/usb_ehci_testfile | ||
46 | umount /mnt/usb_ehci | ||
47 | rm -fr /mnt/usb_ehci | ||
48 | exit 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 | |||
4 | exit1() { | ||
5 | echo $@ >&2 | ||
6 | exit 1 | ||
7 | } | ||
8 | |||
9 | |||
10 | err() { | ||
11 | echo $@ >&2 | ||
12 | exit_status=1 | ||
13 | } | ||
14 | |||
15 | |||
16 | get_default_gw() { | ||
17 | echo $(route | grep default | awk '{ print $2 }') | ||
18 | } | ||
19 | |||
20 | |||
21 | test_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 | |||
52 | clean_tasks() { | ||
53 | echo "Executing clean up tasks" | ||
54 | rm -f $LOGFILE $STATISTICS | ||
55 | } | ||
56 | |||
57 | |||
58 | cleanup() { | ||
59 | echo "Aborting script execution" | ||
60 | clean_tasks | ||
61 | exit 1 | ||
62 | } | ||
63 | |||
64 | |||
65 | |||
66 | readonly LOGFILE=`/bin/mktemp` | ||
67 | readonly STATISTICS=`/bin/mktemp` | ||
68 | exit_status=0 | ||
69 | |||
70 | trap cleanup SIGHUP SIGINT SIGTERM | ||
71 | |||
72 | |||
73 | |||
74 | readonly DEF_GW=$(get_default_gw) | ||
75 | |||
76 | [ -n "$DEF_GW" ] && echo "Found default gw $DEF_GW" || | ||
77 | exit1 "FAIL: no default gw" | ||
78 | |||
79 | readonly S=: | ||
80 | readonly DEVS="$(route -n | tail -n +3 | sort -k8 -u | awk '{print $8"'$S'"$2}')" | ||
81 | |||
82 | if [ -n "$DEVS" ]; then | ||
83 | echo "Will test: $DEVS" | ||
84 | else | ||
85 | exit1 "FAIL: no ethernet devices to test" | ||
86 | fi | ||
87 | |||
88 | for 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 | ||
98 | done | ||
99 | |||
100 | # Report failures | ||
101 | if [ $exit_status -ne 0 ]; then | ||
102 | echo "=================== error report ===================" | ||
103 | cat $LOGFILE | ||
104 | echo "====================================================" | ||
105 | echo "FAIL: ping test" | ||
106 | else | ||
107 | echo "PASS: ping test success" | ||
108 | fi | ||
109 | |||
110 | clean_tasks | ||
111 | exit $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 | |||
5 | if part_num=`cat /proc/mtd | grep -c 'mtd'`; then | ||
6 | echo "PASS: show $part_num partitions" | ||
7 | else | ||
8 | echo "FAIL: show $part_num partitions" | ||
9 | exit 1 | ||
10 | fi | ||
11 | |||
12 | for((part=0; part<$part_num; part++)); | ||
13 | do | ||
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 | ||
20 | done | ||
21 | |||
22 | READ_TEST=`find / -name mtd_readtest.ko -print` | ||
23 | |||
24 | if [ ! -e $READ_TEST ]; then | ||
25 | echo "FAIL: $READ_TEST does not exist" | ||
26 | exit 1 | ||
27 | else | ||
28 | echo "PASS: $READ_TEST exists" | ||
29 | fi | ||
30 | |||
31 | for((part=0; part<$part_num; part++)); | ||
32 | do | ||
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 | ||
47 | done | ||
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 | |||
4 | if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then | ||
5 | echo "PASS: found $I2C_ADAPTERS i2c adapters" | ||
6 | else | ||
7 | echo "FAIL: no i2c adapters found" | ||
8 | exit 1 | ||
9 | fi | ||
10 | |||
11 | if [ -z "$adapters" ]; then | ||
12 | adapters=0 | ||
13 | fi | ||
14 | |||
15 | while [ $adapters -lt $I2C_ADAPTERS ] | ||
16 | do | ||
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 | ||
25 | done | ||
26 | |||
27 | i2cdetect -y 0 | ||
28 | if [ $? -ne 0 ]; then | ||
29 | echo "FAIL: detect i2c bus 0 fail" | ||
30 | exit 1 | ||
31 | else | ||
32 | echo "PASS: detect i2c bus 0 success" | ||
33 | fi | ||
34 | |||
35 | #i2c bus 0, device address 0x51, EEPROM | ||
36 | i2cdump -f -y 0 0x51 | grep DCA1-13112 | ||
37 | if [ $? -ne 0 ]; then | ||
38 | echo "FAIL: read SPD EEPROM on i2c bus 0 fail" | ||
39 | exit 1 | ||
40 | else | ||
41 | echo "PASS: read SPD EEPROM on i2c bus 0 success" | ||
42 | fi | ||
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 | |||
3 | ethernet_interface="eth5" | ||
4 | #sestord02 ip address | ||
5 | ethernet_ping_ipaddr="172.21.3.22" | ||
6 | ethernet_ipaddr=$1 | ||
7 | |||
8 | #Intel Corporation 82574L Gigabit Network Card (intel e1000e) | ||
9 | vendor_id="8086" | ||
10 | product_id="10d3" | ||
11 | |||
12 | #find vendor id & product id | ||
13 | lspci -nn |grep $vendor_id:$product_id | ||
14 | if [ $? -ne 0 ]; then | ||
15 | echo "FAIL: pci-e ethernet card device does not exist" | ||
16 | exit 1 | ||
17 | else | ||
18 | echo "PASS: got pci-e ethernet card device" | ||
19 | fi | ||
20 | |||
21 | setpci -v -d $vendor_id:$product_id latency_timer=b0 | ||
22 | if [ $? -ne 0 ]; then | ||
23 | echo "FAIL: parameter changes to pci config space failed" | ||
24 | exit 1 | ||
25 | else | ||
26 | echo "PASS: parameter changes to pci config space success" | ||
27 | fi | ||
28 | |||
29 | IFCONFIG=`which ifconfig` | ||
30 | |||
31 | $IFCONFIG $ethernet_interface up | ||
32 | $IFCONFIG | grep $ethernet_interface | ||
33 | if [ $? -ne 0 ]; then | ||
34 | echo "FAIL: pci-e ethernet card device $ethernet_interface is not up" | ||
35 | exit 1 | ||
36 | else | ||
37 | echo "PASS: pci-e ethernet card device $ethernet_interface is up" | ||
38 | fi | ||
39 | |||
40 | if [ "x$ethernet_ipaddr" != "x" ]; then | ||
41 | $IFCONFIG $ethernet_interface $ethernet_ipaddr | ||
42 | fi | ||
43 | |||
44 | $IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}' | ||
45 | if [ $? -ne 0 ]; then | ||
46 | echo "FAIL: ipaddr of pci-e ethernet card device $ethernet_interface setup failed" | ||
47 | exit 1 | ||
48 | else | ||
49 | echo "PASS: ipaddr of pci-e ethernet card device $ethernet_interface setup success" | ||
50 | fi | ||
51 | |||
52 | mindatasize=56 | ||
53 | maxdatasize=650 | ||
54 | stepsize=100 | ||
55 | iteration=1 | ||
56 | datasize=$mindatasize | ||
57 | logfile=`/bin/mktemp` | ||
58 | statistics=`/bin/mktemp` | ||
59 | error=0 | ||
60 | |||
61 | trap cleanup SIGHUP SIGINT SIGTERM | ||
62 | |||
63 | clean_tasks() { | ||
64 | echo "Executing clean up tasks" | ||
65 | rm -f $logfile $statistics | ||
66 | } | ||
67 | |||
68 | cleanup() { | ||
69 | echo "Aborting script execution" | ||
70 | clean_tasks | ||
71 | exit 0 | ||
72 | } | ||
73 | |||
74 | echo "start ping test for pci-e ethernet card device $ethernet_interface..." | ||
75 | |||
76 | while [ $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 | ||
94 | done | ||
95 | |||
96 | # Report failures | ||
97 | if [ $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 | ||
104 | else | ||
105 | clean_tasks | ||
106 | echo -e "PASS: ping test for pci-e ethernet card device $ethernet_interface success\n" | ||
107 | fi | ||
108 | |||
109 | exit 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 | # | ||
5 | result=0 | ||
6 | devpath="" | ||
7 | satainfo="" | ||
8 | SD=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'` | ||
9 | if [ -z "$SD" ]; then | ||
10 | echo "FAIL: find sata device" | ||
11 | exit 1 | ||
12 | else | ||
13 | echo "PASS: find sata device" | ||
14 | fi | ||
15 | HDPARM=`which hdparm` | ||
16 | if [ -z $HDPARM ]; then | ||
17 | result=$? | ||
18 | echo "FAIL: find hdparm" | ||
19 | fi | ||
20 | echo "PASS: find hdparm" | ||
21 | |||
22 | |||
23 | for 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 | ||
79 | done | ||
80 | exit $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 | |||
5 | SDHC_DEVICE="/dev/mmcblk0p1" | ||
6 | |||
7 | if [ ! -e $SDHC_DEVICE ]; then | ||
8 | echo "FAIL: $SDHC_DEVICE does not exist" | ||
9 | exit 1 | ||
10 | else | ||
11 | echo "PASS: $SDHC_DEVICE device exists" | ||
12 | fi | ||
13 | |||
14 | mount |grep mmcblk0p1 | ||
15 | if [ $? -eq 0 ]; then | ||
16 | umount $SDHC_DEVICE | ||
17 | fi | ||
18 | |||
19 | /sbin/mkfs.ext2 $SDHC_DEVICE | ||
20 | if [ $? -ne 0 ]; then | ||
21 | echo "FAIL: format $SDHC_DEVICE fail" | ||
22 | exit 1 | ||
23 | else | ||
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 | ||
40 | fi | ||
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 | |||
6 | USB_DISK=`ls /dev/sd*[1-9] | sort | tail -n 1` | ||
7 | |||
8 | usbutils_is_installed=`which lsusb` | ||
9 | if [ -z $usbutils_is_installed ]; then | ||
10 | echo "FAIL: Cannot find lsusb" | ||
11 | exit 1 | ||
12 | else | ||
13 | echo "PASS: usbutils found" | ||
14 | fi | ||
15 | |||
16 | usbdev_num=`lsusb | grep -v root\ hub | wc -l` | ||
17 | if [ $usbdev_num -eq 0 ]; then | ||
18 | echo "FAIL: USB device is not connected" | ||
19 | exit 1 | ||
20 | else | ||
21 | echo "PASS: $usbdev_num USB device(s) connected" | ||
22 | fi | ||
23 | |||
24 | lsusb | grep -v root\ hub | ||
25 | mkdir -p /mnt/usb_ehci | ||
26 | mount $USB_DISK /mnt/usb_ehci | ||
27 | if [ $? -ne 0 ]; then | ||
28 | echo "FAIL: Mount USB device failed" | ||
29 | exit 1 | ||
30 | else | ||
31 | echo "PASS: Mount USB device succeed" | ||
32 | fi | ||
33 | |||
34 | echo "Begin test usb device..." | ||
35 | dd if=/dev/urandom of=/mnt/usb_ehci/testfile bs=1M count=50 | ||
36 | if [ $? -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 | ||
42 | fi | ||
43 | |||
44 | echo "PASS: test succeed" | ||
45 | rm -f /mnt/usb_ehci_testfile | ||
46 | umount /mnt/usb_ehci | ||
47 | rm -fr /mnt/usb_ehci | ||
48 | exit 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 | |||
3 | ethernet_interface="eth1" | ||
4 | ethernet_ping_ipaddr="172.21.3.22" | ||
5 | ethernet_ipaddr=$1 | ||
6 | |||
7 | IFCONFIG=`which ifconfig` | ||
8 | |||
9 | $IFCONFIG $ethernet_interface up | ||
10 | $IFCONFIG | grep $ethernet_interface | ||
11 | if [ $? -ne 0 ]; then | ||
12 | echo "FAIL: $ethernet_interface is not up" | ||
13 | exit 1 | ||
14 | else | ||
15 | echo "PASS: $ethernet_interface is up" | ||
16 | fi | ||
17 | |||
18 | if [ "x$ethernet_ipaddr" != "x" ]; then | ||
19 | $IFCONFIG $ethernet_interface $ethernet_ipaddr | ||
20 | fi | ||
21 | |||
22 | $IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}' | ||
23 | if [ $? -ne 0 ]; then | ||
24 | echo "FAIL: ipaddr of $ethernet_interface setup failed" | ||
25 | exit 1 | ||
26 | else | ||
27 | echo "PASS: ipaddr of $ethernet_interface setup success" | ||
28 | fi | ||
29 | |||
30 | mindatasize=56 | ||
31 | maxdatasize=650 | ||
32 | stepsize=100 | ||
33 | iteration=1 | ||
34 | datasize=$mindatasize | ||
35 | logfile=`/bin/mktemp` | ||
36 | statistics=`/bin/mktemp` | ||
37 | error=0 | ||
38 | |||
39 | trap cleanup SIGHUP SIGINT SIGTERM | ||
40 | |||
41 | clean_tasks() { | ||
42 | echo "Executing clean up tasks" | ||
43 | rm -f $logfile $statistics | ||
44 | } | ||
45 | |||
46 | cleanup() { | ||
47 | echo "Aborting script execution" | ||
48 | clean_tasks | ||
49 | exit 0 | ||
50 | } | ||
51 | |||
52 | echo "start ping test for $ethernet_interface..." | ||
53 | |||
54 | while [ $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 | ||
72 | done | ||
73 | |||
74 | # Report failures | ||
75 | if [ $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 | ||
82 | else | ||
83 | clean_tasks | ||
84 | echo -e "PASS: ping test for $ethernet_interface success\n" | ||
85 | fi | ||
86 | |||
87 | echo "PASS: $ethernet_interface test passed" | ||
88 | exit 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 | |||
7 | if part_num=`cat /proc/mtd | grep -c 'mtd'`; then | ||
8 | echo "PASS: show $part_num partitions" | ||
9 | else | ||
10 | echo "FAIL: show $part_num partitions" | ||
11 | fi | ||
12 | |||
13 | for((part=0; part<$part_num-1; part++)); | ||
14 | do | ||
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 | ||
20 | done | ||
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 | |||
3 | if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then | ||
4 | echo "PASS: found $I2C_ADAPTERS i2c adapters" | ||
5 | else | ||
6 | echo "FAIL: no i2c adapters found" | ||
7 | exit 1 | ||
8 | fi | ||
9 | |||
10 | if [ -z "$adapters" ]; then | ||
11 | adapters=0 | ||
12 | fi | ||
13 | |||
14 | while [ $adapters -lt $I2C_ADAPTERS ] | ||
15 | do | ||
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 | ||
24 | done | ||
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 | |||
3 | RTC_DEVICE="/dev/rtc" | ||
4 | |||
5 | if [ ! -e $RTC_DEVICE ]; then | ||
6 | echo "FAIL: rtc device does not exist" | ||
7 | exit 1 | ||
8 | else | ||
9 | echo "PASS: rtc device exists" | ||
10 | fi | ||
11 | |||
12 | /sbin/hwclock -f $RTC_DEVICE | ||
13 | if [ $? -ne 0 ]; then | ||
14 | echo "FAIL: rtc device open failed" | ||
15 | exit 1 | ||
16 | else | ||
17 | echo "PASS: rtc device open success" | ||
18 | fi | ||
19 | |||
20 | |||
21 | /sbin/hwclock --systohc | ||
22 | if [ $? -ne 0 ]; then | ||
23 | echo "FAIL: sync system clock and hardware clock failed" | ||
24 | exit 1 | ||
25 | else | ||
26 | echo "PASS: sync system clock and hardware clock success" | ||
27 | fi | ||
28 | |||
29 | RTC_TIME=$(/sbin/hwclock -r |awk '{print $4}') | ||
30 | echo $RTC_TIME | ||
31 | SYS_TIME=$(date +%m/%d/%Y-%X |awk '{print $1}' |awk -F- '{print $2}') | ||
32 | echo $SYS_TIME | ||
33 | |||
34 | if [ "$RTC_TIME" = "$SYS_TIME" ] ; then | ||
35 | echo "PASS: system time same with hardware time" | ||
36 | else | ||
37 | echo "FAIL: system time different with hardware time" | ||
38 | exit 1 | ||
39 | fi | ||
40 | |||
41 | echo "PASS: rtc test successful" | ||
42 | exit 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 | |||
5 | SDHC_DEVICE="/dev/mmcblk0" | ||
6 | SDHC_DEVICE_PART="/dev/mmcblk0p1" | ||
7 | SFDISK=`which sfdisk` | ||
8 | |||
9 | if [ -e $SDHC_DEVICE ]; then | ||
10 | echo "PASS: $SDHC_DEVICE device exists" | ||
11 | else | ||
12 | echo "FAIL: $SDHC_DEVICE does not exist" | ||
13 | exit 1 | ||
14 | fi | ||
15 | |||
16 | if [ -e $SDHC_DEVICE_PART ]; then | ||
17 | echo "PASS: $SDHC_DEVICE_PART device exists" | ||
18 | elif [ ! -z $SFDISK ]; then | ||
19 | |||
20 | echo "Try to create a partition" | ||
21 | |||
22 | $SFDISK $SDHC_DEVICE << EOF | ||
23 | ,,L | ||
24 | EOF | ||
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 | |||
33 | else | ||
34 | echo "FAIL: $SDHC_DEVICE_PART does not exist" | ||
35 | exit 1 | ||
36 | fi | ||
37 | |||
38 | mount |grep mmcblk0p1 | ||
39 | if [ $? -eq 0 ]; then | ||
40 | umount $SDHC_DEVICE_PART | ||
41 | fi | ||
42 | |||
43 | /sbin/mkfs.ext2 $SDHC_DEVICE_PART | ||
44 | if [ $? -ne 0 ]; then | ||
45 | echo "FAIL: format $SDHC_DEVICE_PART fail" | ||
46 | exit 1 | ||
47 | else | ||
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 | ||
64 | fi | ||
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 | |||
7 | MTD_CHAR_DEVICE="/dev/mtd4" | ||
8 | MTD_BLOCK_DEVICE="/dev/mtdblock4" | ||
9 | |||
10 | if [ ! -e $MTD_CHAR_DEVICE ]; then | ||
11 | echo "FAIL: spi flash device $MTD_CHAR_DEVICE does not exist" | ||
12 | exit 1 | ||
13 | else | ||
14 | echo "PASS: spi flash device $MTD_CHAR_DEVICE exists" | ||
15 | fi | ||
16 | |||
17 | if [ ! -e $MTD_BLOCK_DEVICE ]; then | ||
18 | echo "FAIL: spi flash device $MTD_BLOCK_DEVICE does not exist" | ||
19 | exit 1 | ||
20 | else | ||
21 | echo "PASS: spi flash device $MTD_BLOCK_DEVICE exists" | ||
22 | fi | ||
23 | |||
24 | /usr/sbin/flash_erase -j $MTD_CHAR_DEVICE 0 0 | ||
25 | if [ $? -ne 0 ]; then | ||
26 | echo "FAIL: format spi flash device $MTD_BLOCK_DEVICE fail" | ||
27 | exit 1 | ||
28 | else | ||
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 | ||
45 | fi | ||
46 | |||
47 | echo "PASS: spi bus test passed" | ||
48 | exit 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 | |||
6 | result=0 | ||
7 | devpath="" | ||
8 | usbinfo="" | ||
9 | |||
10 | usbutils_is_installed=`which lsusb` | ||
11 | if [ -z $usbutils_is_installed ]; then | ||
12 | echo "FAIL: Cannot find lsusb" | ||
13 | exit 1 | ||
14 | fi | ||
15 | |||
16 | usbdev_num=`lsusb | grep -v root\ hub | wc -l` | ||
17 | if [ $usbdev_num -eq 0 ]; then | ||
18 | echo "FAIL: USB device is not connected" | ||
19 | exit 1 | ||
20 | else | ||
21 | echo "$usbdev_num USB device(s) connected" | ||
22 | fi | ||
23 | |||
24 | sd=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'` | ||
25 | if [ -z "$sd" ]; then | ||
26 | echo "FAIL: find sd device" | ||
27 | exit 1 | ||
28 | else | ||
29 | echo "PASS: find sd device" | ||
30 | fi | ||
31 | |||
32 | HDPARM=`which hdparm` | ||
33 | if [ -z $HDPARM ]; then | ||
34 | result=$? | ||
35 | echo "FAIL: find hdparm" | ||
36 | fi | ||
37 | echo "PASS: find hdparm" | ||
38 | |||
39 | for s in $sd | ||
40 | do | ||
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 | ||
99 | done | ||
100 | exit $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 | |||
3 | ethernet_interface="eth1" | ||
4 | ethernet_ping_ipaddr="172.21.3.22" | ||
5 | ethernet_ipaddr=$1 | ||
6 | |||
7 | IFCONFIG=`which ifconfig` | ||
8 | |||
9 | $IFCONFIG $ethernet_interface up | ||
10 | $IFCONFIG | grep $ethernet_interface | ||
11 | if [ $? -ne 0 ]; then | ||
12 | echo "FAIL: $ethernet_interface is not up" | ||
13 | exit 1 | ||
14 | else | ||
15 | echo "PASS: $ethernet_interface is up" | ||
16 | fi | ||
17 | |||
18 | if [ "x$ethernet_ipaddr" != "x" ]; then | ||
19 | $IFCONFIG $ethernet_interface $ethernet_ipaddr | ||
20 | fi | ||
21 | |||
22 | $IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}' | ||
23 | if [ $? -ne 0 ]; then | ||
24 | echo "FAIL: ipaddr of $ethernet_interface setup failed" | ||
25 | exit 1 | ||
26 | else | ||
27 | echo "PASS: ipaddr of $ethernet_interface setup success" | ||
28 | fi | ||
29 | |||
30 | mindatasize=56 | ||
31 | maxdatasize=650 | ||
32 | stepsize=100 | ||
33 | iteration=1 | ||
34 | datasize=$mindatasize | ||
35 | logfile=`/bin/mktemp` | ||
36 | statistics=`/bin/mktemp` | ||
37 | error=0 | ||
38 | |||
39 | trap cleanup SIGHUP SIGINT SIGTERM | ||
40 | |||
41 | clean_tasks() { | ||
42 | echo "Executing clean up tasks" | ||
43 | rm -f $logfile $statistics | ||
44 | } | ||
45 | |||
46 | cleanup() { | ||
47 | echo "Aborting script execution" | ||
48 | clean_tasks | ||
49 | exit 0 | ||
50 | } | ||
51 | |||
52 | echo "start ping test for $ethernet_interface..." | ||
53 | |||
54 | while [ $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 | ||
72 | done | ||
73 | |||
74 | # Report failures | ||
75 | if [ $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 | ||
82 | else | ||
83 | clean_tasks | ||
84 | echo -e "PASS: ping test for $ethernet_interface success\n" | ||
85 | fi | ||
86 | |||
87 | echo "PASS: $ethernet_interface test passed" | ||
88 | exit 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 | |||
3 | if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then | ||
4 | echo "PASS: found $I2C_ADAPTERS i2c adapters" | ||
5 | else | ||
6 | echo "FAIL: no i2c adapters found" | ||
7 | exit 1 | ||
8 | fi | ||
9 | |||
10 | if [ -z "$adapters" ]; then | ||
11 | adapters=0 | ||
12 | fi | ||
13 | |||
14 | while [ $adapters -lt $I2C_ADAPTERS ] | ||
15 | do | ||
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 | ||
24 | done | ||
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 | |||
3 | RTC_DEVICE="/dev/rtc" | ||
4 | |||
5 | if [ ! -e $RTC_DEVICE ]; then | ||
6 | echo "FAIL: rtc device does not exist" | ||
7 | exit 1 | ||
8 | else | ||
9 | echo "PASS: rtc device exists" | ||
10 | fi | ||
11 | |||
12 | /sbin/hwclock -f $RTC_DEVICE | ||
13 | if [ $? -ne 0 ]; then | ||
14 | echo "FAIL: rtc device open failed" | ||
15 | exit 1 | ||
16 | else | ||
17 | echo "PASS: rtc device open success" | ||
18 | fi | ||
19 | |||
20 | |||
21 | /sbin/hwclock --systohc | ||
22 | if [ $? -ne 0 ]; then | ||
23 | echo "FAIL: sync system clock and hardware clock failed" | ||
24 | exit 1 | ||
25 | else | ||
26 | echo "PASS: sync system clock and hardware clock success" | ||
27 | fi | ||
28 | |||
29 | RTC_TIME=$(/sbin/hwclock -r |awk '{print $4}') | ||
30 | echo $RTC_TIME | ||
31 | SYS_TIME=$(date +%m/%d/%Y-%X |awk '{print $1}' |awk -F- '{print $2}') | ||
32 | echo $SYS_TIME | ||
33 | |||
34 | if [ "$RTC_TIME" = "$SYS_TIME" ] ; then | ||
35 | echo "PASS: system time same with hardware time" | ||
36 | else | ||
37 | echo "FAIL: system time different with hardware time" | ||
38 | exit 1 | ||
39 | fi | ||
40 | |||
41 | echo "PASS: rtc test successful" | ||
42 | exit 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 | |||
5 | SDHC_DEVICE="/dev/mmcblk0" | ||
6 | SDHC_DEVICE_PART="/dev/mmcblk0p1" | ||
7 | SFDISK=`which sfdisk` | ||
8 | |||
9 | if [ -e $SDHC_DEVICE ]; then | ||
10 | echo "PASS: $SDHC_DEVICE device exists" | ||
11 | else | ||
12 | echo "FAIL: $SDHC_DEVICE does not exist" | ||
13 | exit 1 | ||
14 | fi | ||
15 | |||
16 | if [ -e $SDHC_DEVICE_PART ]; then | ||
17 | echo "PASS: $SDHC_DEVICE_PART device exists" | ||
18 | elif [ ! -z $SFDISK ]; then | ||
19 | |||
20 | echo "Try to create a partition" | ||
21 | |||
22 | $SFDISK $SDHC_DEVICE << EOF | ||
23 | ,,L | ||
24 | EOF | ||
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 | |||
33 | else | ||
34 | echo "FAIL: $SDHC_DEVICE_PART does not exist" | ||
35 | exit 1 | ||
36 | fi | ||
37 | |||
38 | mount |grep mmcblk0p1 | ||
39 | if [ $? -eq 0 ]; then | ||
40 | umount $SDHC_DEVICE_PART | ||
41 | fi | ||
42 | |||
43 | /sbin/mkfs.ext2 $SDHC_DEVICE_PART | ||
44 | if [ $? -ne 0 ]; then | ||
45 | echo "FAIL: format $SDHC_DEVICE_PART fail" | ||
46 | exit 1 | ||
47 | else | ||
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 | ||
64 | fi | ||
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 | |||
6 | result=0 | ||
7 | devpath="" | ||
8 | usbinfo="" | ||
9 | |||
10 | usbutils_is_installed=`which lsusb` | ||
11 | if [ -z $usbutils_is_installed ]; then | ||
12 | echo "FAIL: Cannot find lsusb" | ||
13 | exit 1 | ||
14 | fi | ||
15 | |||
16 | usbdev_num=`lsusb | grep -v root\ hub | wc -l` | ||
17 | if [ $usbdev_num -eq 0 ]; then | ||
18 | echo "FAIL: USB device is not connected" | ||
19 | exit 1 | ||
20 | else | ||
21 | echo "$usbdev_num USB device(s) connected" | ||
22 | fi | ||
23 | |||
24 | sd=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'` | ||
25 | if [ -z "$sd" ]; then | ||
26 | echo "FAIL: find sd device" | ||
27 | exit 1 | ||
28 | else | ||
29 | echo "PASS: find sd device" | ||
30 | fi | ||
31 | |||
32 | HDPARM=`which hdparm` | ||
33 | if [ -z $HDPARM ]; then | ||
34 | result=$? | ||
35 | echo "FAIL: find hdparm" | ||
36 | fi | ||
37 | echo "PASS: find hdparm" | ||
38 | |||
39 | for s in $sd | ||
40 | do | ||
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 | ||
99 | done | ||
100 | exit $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 | |||
3 | ethernet_interface="eth1" | ||
4 | ethernet_ping_ipaddr="172.21.3.22" | ||
5 | ethernet_ipaddr=$1 | ||
6 | |||
7 | IFCONFIG=`which ifconfig` | ||
8 | |||
9 | $IFCONFIG $ethernet_interface up | ||
10 | $IFCONFIG | grep $ethernet_interface | ||
11 | if [ $? -ne 0 ]; then | ||
12 | echo "FAIL: $ethernet_interface is not up" | ||
13 | exit 1 | ||
14 | else | ||
15 | echo "PASS: $ethernet_interface is up" | ||
16 | fi | ||
17 | |||
18 | if [ "x$ethernet_ipaddr" != "x" ]; then | ||
19 | $IFCONFIG $ethernet_interface $ethernet_ipaddr | ||
20 | fi | ||
21 | |||
22 | $IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}' | ||
23 | if [ $? -ne 0 ]; then | ||
24 | echo "FAIL: ipaddr of $ethernet_interface setup failed" | ||
25 | exit 1 | ||
26 | else | ||
27 | echo "PASS: ipaddr of $ethernet_interface setup success" | ||
28 | fi | ||
29 | |||
30 | mindatasize=56 | ||
31 | maxdatasize=650 | ||
32 | stepsize=100 | ||
33 | iteration=1 | ||
34 | datasize=$mindatasize | ||
35 | logfile=`/bin/mktemp` | ||
36 | statistics=`/bin/mktemp` | ||
37 | error=0 | ||
38 | |||
39 | trap cleanup SIGHUP SIGINT SIGTERM | ||
40 | |||
41 | clean_tasks() { | ||
42 | echo "Executing clean up tasks" | ||
43 | rm -f $logfile $statistics | ||
44 | } | ||
45 | |||
46 | cleanup() { | ||
47 | echo "Aborting script execution" | ||
48 | clean_tasks | ||
49 | exit 0 | ||
50 | } | ||
51 | |||
52 | echo "start ping test for $ethernet_interface..." | ||
53 | |||
54 | while [ $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 | ||
72 | done | ||
73 | |||
74 | # Report failures | ||
75 | if [ $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 | ||
82 | else | ||
83 | clean_tasks | ||
84 | echo -e "PASS: ping test for $ethernet_interface success\n" | ||
85 | fi | ||
86 | |||
87 | echo "PASS: $ethernet_interface test passed" | ||
88 | exit 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 | |||
3 | if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then | ||
4 | echo "PASS: found $I2C_ADAPTERS i2c adapters" | ||
5 | else | ||
6 | echo "FAIL: no i2c adapters found" | ||
7 | exit 1 | ||
8 | fi | ||
9 | |||
10 | if [ -z "$adapters" ]; then | ||
11 | adapters=0 | ||
12 | fi | ||
13 | |||
14 | while [ $adapters -lt $I2C_ADAPTERS ] | ||
15 | do | ||
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 | ||
24 | done | ||
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 | # | ||
5 | result=0 | ||
6 | devpath="" | ||
7 | satainfo="" | ||
8 | SD=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'` | ||
9 | if [ -z "$SD" ]; then | ||
10 | echo "FAIL: find sata device" | ||
11 | exit 1 | ||
12 | else | ||
13 | echo "PASS: find sata device" | ||
14 | fi | ||
15 | HDPARM=`which hdparm` | ||
16 | if [ -z $HDPARM ]; then | ||
17 | result=$? | ||
18 | echo "FAIL: find hdparm" | ||
19 | fi | ||
20 | echo "PASS: find hdparm" | ||
21 | |||
22 | |||
23 | for 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 | ||
80 | done | ||
81 | exit $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 | |||
3 | ethernet_interface="eth1" | ||
4 | ethernet_ping_ipaddr="172.21.3.22" | ||
5 | ethernet_ipaddr=$1 | ||
6 | |||
7 | IFCONFIG=`which ifconfig` | ||
8 | |||
9 | $IFCONFIG $ethernet_interface up | ||
10 | $IFCONFIG | grep $ethernet_interface | ||
11 | if [ $? -ne 0 ]; then | ||
12 | echo "FAIL: $ethernet_interface is not up" | ||
13 | exit 1 | ||
14 | else | ||
15 | echo "PASS: $ethernet_interface is up" | ||
16 | fi | ||
17 | |||
18 | if [ "x$ethernet_ipaddr" != "x" ]; then | ||
19 | $IFCONFIG $ethernet_interface $ethernet_ipaddr | ||
20 | fi | ||
21 | |||
22 | $IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}' | ||
23 | if [ $? -ne 0 ]; then | ||
24 | echo "FAIL: ipaddr of $ethernet_interface setup failed" | ||
25 | exit 1 | ||
26 | else | ||
27 | echo "PASS: ipaddr of $ethernet_interface setup success" | ||
28 | fi | ||
29 | |||
30 | mindatasize=56 | ||
31 | maxdatasize=650 | ||
32 | stepsize=100 | ||
33 | iteration=1 | ||
34 | datasize=$mindatasize | ||
35 | logfile=`/bin/mktemp` | ||
36 | statistics=`/bin/mktemp` | ||
37 | error=0 | ||
38 | |||
39 | trap cleanup SIGHUP SIGINT SIGTERM | ||
40 | |||
41 | clean_tasks() { | ||
42 | echo "Executing clean up tasks" | ||
43 | rm -f $logfile $statistics | ||
44 | } | ||
45 | |||
46 | cleanup() { | ||
47 | echo "Aborting script execution" | ||
48 | clean_tasks | ||
49 | exit 0 | ||
50 | } | ||
51 | |||
52 | echo "start ping test for $ethernet_interface..." | ||
53 | |||
54 | while [ $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 | ||
72 | done | ||
73 | |||
74 | # Report failures | ||
75 | if [ $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 | ||
82 | else | ||
83 | clean_tasks | ||
84 | echo -e "PASS: ping test for $ethernet_interface success\n" | ||
85 | fi | ||
86 | |||
87 | echo "PASS: $ethernet_interface test passed" | ||
88 | exit 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 | |||
3 | RTC_DEVICE="/dev/rtc" | ||
4 | |||
5 | if [ ! -e $RTC_DEVICE ]; then | ||
6 | echo "FAIL: rtc device does not exist" | ||
7 | exit 1 | ||
8 | else | ||
9 | echo "PASS: rtc device exists" | ||
10 | fi | ||
11 | |||
12 | /sbin/hwclock -f $RTC_DEVICE | ||
13 | if [ $? -ne 0 ]; then | ||
14 | echo "FAIL: rtc device open failed" | ||
15 | exit 1 | ||
16 | else | ||
17 | echo "PASS: rtc device open success" | ||
18 | fi | ||
19 | |||
20 | |||
21 | /sbin/hwclock --systohc | ||
22 | if [ $? -ne 0 ]; then | ||
23 | echo "FAIL: sync system clock and hardware clock failed" | ||
24 | exit 1 | ||
25 | else | ||
26 | echo "PASS: sync system clock and hardware clock success" | ||
27 | fi | ||
28 | |||
29 | RTC_TIME=$(/sbin/hwclock -r |awk '{print $4}') | ||
30 | echo $RTC_TIME | ||
31 | SYS_TIME=$(date +%m/%d/%Y-%X |awk '{print $1}' |awk -F- '{print $2}') | ||
32 | echo $SYS_TIME | ||
33 | |||
34 | if [ "$RTC_TIME" = "$SYS_TIME" ] ; then | ||
35 | echo "PASS: system time same with hardware time" | ||
36 | else | ||
37 | echo "FAIL: system time different with hardware time" | ||
38 | exit 1 | ||
39 | fi | ||
40 | |||
41 | echo "PASS: rtc test successful" | ||
42 | exit 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 | # | ||
5 | result=0 | ||
6 | devpath="" | ||
7 | satainfo="" | ||
8 | SD=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'` | ||
9 | if [ -z "$SD" ]; then | ||
10 | echo "FAIL: find sata device" | ||
11 | exit 1 | ||
12 | else | ||
13 | echo "PASS: find sata device" | ||
14 | fi | ||
15 | HDPARM=`which hdparm` | ||
16 | if [ -z $HDPARM ]; then | ||
17 | result=$? | ||
18 | echo "FAIL: find hdparm" | ||
19 | fi | ||
20 | echo "PASS: find hdparm" | ||
21 | |||
22 | |||
23 | for 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 | ||
80 | done | ||
81 | exit $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 | |||
6 | result=0 | ||
7 | devpath="" | ||
8 | usbinfo="" | ||
9 | |||
10 | usbutils_is_installed=`which lsusb` | ||
11 | if [ -z $usbutils_is_installed ]; then | ||
12 | echo "FAIL: Cannot find lsusb" | ||
13 | exit 1 | ||
14 | fi | ||
15 | |||
16 | usbdev_num=`lsusb | grep -v root\ hub | wc -l` | ||
17 | if [ $usbdev_num -eq 0 ]; then | ||
18 | echo "FAIL: USB device is not connected" | ||
19 | exit 1 | ||
20 | else | ||
21 | echo "$usbdev_num USB device(s) connected" | ||
22 | fi | ||
23 | |||
24 | sd=`ls -l /dev/sd[^0-9] | awk '{print $5 $6 "," $10}'` | ||
25 | if [ -z "$sd" ]; then | ||
26 | echo "FAIL: find sd device" | ||
27 | exit 1 | ||
28 | else | ||
29 | echo "PASS: find sd device" | ||
30 | fi | ||
31 | |||
32 | HDPARM=`which hdparm` | ||
33 | if [ -z $HDPARM ]; then | ||
34 | result=$? | ||
35 | echo "FAIL: find hdparm" | ||
36 | fi | ||
37 | echo "PASS: find hdparm" | ||
38 | |||
39 | for s in $sd | ||
40 | do | ||
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 | ||
99 | done | ||
100 | exit $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 | |||
3 | ethernet_interface="eth1" | ||
4 | ethernet_ping_ipaddr="172.21.3.22" | ||
5 | ethernet_ipaddr=$1 | ||
6 | |||
7 | IFCONFIG=`which ifconfig` | ||
8 | |||
9 | $IFCONFIG $ethernet_interface up | ||
10 | $IFCONFIG | grep $ethernet_interface | ||
11 | if [ $? -ne 0 ]; then | ||
12 | echo "FAIL: $ethernet_interface is not up" | ||
13 | exit 1 | ||
14 | else | ||
15 | echo "PASS: $ethernet_interface is up" | ||
16 | fi | ||
17 | |||
18 | if [ "x$ethernet_ipaddr" != "x" ]; then | ||
19 | $IFCONFIG $ethernet_interface $ethernet_ipaddr | ||
20 | fi | ||
21 | |||
22 | $IFCONFIG $ethernet_interface |grep 'inet addr:' |sed -e 's@inet addr:@@' |sed q | awk '{print $1}' | ||
23 | if [ $? -ne 0 ]; then | ||
24 | echo "FAIL: ipaddr of $ethernet_interface setup failed" | ||
25 | exit 1 | ||
26 | else | ||
27 | echo "PASS: ipaddr of $ethernet_interface setup success" | ||
28 | fi | ||
29 | |||
30 | mindatasize=56 | ||
31 | maxdatasize=650 | ||
32 | stepsize=100 | ||
33 | iteration=1 | ||
34 | datasize=$mindatasize | ||
35 | logfile=`/bin/mktemp` | ||
36 | statistics=`/bin/mktemp` | ||
37 | error=0 | ||
38 | |||
39 | trap cleanup SIGHUP SIGINT SIGTERM | ||
40 | |||
41 | clean_tasks() { | ||
42 | echo "Executing clean up tasks" | ||
43 | rm -f $logfile $statistics | ||
44 | } | ||
45 | |||
46 | cleanup() { | ||
47 | echo "Aborting script execution" | ||
48 | clean_tasks | ||
49 | exit 0 | ||
50 | } | ||
51 | |||
52 | echo "start ping test for $ethernet_interface..." | ||
53 | |||
54 | while [ $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 | ||
72 | done | ||
73 | |||
74 | # Report failures | ||
75 | if [ $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 | ||
82 | else | ||
83 | clean_tasks | ||
84 | echo -e "PASS: ping test for $ethernet_interface success\n" | ||
85 | fi | ||
86 | |||
87 | echo "PASS: $ethernet_interface test passed" | ||
88 | exit 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 | |||
7 | if part_num=`cat /proc/mtd | grep -c 'mtd'`; then | ||
8 | echo "PASS: show $part_num partitions" | ||
9 | else | ||
10 | echo "FAIL: show $part_num partitions" | ||
11 | fi | ||
12 | |||
13 | for((part=0; part<$part_num-1; part++)); | ||
14 | do | ||
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 | ||
20 | done | ||
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 | |||
3 | if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then | ||
4 | echo "PASS: found $I2C_ADAPTERS i2c adapters" | ||
5 | else | ||
6 | echo "FAIL: no i2c adapters found" | ||
7 | exit 1 | ||
8 | fi | ||
9 | |||
10 | if [ -z "$adapters" ]; then | ||
11 | adapters=0 | ||
12 | fi | ||
13 | |||
14 | while [ $adapters -lt $I2C_ADAPTERS ] | ||
15 | do | ||
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 | ||
24 | done | ||
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 | |||
3 | RTC_DEVICE="/dev/rtc" | ||
4 | |||
5 | if [ ! -e $RTC_DEVICE ]; then | ||
6 | echo "FAIL: rtc device does not exist" | ||
7 | exit 1 | ||
8 | else | ||
9 | echo "PASS: rtc device exists" | ||
10 | fi | ||
11 | |||
12 | /sbin/hwclock -f $RTC_DEVICE | ||
13 | if [ $? -ne 0 ]; then | ||
14 | echo "FAIL: rtc device open failed" | ||
15 | exit 1 | ||
16 | else | ||
17 | echo "PASS: rtc device open success" | ||
18 | fi | ||
19 | |||
20 | |||
21 | /sbin/hwclock --systohc | ||
22 | if [ $? -ne 0 ]; then | ||
23 | echo "FAIL: sync system clock and hardware clock failed" | ||
24 | exit 1 | ||
25 | else | ||
26 | echo "PASS: sync system clock and hardware clock success" | ||
27 | fi | ||
28 | |||
29 | RTC_TIME=$(/sbin/hwclock -r |awk '{print $4}') | ||
30 | echo $RTC_TIME | ||
31 | SYS_TIME=$(date +%m/%d/%Y-%X |awk '{print $1}' |awk -F- '{print $2}') | ||
32 | echo $SYS_TIME | ||
33 | |||
34 | if [ "$RTC_TIME" = "$SYS_TIME" ] ; then | ||
35 | echo "PASS: system time same with hardware time" | ||
36 | else | ||
37 | echo "FAIL: system time different with hardware time" | ||
38 | exit 1 | ||
39 | fi | ||
40 | |||
41 | echo "PASS: rtc test successful" | ||
42 | exit 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 | |||
5 | SDHC_DEVICE="/dev/mmcblk0" | ||
6 | SDHC_DEVICE_PART="/dev/mmcblk0p1" | ||
7 | SFDISK=`which sfdisk` | ||
8 | |||
9 | if [ -e $SDHC_DEVICE ]; then | ||
10 | echo "PASS: $SDHC_DEVICE device exists" | ||
11 | else | ||
12 | echo "FAIL: $SDHC_DEVICE does not exist" | ||
13 | exit 1 | ||
14 | fi | ||
15 | |||
16 | if [ -e $SDHC_DEVICE_PART ]; then | ||
17 | echo "PASS: $SDHC_DEVICE_PART device exists" | ||
18 | elif [ ! -z $SFDISK ]; then | ||
19 | |||
20 | echo "Try to create a partition" | ||
21 | |||
22 | $SFDISK $SDHC_DEVICE << EOF | ||
23 | ,,L | ||
24 | EOF | ||
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 | |||
33 | else | ||
34 | echo "FAIL: $SDHC_DEVICE_PART does not exist" | ||
35 | exit 1 | ||
36 | fi | ||
37 | |||
38 | mount |grep mmcblk0p1 | ||
39 | if [ $? -eq 0 ]; then | ||
40 | umount $SDHC_DEVICE_PART | ||
41 | fi | ||
42 | |||
43 | /sbin/mkfs.ext2 $SDHC_DEVICE_PART | ||
44 | if [ $? -ne 0 ]; then | ||
45 | echo "FAIL: format $SDHC_DEVICE_PART fail" | ||
46 | exit 1 | ||
47 | else | ||
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 | ||
64 | fi | ||
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 | |||
7 | MTD_CHAR_DEVICE="/dev/mtd4" | ||
8 | MTD_BLOCK_DEVICE="/dev/mtdblock4" | ||
9 | |||
10 | if [ ! -e $MTD_CHAR_DEVICE ]; then | ||
11 | echo "FAIL: spi flash device $MTD_CHAR_DEVICE does not exist" | ||
12 | exit 1 | ||
13 | else | ||
14 | echo "PASS: spi flash device $MTD_CHAR_DEVICE exists" | ||
15 | fi | ||
16 | |||
17 | if [ ! -e $MTD_BLOCK_DEVICE ]; then | ||
18 | echo "FAIL: spi flash device $MTD_BLOCK_DEVICE does not exist" | ||
19 | exit 1 | ||
20 | else | ||
21 | echo "PASS: spi flash device $MTD_BLOCK_DEVICE exists" | ||
22 | fi | ||
23 | |||
24 | /usr/sbin/flash_erase -j $MTD_CHAR_DEVICE 0 0 | ||
25 | if [ $? -ne 0 ]; then | ||
26 | echo "FAIL: format spi flash device $MTD_BLOCK_DEVICE fail" | ||
27 | exit 1 | ||
28 | else | ||
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 | ||
45 | fi | ||
46 | |||
47 | echo "PASS: spi bus test passed" | ||
48 | exit 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 | ||
2 | server_ip="172.24.0.50" | ||
3 | |||
4 | if ping -c1 $server_ip > /dev/null | ||
5 | then | ||
6 | netperf -H $server_ip -t TCP_STREAM | ||
7 | netperf -H $server_ip -t TCP_MAERTS | ||
8 | netperf -H $server_ip -t TCP_RR | ||
9 | netperf -H $server_ip -t TCP_CRR | ||
10 | netperf -H $server_ip -t UDP_STREAM | ||
11 | netperf -H $server_ip -t UDP_RR | ||
12 | else | ||
13 | echo "Error: Server is down!" | ||
14 | fi | ||
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 @@ | |||
1 | SUMMARY = "A simple shell script to run network performance tests" | ||
2 | DESCRIPTION = "The perf-networking package installs the perf-networking \ | ||
3 | shell script which runs tests using the netperf package" | ||
4 | SRC_URI += "file://perf-networking" | ||
5 | |||
6 | LICENSE = "MIT" | ||
7 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ | ||
8 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
9 | |||
10 | RDEPENDS_${PN}= "netperf" | ||
11 | |||
12 | do_install () { | ||
13 | install -D ${WORKDIR}/perf-networking ${D}${bindir}/perf-networking | ||
14 | } | ||
15 | |||
16 | do_patch[noexec] = "1" | ||
17 | do_configure[noexec] = "1" | ||
18 | do_compile[noexec] = "1" | ||
19 | do_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 @@ | |||
1 | LICENSE = "BSD" | ||
2 | LIC_FILES_CHKSUM = "file://README;md5=0db98e009b4bd9c1d6e074f701c9f9dd" | ||
3 | DESCRIPTION = "RT Benachmarks" | ||
4 | INHIBIT_DEFAULT_DEPS = "1" | ||
5 | |||
6 | SRCREV = "189a84fc3112afba2f7bee28dcec3ea75c86e34a" | ||
7 | SRC_URI = "git://gitlab.enea.se/thomas.lundstrom/rt-benchmarks.git;protocol=http" | ||
8 | |||
9 | TEST_SCRIPT_DIR = "${libdir}/benchtest-runner/tests" | ||
10 | |||
11 | FILES_${PN} += " ${TEST_SCRIPT_DIR}" | ||
12 | |||
13 | RDEPENDS_${PN} += " stress rt-tests python" | ||
14 | |||
15 | do_install () { | ||
16 | mkdir -p ${D}${TEST_SCRIPT_DIR} | ||
17 | install ${WORKDIR}/git/rt_bmark ${D}${TEST_SCRIPT_DIR} | ||
18 | } | ||
19 | |||
20 | do_patch[noexec] = "1" | ||
21 | do_configure[noexec] = "1" | ||
22 | do_compile[noexec] = "1" | ||
23 | do_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 @@ | |||
1 | stress: fix documentation build failure on Fedora | ||
2 | |||
3 | Building the documentation for stress failed due to errors like this | ||
4 | one: | ||
5 | stress.texi:68: @itemx must follow @item | ||
6 | |||
7 | Upstream-Status: Submitted [Amos Waterland <apw@debian.org>] | ||
8 | |||
9 | Signed-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 @@ | |||
1 | inherit autotools | ||
2 | |||
3 | HOMEPAGE = "http://people.seas.harvard.edu/~apw/stress/" | ||
4 | DESCRIPTION = "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 | |||
6 | LICENSE = "GPLv2+" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
8 | |||
9 | SRC_URI="http://people.seas.harvard.edu/~apw/stress/stress-${PV}.tar.gz;name=tar \ | ||
10 | file://stress-itemx-after-item-only.patch" | ||
11 | |||
12 | SRC_URI[tar.md5sum] = "890a4236dd1656792f3ef9a190cf99ef" | ||
13 | SRC_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 | |||
3 | while 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 | ||
17 | done | ||
18 | |||
19 | for x in * | ||
20 | do | ||
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 | ||
29 | done | ||
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 | |||
3 | cd /opt/ltp >/dev/null | ||
4 | addgroup nobody | ||
5 | sed -i -e "/mounts | sort -b$/s/$/ | grep -v deleted/" ./testscripts/test_fs_bind.sh | ||
6 | |||
7 | logname=`date +"%Y_%m_%d_%H_%M_%S"`".log" | ||
8 | ./runltp -p -d /tmp -l $logname | ||
9 | |||
10 | if [ ! -d ./results ]; then | ||
11 | echo "FAIL: no result found" | ||
12 | exit 1 | ||
13 | fi | ||
14 | |||
15 | cat ./results/$logname | while read line | ||
16 | do | ||
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 | ||
23 | done | ||
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 | |||
3 | logname=`date +"%Y_%m_%d_%H_%M_%S"`".log" | ||
4 | perf-networking |tee /tmp/$logname | ||
5 | |||
6 | if grep -Fq "Error:" /tmp/$logname | ||
7 | then | ||
8 | echo "FAIL: Test failed" | ||
9 | exit 1 | ||
10 | else | ||
11 | echo "PASS: Performed the netperf tests" | ||
12 | exit 0 | ||
13 | fi | ||
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 | |||
3 | printit() { | ||
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 | |||
19 | cd /opt/ltp/testcases/open_posix_testsuite >/dev/null | ||
20 | |||
21 | make test | ||
22 | |||
23 | FILES=$(find . -name "logfile.*-test") | ||
24 | for f in $FILES | ||
25 | do | ||
26 | printit $f | ||
27 | done | ||
28 | |||
29 | printf "\n\nRunning POSIX Option Group Feature Tests" | ||
30 | printf "\n========================================\n" | ||
31 | |||
32 | ./bin/run-all-posix-option-group-tests.sh | ||
33 | |||
34 | FILES=$(find . -name "logfile") | ||
35 | for f in $FILES | ||
36 | do | ||
37 | printit $f | ||
38 | done | ||
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 | |||
2 | LICENSE = "BSD" | ||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" | ||
4 | DESCRIPTION = "Execute all scripts under systest-runner/tests folder" | ||
5 | INHIBIT_DEFAULT_DEPS = "1" | ||
6 | |||
7 | SRC_URI = "file://systest-runner \ | ||
8 | file://tests/ltp \ | ||
9 | file://tests/perf-network \ | ||
10 | file://tests/posixtest \ | ||
11 | " | ||
12 | |||
13 | STEST_PATH="${libdir}/${PN}" | ||
14 | |||
15 | FILES_${PN} +="${STEST_PATH}" | ||
16 | FILES_${PN} += "${bindir}/systest-runner" | ||
17 | |||
18 | do_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 | |||
26 | do_patch[noexec] = "1" | ||
27 | do_configure[noexec] = "1" | ||
28 | do_compile[noexec] = "1" | ||
29 | do_build[noexec] = "1" | ||