All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] linux-yocto: add ptest support
@ 2018-05-31  3:08 Dengke Du
  2018-05-31  3:08 ` [PATCH 1/1] " Dengke Du
  0 siblings, 1 reply; 7+ messages in thread
From: Dengke Du @ 2018-05-31  3:08 UTC (permalink / raw)
  To: openembedded-core

Add ptest for kernel samples.

Prerequisite: 
1. Install package kernel-modules
2. enable ptest distro feature

Runtime testing(x86):
1. cd /usr/lib/linux-yocto/ptest
2. ./run-ptest

Testing result:
#####result#####
dma-example: PASS
bytestream-example: PASS
inttype-example: PASS
record-example: PASS
kobject-example: PASS
kset-example: PASS
trace-events-sample: PASS
trace-printk: PASS
kprobe_example: PASS
kretprobe_example: PASS

The following changes since commit 719d068bde55ef29a3468bc0779d4cb0c11e8c1d:

  bitbake: fetch2: fix import error for Python 3.6.5 (2018-05-29 21:07:46 +0100)

are available in the git repository at:

  https://github.com/DengkeDu/openembedded-core.git dengke/dev
  https://github.com//tree/dengke/dev

Dengke Du (1):
  linux-yocto: add ptest support

 meta/recipes-kernel/linux/files/run-ptest     | 138 ++++++++++++++++++++++++++
 meta/recipes-kernel/linux/linux-yocto.inc     |   8 ++
 meta/recipes-kernel/linux/linux-yocto_4.14.bb |   2 +-
 3 files changed, 147 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-kernel/linux/files/run-ptest

-- 
2.7.4



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/1] linux-yocto: add ptest support
  2018-05-31  3:08 [PATCH 0/1] linux-yocto: add ptest support Dengke Du
@ 2018-05-31  3:08 ` Dengke Du
  2018-05-31  4:19   ` Bruce Ashfield
  0 siblings, 1 reply; 7+ messages in thread
From: Dengke Du @ 2018-05-31  3:08 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Dengke Du <dengke.du@windriver.com>
---
 meta/recipes-kernel/linux/files/run-ptest     | 138 ++++++++++++++++++++++++++
 meta/recipes-kernel/linux/linux-yocto.inc     |   8 ++
 meta/recipes-kernel/linux/linux-yocto_4.14.bb |   2 +-
 3 files changed, 147 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-kernel/linux/files/run-ptest

diff --git a/meta/recipes-kernel/linux/files/run-ptest b/meta/recipes-kernel/linux/files/run-ptest
new file mode 100644
index 0000000..a3d9e14
--- /dev/null
+++ b/meta/recipes-kernel/linux/files/run-ptest
@@ -0,0 +1,138 @@
+#!/bin/bash
+depmod
+touch kernel.log
+
+#dma-example bytestream-example inttype-example record-example
+list1=("dma-example" "bytestream-example" "inttype-example" "record-example")
+for i in "${list1[@]}"
+do
+  dmesg -c
+  modprobe "$i"
+  result=""
+  IFS="-" read -ra array <<< "$i"
+  len=${#array[@]}
+  if [ $len -eq 2 ];then
+    result="${array[0]}_${array[1]}"
+  elif [ $len -eq 3 ];then
+    result="${array[0]}_${array[1]}_${array[2]}"
+  fi
+  lsmod | grep -q "$result"
+  if [ $? -eq 0 ];then
+    dmesg | grep "test passed"
+    if [ $? -eq 0 ];then
+      echo "$i: PASS" >> kernel.log
+    fi
+    rmmod "$i"
+  else
+    echo "$i: FAILED" >> kernel.log
+  fi
+done
+
+#kobject-example kset-example
+list2=("kobject-example" "kset-example")
+for i in "${list2[@]}"
+do
+  dmesg -c
+  modprobe "$i"
+  result=""
+  IFS="-" read -ra array <<< "$i"
+  len=${#array[@]}
+  if [ $len -eq 2 ];then
+    result="${array[0]}_${array[1]}"
+  elif [ $len -eq 3 ];then
+    result="${array[0]}_${array[1]}_${array[2]}"
+  fi
+  basedir="/sys/kernel/${result}"
+  echo "$basedir"
+  if [ -e ${basedir}/bar -a -e ${basedir}/baz -a -e ${basedir}/foo ];then
+    echo "$i: PASS" >> kernel.log
+    rmmod "$i"
+  else
+    echo "$i: FAILED" >> kernel.log
+  fi
+done
+
+#trace-events-sample
+list3="trace-events-sample"
+result=""
+IFS="-" read -ra array <<< "$list3"
+len=${#array[@]}
+if [ $len -eq 2 ];then
+  result="${array[0]}_${array[1]}"
+elif [ $len -eq 3 ];then
+  result="${array[0]}_${array[1]}_${array[2]}"
+fi
+modprobe "$list3"
+lsmod | grep "$result"
+if [ $? -eq 0 ];then
+  if [ -e "/sys/kernel/debug/tracing/events/sample-trace" ];then
+    echo 1 > /sys/kernel/debug/tracing/events/sample-trace/enable
+    sleep 5
+    ret=`cat /sys/kernel/debug/tracing/trace | grep hello | head -n1 | cut -d':' -f2`
+    if [ "$ret" = " foo_bar" ];then
+      echo "$list3: PASS"  >> kernel.log
+    else
+      echo "$list3: FAILED-" >> kernel.log
+    fi
+  else
+    echo "$list3: FAILED--" >> kernel.log
+  fi
+else
+  echo "$list3: FAILED---" >> kernel.log
+fi
+rmmod "$list3"
+
+#trace-printk
+list4="trace-printk"
+modprobe "$list4"
+lsmod | grep "trace_printk"
+if [ $? -eq 0 ];then
+  ret=`cat /sys/kernel/debug/tracing/trace | grep trace_printk | head -n1 | cut -d':' -f2`
+  if [ "$ret" = " trace_printk_irq_work" ];then
+    echo "$list4: PASS" >> kernel.log
+    rmmod "$list4"
+  else
+    echo "$list4: FAILED" >> kernel.log
+  fi
+else
+  echo "$list4: FAILED" >> kernel.log
+fi
+rmmod "$list4"
+
+#kprobe_example
+list5="kprobe_example"
+dmesg -c
+modprobe "$list5"
+lsmod | grep "$list5"
+if [ $? -eq 0 ];then
+  dmesg | grep "_do_fork"
+  if [ $? -eq 0 ];then
+    echo "$list5: PASS" >> kernel.log
+  else
+    echo "$list5: FAILED" >> kernel.log
+  fi
+else
+  echo "$list5: FAILED" >> kernel.log
+fi
+rmmod "$list5"
+
+#kretprobe_example
+list6="kretprobe_example"
+dmesg -c
+modprobe "$list6"
+lsmod | grep "$list6"
+if [ $? -eq 0 ];then
+  dmesg | grep "_do_fork returned"
+  if [ $? -eq 0 ];then
+    echo "$list6: PASS" >> kernel.log
+  else
+    echo "$list6: FAILED" >> kernel.log
+  fi
+else
+  echo "$list6: FAILED" >> kernel.log
+fi
+rmmod "$list6"
+
+echo "#####result#####"
+cat kernel.log
+rm kernel.log
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
index 95ec2a2..7e1773e 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -67,3 +67,11 @@ do_install_append(){
 addtask kernel_version_sanity_check after do_kernel_metadata do_kernel_checkout before do_compile
 addtask validate_branches before do_patch after do_kernel_checkout
 addtask kernel_configcheck after do_configure before do_compile
+
+inherit ptest
+SRC_URI_append = " file://run-ptest \
+"
+do_install_ptest_append() {
+	install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
+}
+KERNEL_FEATURES_append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", "features/kernel-sample/kernel-sample.scc", "", d)}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_4.14.bb b/meta/recipes-kernel/linux/linux-yocto_4.14.bb
index 16142f8..7002693 100644
--- a/meta/recipes-kernel/linux/linux-yocto_4.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_4.14.bb
@@ -19,7 +19,7 @@ SRCREV_machine_qemux86 ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
 SRCREV_machine_qemux86-64 ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
 SRCREV_machine_qemumips64 ?= "9863b327e770b42b8c18da3e0cfaf06e8f99ae97"
 SRCREV_machine ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
-SRCREV_meta ?= "ea9330894eea727bd1655569b16f338976b72563"
+SRCREV_meta ?= "53336e1b7d969f21d8214ec9ceeb48fba4f99372"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] linux-yocto: add ptest support
  2018-05-31  3:08 ` [PATCH 1/1] " Dengke Du
@ 2018-05-31  4:19   ` Bruce Ashfield
  2018-05-31 14:08     ` lei yang
  2018-06-01  7:52     ` Dengke Du
  0 siblings, 2 replies; 7+ messages in thread
From: Bruce Ashfield @ 2018-05-31  4:19 UTC (permalink / raw)
  To: Dengke Du; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 7183 bytes --]

On Wed, May 30, 2018 at 11:08 PM, Dengke Du <dengke.du@windriver.com> wrote:

> Signed-off-by: Dengke Du <dengke.du@windriver.com>
> ---
>  meta/recipes-kernel/linux/files/run-ptest     | 138
> ++++++++++++++++++++++++++
>

Nothing else in linux-yocto uses "files", and this shouldn't either.

We can't guarantee that these are version independent, so they need to be
in  a versioned
kernel subdirectory.



>  meta/recipes-kernel/linux/linux-yocto.inc     |   8 ++
>  meta/recipes-kernel/linux/linux-yocto_4.14.bb |   2 +-
>  3 files changed, 147 insertions(+), 1 deletion(-)
>  create mode 100644 meta/recipes-kernel/linux/files/run-ptest
>
> diff --git a/meta/recipes-kernel/linux/files/run-ptest
> b/meta/recipes-kernel/linux/files/run-ptest
> new file mode 100644
> index 0000000..a3d9e14
> --- /dev/null
> +++ b/meta/recipes-kernel/linux/files/run-ptest
> @@ -0,0 +1,138 @@
> +#!/bin/bash
>

This script should have a license and proper header file.

Also, if the ptests are mainly trace/sample related, name the script to
indicate that.

The kernel already has a significant number of selftests, which are likely
better than
these ptests. Is there any reason why they aren't being used instead ?


> +depmod
> +touch kernel.log
> +
> +#dma-example bytestream-example inttype-example record-example
> +list1=("dma-example" "bytestream-example" "inttype-example"
> "record-example")
> +for i in "${list1[@]}"
> +do
> +  dmesg -c
> +  modprobe "$i"
> +  result=""
> +  IFS="-" read -ra array <<< "$i"
> +  len=${#array[@]}
> +  if [ $len -eq 2 ];then
> +    result="${array[0]}_${array[1]}"
> +  elif [ $len -eq 3 ];then
> +    result="${array[0]}_${array[1]}_${array[2]}"
> +  fi
> +  lsmod | grep -q "$result"
> +  if [ $? -eq 0 ];then
> +    dmesg | grep "test passed"
> +    if [ $? -eq 0 ];then
> +      echo "$i: PASS" >> kernel.log
> +    fi
> +    rmmod "$i"
> +  else
> +    echo "$i: FAILED" >> kernel.log
> +  fi
> +done
> +
> +#kobject-example kset-example
> +list2=("kobject-example" "kset-example")
> +for i in "${list2[@]}"
> +do
> +  dmesg -c
> +  modprobe "$i"
> +  result=""
> +  IFS="-" read -ra array <<< "$i"
> +  len=${#array[@]}
> +  if [ $len -eq 2 ];then
> +    result="${array[0]}_${array[1]}"
> +  elif [ $len -eq 3 ];then
> +    result="${array[0]}_${array[1]}_${array[2]}"
> +  fi
> +  basedir="/sys/kernel/${result}"
> +  echo "$basedir"
> +  if [ -e ${basedir}/bar -a -e ${basedir}/baz -a -e ${basedir}/foo ];then
> +    echo "$i: PASS" >> kernel.log
> +    rmmod "$i"
> +  else
> +    echo "$i: FAILED" >> kernel.log
> +  fi
> +done
> +
> +#trace-events-sample
> +list3="trace-events-sample"
> +result=""
> +IFS="-" read -ra array <<< "$list3"
> +len=${#array[@]}
> +if [ $len -eq 2 ];then
> +  result="${array[0]}_${array[1]}"
> +elif [ $len -eq 3 ];then
> +  result="${array[0]}_${array[1]}_${array[2]}"
> +fi
> +modprobe "$list3"
> +lsmod | grep "$result"
> +if [ $? -eq 0 ];then
> +  if [ -e "/sys/kernel/debug/tracing/events/sample-trace" ];then
> +    echo 1 > /sys/kernel/debug/tracing/events/sample-trace/enable
> +    sleep 5
> +    ret=`cat /sys/kernel/debug/tracing/trace | grep hello | head -n1 |
> cut -d':' -f2`
> +    if [ "$ret" = " foo_bar" ];then
> +      echo "$list3: PASS"  >> kernel.log
> +    else
> +      echo "$list3: FAILED-" >> kernel.log
> +    fi
> +  else
> +    echo "$list3: FAILED--" >> kernel.log
> +  fi
> +else
> +  echo "$list3: FAILED---" >> kernel.log
> +fi
> +rmmod "$list3"
> +
> +#trace-printk
> +list4="trace-printk"
> +modprobe "$list4"
> +lsmod | grep "trace_printk"
> +if [ $? -eq 0 ];then
> +  ret=`cat /sys/kernel/debug/tracing/trace | grep trace_printk | head
> -n1 | cut -d':' -f2`
> +  if [ "$ret" = " trace_printk_irq_work" ];then
> +    echo "$list4: PASS" >> kernel.log
> +    rmmod "$list4"
> +  else
> +    echo "$list4: FAILED" >> kernel.log
> +  fi
> +else
> +  echo "$list4: FAILED" >> kernel.log
> +fi
> +rmmod "$list4"
> +
> +#kprobe_example
> +list5="kprobe_example"
> +dmesg -c
> +modprobe "$list5"
> +lsmod | grep "$list5"
> +if [ $? -eq 0 ];then
> +  dmesg | grep "_do_fork"
> +  if [ $? -eq 0 ];then
> +    echo "$list5: PASS" >> kernel.log
> +  else
> +    echo "$list5: FAILED" >> kernel.log
> +  fi
> +else
> +  echo "$list5: FAILED" >> kernel.log
> +fi
> +rmmod "$list5"
> +
> +#kretprobe_example
> +list6="kretprobe_example"
> +dmesg -c
> +modprobe "$list6"
> +lsmod | grep "$list6"
> +if [ $? -eq 0 ];then
> +  dmesg | grep "_do_fork returned"
> +  if [ $? -eq 0 ];then
> +    echo "$list6: PASS" >> kernel.log
> +  else
> +    echo "$list6: FAILED" >> kernel.log
> +  fi
> +else
> +  echo "$list6: FAILED" >> kernel.log
> +fi
> +rmmod "$list6"
> +
> +echo "#####result#####"
> +cat kernel.log
> +rm kernel.log
> diff --git a/meta/recipes-kernel/linux/linux-yocto.inc
> b/meta/recipes-kernel/linux/linux-yocto.inc
> index 95ec2a2..7e1773e 100644
> --- a/meta/recipes-kernel/linux/linux-yocto.inc
> +++ b/meta/recipes-kernel/linux/linux-yocto.inc
> @@ -67,3 +67,11 @@ do_install_append(){
>  addtask kernel_version_sanity_check after do_kernel_metadata
> do_kernel_checkout before do_compile
>  addtask validate_branches before do_patch after do_kernel_checkout
>  addtask kernel_configcheck after do_configure before do_compile
> +
> +inherit ptest
> +SRC_URI_append = " file://run-ptest \
> +"
> +do_install_ptest_append() {
> +       install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
> +}
> +KERNEL_FEATURES_append = " ${@bb.utils.contains("DISTRO_FEATURES",
> "ptest", "features/kernel-sample/kernel-sample.scc", "", d)}"
> diff --git a/meta/recipes-kernel/linux/linux-yocto_4.14.bb
> b/meta/recipes-kernel/linux/linux-yocto_4.14.bb
> index 16142f8..7002693 100644
> --- a/meta/recipes-kernel/linux/linux-yocto_4.14.bb
> +++ b/meta/recipes-kernel/linux/linux-yocto_4.14.bb
> @@ -19,7 +19,7 @@ SRCREV_machine_qemux86 ?= "
> 74f6cd2b6976e37491779fcb1bc4966d3a61492c"
>  SRCREV_machine_qemux86-64 ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
>  SRCREV_machine_qemumips64 ?= "9863b327e770b42b8c18da3e0cfaf06e8f99ae97"
>  SRCREV_machine ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
> -SRCREV_meta ?= "ea9330894eea727bd1655569b16f338976b72563"
> +SRCREV_meta ?= "53336e1b7d969f21d8214ec9ceeb48fba4f99372"
>

Do not bump the SRCREV for meta in this series.

If your feature depends on something in the meta branch (which it does),
wait until I've sent my next series before sending this.

Bruce


>
>  SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;
> branch=${KBRANCH}; \
>             git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;
> name=meta;branch=yocto-4.14;destsuffix=${KMETA}"
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"

[-- Attachment #2: Type: text/html, Size: 10878 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] linux-yocto: add ptest support
  2018-05-31  4:19   ` Bruce Ashfield
@ 2018-05-31 14:08     ` lei yang
  2018-06-01  7:55       ` Dengke Du
  2018-06-01  7:52     ` Dengke Du
  1 sibling, 1 reply; 7+ messages in thread
From: lei yang @ 2018-05-31 14:08 UTC (permalink / raw)
  To: Bruce Ashfield, Dengke Du; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 8866 bytes --]

hi dengke,

some of the kernel modules were rmmod-ed twice, some of them forget to 
be rmmod-ed when it fails,

please take a look.

Lei



On 2018年05月31日 12:19, Bruce Ashfield wrote:
>
>
> On Wed, May 30, 2018 at 11:08 PM, Dengke Du <dengke.du@windriver.com 
> <mailto:dengke.du@windriver.com>> wrote:
>
>     Signed-off-by: Dengke Du <dengke.du@windriver.com
>     <mailto:dengke.du@windriver.com>>
>     ---
>      meta/recipes-kernel/linux/files/run-ptest    | 138
>     ++++++++++++++++++++++++++
>
>
> Nothing else in linux-yocto uses "files", and this shouldn't either.
>
> We can't guarantee that these are version independent, so they need to 
> be in  a versioned
> kernel subdirectory.
>
>      meta/recipes-kernel/linux/linux-yocto.inc     |  8 ++
>      meta/recipes-kernel/linux/linux-yocto_4.14.bb
>     <http://linux-yocto_4.14.bb> |   2 +-
>      3 files changed, 147 insertions(+), 1 deletion(-)
>      create mode 100644 meta/recipes-kernel/linux/files/run-ptest
>
>     diff --git a/meta/recipes-kernel/linux/files/run-ptest
>     b/meta/recipes-kernel/linux/files/run-ptest
>     new file mode 100644
>     index 0000000..a3d9e14
>     --- /dev/null
>     +++ b/meta/recipes-kernel/linux/files/run-ptest
>     @@ -0,0 +1,138 @@
>     +#!/bin/bash
>
>
> This script should have a license and proper header file.
>
> Also, if the ptests are mainly trace/sample related, name the script 
> to indicate that.
>
> The kernel already has a significant number of selftests, which are 
> likely better than
> these ptests. Is there any reason why they aren't being used instead ?
>
>     +depmod
>     +touch kernel.log
>     +
>     +#dma-example bytestream-example inttype-example record-example
>     +list1=("dma-example" "bytestream-example" "inttype-example"
>     "record-example")
>     +for i in "${list1[@]}"
>     +do
>     +  dmesg -c
>     +  modprobe "$i"
>     +  result=""
>     +  IFS="-" read -ra array <<< "$i"
>     +  len=${#array[@]}
>     +  if [ $len -eq 2 ];then
>     +    result="${array[0]}_${array[1]}"
>     +  elif [ $len -eq 3 ];then
>     +    result="${array[0]}_${array[1]}_${array[2]}"
>     +  fi
>     +  lsmod | grep -q "$result"
>     +  if [ $? -eq 0 ];then
>     +    dmesg | grep "test passed"
>     +    if [ $? -eq 0 ];then
>     +      echo "$i: PASS" >> kernel.log
>     +    fi
>     +    rmmod "$i"
>     +  else
>     +    echo "$i: FAILED" >> kernel.log
>     +  fi
>     +done
>     +
>     +#kobject-example kset-example
>     +list2=("kobject-example" "kset-example")
>     +for i in "${list2[@]}"
>     +do
>     +  dmesg -c
>     +  modprobe "$i"
>     +  result=""
>     +  IFS="-" read -ra array <<< "$i"
>     +  len=${#array[@]}
>     +  if [ $len -eq 2 ];then
>     +    result="${array[0]}_${array[1]}"
>     +  elif [ $len -eq 3 ];then
>     +    result="${array[0]}_${array[1]}_${array[2]}"
>     +  fi
>     +  basedir="/sys/kernel/${result}"
>     +  echo "$basedir"
>     +  if [ -e ${basedir}/bar -a -e ${basedir}/baz -a -e
>     ${basedir}/foo ];then
>     +    echo "$i: PASS" >> kernel.log
>     +    rmmod "$i"
>     +  else
>     +    echo "$i: FAILED" >> kernel.log
>     +  fi
>     +done
>     +
>     +#trace-events-sample
>     +list3="trace-events-sample"
>     +result=""
>     +IFS="-" read -ra array <<< "$list3"
>     +len=${#array[@]}
>     +if [ $len -eq 2 ];then
>     +  result="${array[0]}_${array[1]}"
>     +elif [ $len -eq 3 ];then
>     +  result="${array[0]}_${array[1]}_${array[2]}"
>     +fi
>     +modprobe "$list3"
>     +lsmod | grep "$result"
>     +if [ $? -eq 0 ];then
>     +  if [ -e "/sys/kernel/debug/tracing/events/sample-trace" ];then
>     +    echo 1 > /sys/kernel/debug/tracing/events/sample-trace/enable
>     +    sleep 5
>     +    ret=`cat /sys/kernel/debug/tracing/trace | grep hello | head
>     -n1 | cut -d':' -f2`
>     +    if [ "$ret" = " foo_bar" ];then
>     +      echo "$list3: PASS"  >> kernel.log
>     +    else
>     +      echo "$list3: FAILED-" >> kernel.log
>     +    fi
>     +  else
>     +    echo "$list3: FAILED--" >> kernel.log
>     +  fi
>     +else
>     +  echo "$list3: FAILED---" >> kernel.log
>     +fi
>     +rmmod "$list3"
>     +
>     +#trace-printk
>     +list4="trace-printk"
>     +modprobe "$list4"
>     +lsmod | grep "trace_printk"
>     +if [ $? -eq 0 ];then
>     +  ret=`cat /sys/kernel/debug/tracing/trace | grep trace_printk |
>     head -n1 | cut -d':' -f2`
>     +  if [ "$ret" = " trace_printk_irq_work" ];then
>     +    echo "$list4: PASS" >> kernel.log
>     +    rmmod "$list4"
>     +  else
>     +    echo "$list4: FAILED" >> kernel.log
>     +  fi
>     +else
>     +  echo "$list4: FAILED" >> kernel.log
>     +fi
>     +rmmod "$list4"
>     +
>     +#kprobe_example
>     +list5="kprobe_example"
>     +dmesg -c
>     +modprobe "$list5"
>     +lsmod | grep "$list5"
>     +if [ $? -eq 0 ];then
>     +  dmesg | grep "_do_fork"
>     +  if [ $? -eq 0 ];then
>     +    echo "$list5: PASS" >> kernel.log
>     +  else
>     +    echo "$list5: FAILED" >> kernel.log
>     +  fi
>     +else
>     +  echo "$list5: FAILED" >> kernel.log
>     +fi
>     +rmmod "$list5"
>     +
>     +#kretprobe_example
>     +list6="kretprobe_example"
>     +dmesg -c
>     +modprobe "$list6"
>     +lsmod | grep "$list6"
>     +if [ $? -eq 0 ];then
>     +  dmesg | grep "_do_fork returned"
>     +  if [ $? -eq 0 ];then
>     +    echo "$list6: PASS" >> kernel.log
>     +  else
>     +    echo "$list6: FAILED" >> kernel.log
>     +  fi
>     +else
>     +  echo "$list6: FAILED" >> kernel.log
>     +fi
>     +rmmod "$list6"
>     +
>     +echo "#####result#####"
>     +cat kernel.log
>     +rm kernel.log
>     diff --git a/meta/recipes-kernel/linux/linux-yocto.inc
>     b/meta/recipes-kernel/linux/linux-yocto.inc
>     index 95ec2a2..7e1773e 100644
>     --- a/meta/recipes-kernel/linux/linux-yocto.inc
>     +++ b/meta/recipes-kernel/linux/linux-yocto.inc
>     @@ -67,3 +67,11 @@ do_install_append(){
>      addtask kernel_version_sanity_check after do_kernel_metadata
>     do_kernel_checkout before do_compile
>      addtask validate_branches before do_patch after do_kernel_checkout
>      addtask kernel_configcheck after do_configure before do_compile
>     +
>     +inherit ptest
>     +SRC_URI_append = " file://run-ptest \
>     +"
>     +do_install_ptest_append() {
>     +       install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
>     +}
>     +KERNEL_FEATURES_append = "
>     ${@bb.utils.contains("DISTRO_FEATURES", "ptest",
>     "features/kernel-sample/kernel-sample.scc", "", d)}"
>     diff --git a/meta/recipes-kernel/linux/linux-yocto_4.14.bb
>     <http://linux-yocto_4.14.bb>
>     b/meta/recipes-kernel/linux/linux-yocto_4.14.bb
>     <http://linux-yocto_4.14.bb>
>     index 16142f8..7002693 100644
>     --- a/meta/recipes-kernel/linux/linux-yocto_4.14.bb
>     <http://linux-yocto_4.14.bb>
>     +++ b/meta/recipes-kernel/linux/linux-yocto_4.14.bb
>     <http://linux-yocto_4.14.bb>
>     @@ -19,7 +19,7 @@ SRCREV_machine_qemux86 ?=
>     "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
>      SRCREV_machine_qemux86-64 ?=
>     "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
>      SRCREV_machine_qemumips64 ?=
>     "9863b327e770b42b8c18da3e0cfaf06e8f99ae97"
>      SRCREV_machine ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
>     -SRCREV_meta ?= "ea9330894eea727bd1655569b16f338976b72563"
>     +SRCREV_meta ?= "53336e1b7d969f21d8214ec9ceeb48fba4f99372"
>
>
> Do not bump the SRCREV for meta in this series.
>
> If your feature depends on something in the meta branch (which it 
> does), wait until I've sent my next series before sending this.
>
> Bruce
>
>
>      SRC_URI =
>     "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}
>     <http://git.yoctoproject.org/linux-yocto.git;name=machine;branch=$%7BKBRANCH%7D>;
>     \
>                
>     git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}
>     <http://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=$%7BKMETA%7D>"
>     -- 
>     2.7.4
>
>     -- 
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>     <http://lists.openembedded.org/mailman/listinfo/openembedded-core>
>
>
>
>
> -- 
> "Thou shalt not follow the NULL pointer, for chaos and madness await 
> thee at its end"
>
>


[-- Attachment #2: Type: text/html, Size: 15336 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] linux-yocto: add ptest support
  2018-05-31  4:19   ` Bruce Ashfield
  2018-05-31 14:08     ` lei yang
@ 2018-06-01  7:52     ` Dengke Du
  2018-06-03 16:08       ` Richard Purdie
  1 sibling, 1 reply; 7+ messages in thread
From: Dengke Du @ 2018-06-01  7:52 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 9226 bytes --]



On 2018年05月31日 12:19, Bruce Ashfield wrote:
>
>
> On Wed, May 30, 2018 at 11:08 PM, Dengke Du <dengke.du@windriver.com 
> <mailto:dengke.du@windriver.com>> wrote:
>
>     Signed-off-by: Dengke Du <dengke.du@windriver.com
>     <mailto:dengke.du@windriver.com>>
>     ---
>      meta/recipes-kernel/linux/files/run-ptest    | 138
>     ++++++++++++++++++++++++++
>
>
> Nothing else in linux-yocto uses "files", and this shouldn't either.
>
> We can't guarantee that these are version independent, so they need to 
> be in  a versioned
> kernel subdirectory.

Ok, I will put it in versioned kernel subdirectory.

>
>      meta/recipes-kernel/linux/linux-yocto.inc     |  8 ++
>      meta/recipes-kernel/linux/linux-yocto_4.14.bb
>     <http://linux-yocto_4.14.bb> |   2 +-
>      3 files changed, 147 insertions(+), 1 deletion(-)
>      create mode 100644 meta/recipes-kernel/linux/files/run-ptest
>
>     diff --git a/meta/recipes-kernel/linux/files/run-ptest
>     b/meta/recipes-kernel/linux/files/run-ptest
>     new file mode 100644
>     index 0000000..a3d9e14
>     --- /dev/null
>     +++ b/meta/recipes-kernel/linux/files/run-ptest
>     @@ -0,0 +1,138 @@
>     +#!/bin/bash
>
>
> This script should have a license and proper header file.
>
> Also, if the ptests are mainly trace/sample related, name the script 
> to indicate that.

Ok.

>
> The kernel already has a significant number of selftests, which are 
> likely better than
> these ptests. Is there any reason why they aren't being used instead ?

This is different to selftests, this ptest was based on kernel samples 
in sample directory,
those samples were some tutorial modules, the modules that we can modify 
it and learn
it(some basic kernel theory), in the end build it into our image to test 
and verification our
thought easily.

>     +depmod
>     +touch kernel.log
>     +
>     +#dma-example bytestream-example inttype-example record-example
>     +list1=("dma-example" "bytestream-example" "inttype-example"
>     "record-example")
>     +for i in "${list1[@]}"
>     +do
>     +  dmesg -c
>     +  modprobe "$i"
>     +  result=""
>     +  IFS="-" read -ra array <<< "$i"
>     +  len=${#array[@]}
>     +  if [ $len -eq 2 ];then
>     +    result="${array[0]}_${array[1]}"
>     +  elif [ $len -eq 3 ];then
>     +    result="${array[0]}_${array[1]}_${array[2]}"
>     +  fi
>     +  lsmod | grep -q "$result"
>     +  if [ $? -eq 0 ];then
>     +    dmesg | grep "test passed"
>     +    if [ $? -eq 0 ];then
>     +      echo "$i: PASS" >> kernel.log
>     +    fi
>     +    rmmod "$i"
>     +  else
>     +    echo "$i: FAILED" >> kernel.log
>     +  fi
>     +done
>     +
>     +#kobject-example kset-example
>     +list2=("kobject-example" "kset-example")
>     +for i in "${list2[@]}"
>     +do
>     +  dmesg -c
>     +  modprobe "$i"
>     +  result=""
>     +  IFS="-" read -ra array <<< "$i"
>     +  len=${#array[@]}
>     +  if [ $len -eq 2 ];then
>     +    result="${array[0]}_${array[1]}"
>     +  elif [ $len -eq 3 ];then
>     +    result="${array[0]}_${array[1]}_${array[2]}"
>     +  fi
>     +  basedir="/sys/kernel/${result}"
>     +  echo "$basedir"
>     +  if [ -e ${basedir}/bar -a -e ${basedir}/baz -a -e
>     ${basedir}/foo ];then
>     +    echo "$i: PASS" >> kernel.log
>     +    rmmod "$i"
>     +  else
>     +    echo "$i: FAILED" >> kernel.log
>     +  fi
>     +done
>     +
>     +#trace-events-sample
>     +list3="trace-events-sample"
>     +result=""
>     +IFS="-" read -ra array <<< "$list3"
>     +len=${#array[@]}
>     +if [ $len -eq 2 ];then
>     +  result="${array[0]}_${array[1]}"
>     +elif [ $len -eq 3 ];then
>     +  result="${array[0]}_${array[1]}_${array[2]}"
>     +fi
>     +modprobe "$list3"
>     +lsmod | grep "$result"
>     +if [ $? -eq 0 ];then
>     +  if [ -e "/sys/kernel/debug/tracing/events/sample-trace" ];then
>     +    echo 1 > /sys/kernel/debug/tracing/events/sample-trace/enable
>     +    sleep 5
>     +    ret=`cat /sys/kernel/debug/tracing/trace | grep hello | head
>     -n1 | cut -d':' -f2`
>     +    if [ "$ret" = " foo_bar" ];then
>     +      echo "$list3: PASS"  >> kernel.log
>     +    else
>     +      echo "$list3: FAILED-" >> kernel.log
>     +    fi
>     +  else
>     +    echo "$list3: FAILED--" >> kernel.log
>     +  fi
>     +else
>     +  echo "$list3: FAILED---" >> kernel.log
>     +fi
>     +rmmod "$list3"
>     +
>     +#trace-printk
>     +list4="trace-printk"
>     +modprobe "$list4"
>     +lsmod | grep "trace_printk"
>     +if [ $? -eq 0 ];then
>     +  ret=`cat /sys/kernel/debug/tracing/trace | grep trace_printk |
>     head -n1 | cut -d':' -f2`
>     +  if [ "$ret" = " trace_printk_irq_work" ];then
>     +    echo "$list4: PASS" >> kernel.log
>     +    rmmod "$list4"
>     +  else
>     +    echo "$list4: FAILED" >> kernel.log
>     +  fi
>     +else
>     +  echo "$list4: FAILED" >> kernel.log
>     +fi
>     +rmmod "$list4"
>     +
>     +#kprobe_example
>     +list5="kprobe_example"
>     +dmesg -c
>     +modprobe "$list5"
>     +lsmod | grep "$list5"
>     +if [ $? -eq 0 ];then
>     +  dmesg | grep "_do_fork"
>     +  if [ $? -eq 0 ];then
>     +    echo "$list5: PASS" >> kernel.log
>     +  else
>     +    echo "$list5: FAILED" >> kernel.log
>     +  fi
>     +else
>     +  echo "$list5: FAILED" >> kernel.log
>     +fi
>     +rmmod "$list5"
>     +
>     +#kretprobe_example
>     +list6="kretprobe_example"
>     +dmesg -c
>     +modprobe "$list6"
>     +lsmod | grep "$list6"
>     +if [ $? -eq 0 ];then
>     +  dmesg | grep "_do_fork returned"
>     +  if [ $? -eq 0 ];then
>     +    echo "$list6: PASS" >> kernel.log
>     +  else
>     +    echo "$list6: FAILED" >> kernel.log
>     +  fi
>     +else
>     +  echo "$list6: FAILED" >> kernel.log
>     +fi
>     +rmmod "$list6"
>     +
>     +echo "#####result#####"
>     +cat kernel.log
>     +rm kernel.log
>     diff --git a/meta/recipes-kernel/linux/linux-yocto.inc
>     b/meta/recipes-kernel/linux/linux-yocto.inc
>     index 95ec2a2..7e1773e 100644
>     --- a/meta/recipes-kernel/linux/linux-yocto.inc
>     +++ b/meta/recipes-kernel/linux/linux-yocto.inc
>     @@ -67,3 +67,11 @@ do_install_append(){
>      addtask kernel_version_sanity_check after do_kernel_metadata
>     do_kernel_checkout before do_compile
>      addtask validate_branches before do_patch after do_kernel_checkout
>      addtask kernel_configcheck after do_configure before do_compile
>     +
>     +inherit ptest
>     +SRC_URI_append = " file://run-ptest \
>     +"
>     +do_install_ptest_append() {
>     +       install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
>     +}
>     +KERNEL_FEATURES_append = "
>     ${@bb.utils.contains("DISTRO_FEATURES", "ptest",
>     "features/kernel-sample/kernel-sample.scc", "", d)}"
>     diff --git a/meta/recipes-kernel/linux/linux-yocto_4.14.bb
>     <http://linux-yocto_4.14.bb>
>     b/meta/recipes-kernel/linux/linux-yocto_4.14.bb
>     <http://linux-yocto_4.14.bb>
>     index 16142f8..7002693 100644
>     --- a/meta/recipes-kernel/linux/linux-yocto_4.14.bb
>     <http://linux-yocto_4.14.bb>
>     +++ b/meta/recipes-kernel/linux/linux-yocto_4.14.bb
>     <http://linux-yocto_4.14.bb>
>     @@ -19,7 +19,7 @@ SRCREV_machine_qemux86 ?=
>     "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
>      SRCREV_machine_qemux86-64 ?=
>     "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
>      SRCREV_machine_qemumips64 ?=
>     "9863b327e770b42b8c18da3e0cfaf06e8f99ae97"
>      SRCREV_machine ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
>     -SRCREV_meta ?= "ea9330894eea727bd1655569b16f338976b72563"
>     +SRCREV_meta ?= "53336e1b7d969f21d8214ec9ceeb48fba4f99372"
>
>
> Do not bump the SRCREV for meta in this series.

Ok.

>
> If your feature depends on something in the meta branch (which it 
> does), wait until I've sent my next series before sending this.
>
> Bruce
>
>
>      SRC_URI =
>     "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}
>     <http://git.yoctoproject.org/linux-yocto.git;name=machine;branch=$%7BKBRANCH%7D>;
>     \
>                
>     git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}
>     <http://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=$%7BKMETA%7D>"
>     -- 
>     2.7.4
>
>     -- 
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>     <http://lists.openembedded.org/mailman/listinfo/openembedded-core>
>
>
>
>
> -- 
> "Thou shalt not follow the NULL pointer, for chaos and madness await 
> thee at its end"


[-- Attachment #2: Type: text/html, Size: 16713 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] linux-yocto: add ptest support
  2018-05-31 14:08     ` lei yang
@ 2018-06-01  7:55       ` Dengke Du
  0 siblings, 0 replies; 7+ messages in thread
From: Dengke Du @ 2018-06-01  7:55 UTC (permalink / raw)
  To: lei yang, Bruce Ashfield; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 9412 bytes --]



On 2018年05月31日 22:08, lei yang wrote:
>
> hi dengke,
>
> some of the kernel modules were rmmod-ed twice, some of them forget to 
> be rmmod-ed when it fails,
>
> please take a look.
>

Thanks, after bruce update the SRCREV for kernel meta, I will send v2.

> Lei
>
>
>
> On 2018年05月31日 12:19, Bruce Ashfield wrote:
>>
>>
>> On Wed, May 30, 2018 at 11:08 PM, Dengke Du <dengke.du@windriver.com 
>> <mailto:dengke.du@windriver.com>> wrote:
>>
>>     Signed-off-by: Dengke Du <dengke.du@windriver.com
>>     <mailto:dengke.du@windriver.com>>
>>     ---
>>      meta/recipes-kernel/linux/files/run-ptest    | 138
>>     ++++++++++++++++++++++++++
>>
>>
>> Nothing else in linux-yocto uses "files", and this shouldn't either.
>>
>> We can't guarantee that these are version independent, so they need 
>> to be in  a versioned
>> kernel subdirectory.
>>
>>      meta/recipes-kernel/linux/linux-yocto.inc    |   8 ++
>>      meta/recipes-kernel/linux/linux-yocto_4.14.bb
>>     <http://linux-yocto_4.14.bb> |   2 +-
>>      3 files changed, 147 insertions(+), 1 deletion(-)
>>      create mode 100644 meta/recipes-kernel/linux/files/run-ptest
>>
>>     diff --git a/meta/recipes-kernel/linux/files/run-ptest
>>     b/meta/recipes-kernel/linux/files/run-ptest
>>     new file mode 100644
>>     index 0000000..a3d9e14
>>     --- /dev/null
>>     +++ b/meta/recipes-kernel/linux/files/run-ptest
>>     @@ -0,0 +1,138 @@
>>     +#!/bin/bash
>>
>>
>> This script should have a license and proper header file.
>>
>> Also, if the ptests are mainly trace/sample related, name the script 
>> to indicate that.
>>
>> The kernel already has a significant number of selftests, which are 
>> likely better than
>> these ptests. Is there any reason why they aren't being used instead ?
>>
>>     +depmod
>>     +touch kernel.log
>>     +
>>     +#dma-example bytestream-example inttype-example record-example
>>     +list1=("dma-example" "bytestream-example" "inttype-example"
>>     "record-example")
>>     +for i in "${list1[@]}"
>>     +do
>>     +  dmesg -c
>>     +  modprobe "$i"
>>     +  result=""
>>     +  IFS="-" read -ra array <<< "$i"
>>     +  len=${#array[@]}
>>     +  if [ $len -eq 2 ];then
>>     +    result="${array[0]}_${array[1]}"
>>     +  elif [ $len -eq 3 ];then
>>     +    result="${array[0]}_${array[1]}_${array[2]}"
>>     +  fi
>>     +  lsmod | grep -q "$result"
>>     +  if [ $? -eq 0 ];then
>>     +    dmesg | grep "test passed"
>>     +    if [ $? -eq 0 ];then
>>     +      echo "$i: PASS" >> kernel.log
>>     +    fi
>>     +    rmmod "$i"
>>     +  else
>>     +    echo "$i: FAILED" >> kernel.log
>>     +  fi
>>     +done
>>     +
>>     +#kobject-example kset-example
>>     +list2=("kobject-example" "kset-example")
>>     +for i in "${list2[@]}"
>>     +do
>>     +  dmesg -c
>>     +  modprobe "$i"
>>     +  result=""
>>     +  IFS="-" read -ra array <<< "$i"
>>     +  len=${#array[@]}
>>     +  if [ $len -eq 2 ];then
>>     +    result="${array[0]}_${array[1]}"
>>     +  elif [ $len -eq 3 ];then
>>     +    result="${array[0]}_${array[1]}_${array[2]}"
>>     +  fi
>>     +  basedir="/sys/kernel/${result}"
>>     +  echo "$basedir"
>>     +  if [ -e ${basedir}/bar -a -e ${basedir}/baz -a -e
>>     ${basedir}/foo ];then
>>     +    echo "$i: PASS" >> kernel.log
>>     +    rmmod "$i"
>>     +  else
>>     +    echo "$i: FAILED" >> kernel.log
>>     +  fi
>>     +done
>>     +
>>     +#trace-events-sample
>>     +list3="trace-events-sample"
>>     +result=""
>>     +IFS="-" read -ra array <<< "$list3"
>>     +len=${#array[@]}
>>     +if [ $len -eq 2 ];then
>>     +  result="${array[0]}_${array[1]}"
>>     +elif [ $len -eq 3 ];then
>>     +  result="${array[0]}_${array[1]}_${array[2]}"
>>     +fi
>>     +modprobe "$list3"
>>     +lsmod | grep "$result"
>>     +if [ $? -eq 0 ];then
>>     +  if [ -e "/sys/kernel/debug/tracing/events/sample-trace" ];then
>>     +    echo 1 > /sys/kernel/debug/tracing/events/sample-trace/enable
>>     +    sleep 5
>>     +    ret=`cat /sys/kernel/debug/tracing/trace | grep hello | head
>>     -n1 | cut -d':' -f2`
>>     +    if [ "$ret" = " foo_bar" ];then
>>     +      echo "$list3: PASS"  >> kernel.log
>>     +    else
>>     +      echo "$list3: FAILED-" >> kernel.log
>>     +    fi
>>     +  else
>>     +    echo "$list3: FAILED--" >> kernel.log
>>     +  fi
>>     +else
>>     +  echo "$list3: FAILED---" >> kernel.log
>>     +fi
>>     +rmmod "$list3"
>>     +
>>     +#trace-printk
>>     +list4="trace-printk"
>>     +modprobe "$list4"
>>     +lsmod | grep "trace_printk"
>>     +if [ $? -eq 0 ];then
>>     +  ret=`cat /sys/kernel/debug/tracing/trace | grep trace_printk |
>>     head -n1 | cut -d':' -f2`
>>     +  if [ "$ret" = " trace_printk_irq_work" ];then
>>     +    echo "$list4: PASS" >> kernel.log
>>     +    rmmod "$list4"
>>     +  else
>>     +    echo "$list4: FAILED" >> kernel.log
>>     +  fi
>>     +else
>>     +  echo "$list4: FAILED" >> kernel.log
>>     +fi
>>     +rmmod "$list4"
>>     +
>>     +#kprobe_example
>>     +list5="kprobe_example"
>>     +dmesg -c
>>     +modprobe "$list5"
>>     +lsmod | grep "$list5"
>>     +if [ $? -eq 0 ];then
>>     +  dmesg | grep "_do_fork"
>>     +  if [ $? -eq 0 ];then
>>     +    echo "$list5: PASS" >> kernel.log
>>     +  else
>>     +    echo "$list5: FAILED" >> kernel.log
>>     +  fi
>>     +else
>>     +  echo "$list5: FAILED" >> kernel.log
>>     +fi
>>     +rmmod "$list5"
>>     +
>>     +#kretprobe_example
>>     +list6="kretprobe_example"
>>     +dmesg -c
>>     +modprobe "$list6"
>>     +lsmod | grep "$list6"
>>     +if [ $? -eq 0 ];then
>>     +  dmesg | grep "_do_fork returned"
>>     +  if [ $? -eq 0 ];then
>>     +    echo "$list6: PASS" >> kernel.log
>>     +  else
>>     +    echo "$list6: FAILED" >> kernel.log
>>     +  fi
>>     +else
>>     +  echo "$list6: FAILED" >> kernel.log
>>     +fi
>>     +rmmod "$list6"
>>     +
>>     +echo "#####result#####"
>>     +cat kernel.log
>>     +rm kernel.log
>>     diff --git a/meta/recipes-kernel/linux/linux-yocto.inc
>>     b/meta/recipes-kernel/linux/linux-yocto.inc
>>     index 95ec2a2..7e1773e 100644
>>     --- a/meta/recipes-kernel/linux/linux-yocto.inc
>>     +++ b/meta/recipes-kernel/linux/linux-yocto.inc
>>     @@ -67,3 +67,11 @@ do_install_append(){
>>      addtask kernel_version_sanity_check after do_kernel_metadata
>>     do_kernel_checkout before do_compile
>>      addtask validate_branches before do_patch after do_kernel_checkout
>>      addtask kernel_configcheck after do_configure before do_compile
>>     +
>>     +inherit ptest
>>     +SRC_URI_append = " file://run-ptest \
>>     +"
>>     +do_install_ptest_append() {
>>     +       install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
>>     +}
>>     +KERNEL_FEATURES_append = "
>>     ${@bb.utils.contains("DISTRO_FEATURES", "ptest",
>>     "features/kernel-sample/kernel-sample.scc", "", d)}"
>>     diff --git a/meta/recipes-kernel/linux/linux-yocto_4.14.bb
>>     <http://linux-yocto_4.14.bb>
>>     b/meta/recipes-kernel/linux/linux-yocto_4.14.bb
>>     <http://linux-yocto_4.14.bb>
>>     index 16142f8..7002693 100644
>>     --- a/meta/recipes-kernel/linux/linux-yocto_4.14.bb
>>     <http://linux-yocto_4.14.bb>
>>     +++ b/meta/recipes-kernel/linux/linux-yocto_4.14.bb
>>     <http://linux-yocto_4.14.bb>
>>     @@ -19,7 +19,7 @@ SRCREV_machine_qemux86 ?=
>>     "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
>>      SRCREV_machine_qemux86-64 ?=
>>     "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
>>      SRCREV_machine_qemumips64 ?=
>>     "9863b327e770b42b8c18da3e0cfaf06e8f99ae97"
>>      SRCREV_machine ?= "74f6cd2b6976e37491779fcb1bc4966d3a61492c"
>>     -SRCREV_meta ?= "ea9330894eea727bd1655569b16f338976b72563"
>>     +SRCREV_meta ?= "53336e1b7d969f21d8214ec9ceeb48fba4f99372"
>>
>>
>> Do not bump the SRCREV for meta in this series.
>>
>> If your feature depends on something in the meta branch (which it 
>> does), wait until I've sent my next series before sending this.
>>
>> Bruce
>>
>>
>>      SRC_URI =
>>     "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}
>>     <http://git.yoctoproject.org/linux-yocto.git;name=machine;branch=$%7BKBRANCH%7D>;
>>     \
>>                
>>     git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}
>>     <http://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=$%7BKMETA%7D>"
>>     -- 
>>     2.7.4
>>
>>     -- 
>>     _______________________________________________
>>     Openembedded-core mailing list
>>     Openembedded-core@lists.openembedded.org
>>     <mailto:Openembedded-core@lists.openembedded.org>
>>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>     <http://lists.openembedded.org/mailman/listinfo/openembedded-core>
>>
>>
>>
>>
>> -- 
>> "Thou shalt not follow the NULL pointer, for chaos and madness await 
>> thee at its end"
>>
>>
>


[-- Attachment #2: Type: text/html, Size: 16589 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] linux-yocto: add ptest support
  2018-06-01  7:52     ` Dengke Du
@ 2018-06-03 16:08       ` Richard Purdie
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2018-06-03 16:08 UTC (permalink / raw)
  To: Dengke Du, Bruce Ashfield; +Cc: Patches and discussions about the oe-core layer

On Fri, 2018-06-01 at 15:52 +0800, Dengke Du wrote:
> 
> 
> On 2018年05月31日 12:19, Bruce Ashfield wrote:
> > 
> > On Wed, May 30, 2018 at 11:08 PM, Dengke Du <dengke.du@windriver.co
> > m> wrote:
> > > Signed-off-by: Dengke Du <dengke.du@windriver.com>
> > > ---
> > >  meta/recipes-kernel/linux/files/run-ptest     | 138
> > > ++++++++++++++++++++++++++
> > > 
> > 
> > Nothing else in linux-yocto uses "files", and this shouldn't
> > either.
> > 
> > We can't guarantee that these are version independent, so they need
> > to be in  a versioned
> > kernel subdirectory.
>  
> Ok, I will put it in versioned kernel subdirectory.

It doesn't have to be versioned, it can be "linux-yocto" if it really
isn't version specific. It really shouldn't be "files" though.

Cheers,

Richard


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-06-03 16:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-31  3:08 [PATCH 0/1] linux-yocto: add ptest support Dengke Du
2018-05-31  3:08 ` [PATCH 1/1] " Dengke Du
2018-05-31  4:19   ` Bruce Ashfield
2018-05-31 14:08     ` lei yang
2018-06-01  7:55       ` Dengke Du
2018-06-01  7:52     ` Dengke Du
2018-06-03 16:08       ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.