All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] lkp: add initial opensuse support
@ 2017-01-06 19:06 Luis R. Rodriguez
  2017-01-06 19:06 ` [PATCH 1/4] lib/install.sh: fix shell adapt_packages() Luis R. Rodriguez
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Luis R. Rodriguez @ 2017-01-06 19:06 UTC (permalink / raw)
  To: lkp

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

I received a failed test results notice from 0-day LKP test suite
using trinity, however it was pretty hard to get reproduce given
the LKP did not have OpenSUSE support to start off with, but the
second issue I've stubmled upon is beyond me -- running either:

./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script

or

lkp qemu jobs/trinity.yaml 

ends up creating calling a few subroutines or files which are
clearly not present, then tries to create a cpio archive but
clearly there are a few files which LKP tree expects you to have
and are not present such as lkp and lkp/scheduled.

This is a run on OpenSUSE, first we install the dependencies for
trinity.yaml deps:

 # lkp install jobs/trinity.yaml 

Then we try to run it:

 # lkp qemu jobs/trinity.yaml 
jobs/trinity.yaml: line 1: suite:: command not found
jobs/trinity.yaml: line 2: testcase:: command not found
jobs/trinity.yaml: line 4: runtime:: command not found
jobs/trinity.yaml: line 6: kmsg:: command not found
jobs/trinity.yaml: line 7: rootfs:: command not found
jobs/trinity.yaml: line 9: trinity:: command not found
make: Entering directory '/home/mcgrof/devel/lkp-tests/bin/event'
klcc    -c -o wakeup.o wakeup.c
klcc  -static -o wakeup wakeup.o
rm -f wakeup.o
strip wakeup
make: Leaving directory '/home/mcgrof/devel/lkp-tests/bin/event'
cpio: lkp: Cannot stat: No such file or directory
cpio: lkp/scheduled: Cannot stat: No such file or directory
cpio: blank line ignored
cpio: File /dev/mqueue/���� shrunk by 20 bytes, padding with zeros

This never complets, it just sits there.

Either way these patches help start to add OpenSUSE support.

Luis R. Rodriguez (4):
  lib/install.sh: fix shell adapt_packages()
  distro: add initial opensuse support
  lib/install.*: make package dependency list uniq
  .gitignore: add bin/event/wakeup

 .gitignore                  |  1 +
 README.md                   | 22 ++++++++++++++++++++++
 distro/adaptation/archlinux |  2 +-
 distro/adaptation/fedora    |  2 +-
 distro/adaptation/opensuse  | 14 ++++++++++++++
 distro/depends/lkp-dev      |  4 ++++
 distro/installer/opensuse   |  3 +++
 lib/install.rb              |  2 +-
 lib/install.sh              | 14 +++++++++++---
 9 files changed, 58 insertions(+), 6 deletions(-)
 create mode 100644 distro/adaptation/opensuse
 create mode 100755 distro/installer/opensuse

-- 
2.11.0


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

* [PATCH 1/4] lib/install.sh: fix shell adapt_packages()
  2017-01-06 19:06 [PATCH 0/4] lkp: add initial opensuse support Luis R. Rodriguez
@ 2017-01-06 19:06 ` Luis R. Rodriguez
  2017-01-09  7:39   ` Ye Xiaolong
  2017-01-06 19:06 ` [PATCH 2/4] distro: add initial opensuse support Luis R. Rodriguez
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Luis R. Rodriguez @ 2017-01-06 19:06 UTC (permalink / raw)
  To: lkp

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

There are only a few packages with architecture specific
annotations right now, they all use a :i386 postfix. The
current ruby adapt_packages() works well, however on shell,
the distro_pkg=${mapping#$pkg:} does not work as well as
Ruby's array use and find. Furthermore the bash implementation
allows a final grep to end up giving you more than one package,
so if you have libc-dev but a distro mapping file has a mapping
for both libc-dev and libc-dev:i386 we'd end up with both
mappings. Lastly the mapping for architectures simply does
not work...

Fix this for now by modifying the shell implementation of
adapt_packages() to check if a package we are going to
query is architecture specific or not, and as a general
rule for now just require non-arch packages to go first,
while arch packages go last. The awk query is much better
and will do what we expected.

Long term we should just modify the distro/adaptation/*
files to use a delimiter which can never be part of a package
name, for instance using the pipe "|". That would allow us to
get rid of this small cruft on the bash implementation and
enable both bash and ruby implementations to match much closely.

Since we are sticking to a rule for now of having the arch
packages go last modify the few archs which do have these
mappings to match this rule.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
 distro/adaptation/archlinux |  2 +-
 distro/adaptation/fedora    |  2 +-
 distro/depends/lkp-dev      |  4 ++++
 lib/install.sh              | 10 ++++++++--
 4 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/distro/adaptation/archlinux b/distro/adaptation/archlinux
index dd8b4ab5967f..0a4ecd5c6d4d 100644
--- a/distro/adaptation/archlinux
+++ b/distro/adaptation/archlinux
@@ -66,6 +66,6 @@ xfslibs-dev: xfsprogs
 libattr1-dev: attr
 libacl1-dev: acl
 libc-dev:i386:
-linux-libc-dev:i386:
 linux-libc-dev:
+linux-libc-dev:i386:
 libklibc-dev:
diff --git a/distro/adaptation/fedora b/distro/adaptation/fedora
index a56ed9d0b870..b3ad3fbcdf20 100644
--- a/distro/adaptation/fedora
+++ b/distro/adaptation/fedora
@@ -69,6 +69,6 @@ libreadline5:
 libtool-bin:
 libnuma-dev: numactl-devel
 libc-dev:i386:
-linux-libc-dev:i386:
 linux-libc-dev:
+linux-libc-dev:i386:
 libklibc-dev:
diff --git a/distro/depends/lkp-dev b/distro/depends/lkp-dev
index 70f3c731787e..f3f27f73a965 100644
--- a/distro/depends/lkp-dev
+++ b/distro/depends/lkp-dev
@@ -1,3 +1,7 @@
+# Put architecture packages after the non architecture specific
+# package. We can change this requiremet if we modify
+# distro/adaptation/* files to use something uniq that is not
+# part of real packages, like: |
 make
 automake
 gcc
diff --git a/lib/install.sh b/lib/install.sh
index d4f8c1feab37..0957f13c9937 100755
--- a/lib/install.sh
+++ b/lib/install.sh
@@ -33,9 +33,15 @@ adapt_packages()
 
 	for pkg in $generic_packages
 	do
-		local mapping="$(grep "^$pkg:" $distro_file)"
+		local mapping=""
+		local is_arch_dep="$(echo $pkg | grep ":")"
+		if [ -n "$is_arch_dep" ]; then
+			mapping="$(grep "^$pkg:" $distro_file | tail -1)"
+		else
+			mapping="$(grep "^$pkg:" $distro_file | head -1)"
+		fi
 		if [ -n "$mapping" ]; then
-			distro_pkg=${mapping#$pkg:}
+			distro_pkg=$(echo $mapping | awk -F": " '{print $2}')
 			[ -n "$distro_pkg" ] && echo $distro_pkg
 		else
 			echo $pkg
-- 
2.11.0


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

* [PATCH 2/4] distro: add initial opensuse support
  2017-01-06 19:06 [PATCH 0/4] lkp: add initial opensuse support Luis R. Rodriguez
  2017-01-06 19:06 ` [PATCH 1/4] lib/install.sh: fix shell adapt_packages() Luis R. Rodriguez
@ 2017-01-06 19:06 ` Luis R. Rodriguez
  2017-01-09  7:40   ` Ye Xiaolong
  2017-01-06 19:06 ` [PATCH 3/4] lib/install.*: make package dependency list uniq Luis R. Rodriguez
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Luis R. Rodriguez @ 2017-01-06 19:06 UTC (permalink / raw)
  To: lkp

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

Tested with:

export LKP_SRC=$PWD
export PATH=$PATH:$LKP_SRC/bin
lkp install jobs/trinity.yaml

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
 README.md                  | 22 ++++++++++++++++++++++
 distro/adaptation/opensuse | 14 ++++++++++++++
 distro/installer/opensuse  |  3 +++
 lib/install.sh             |  2 ++
 4 files changed, 41 insertions(+)
 create mode 100644 distro/adaptation/opensuse
 create mode 100755 distro/installer/opensuse

diff --git a/README.md b/README.md
index 8031c867c0af..b45a3f6bb91f 100644
--- a/README.md
+++ b/README.md
@@ -50,4 +50,26 @@ Most test cases should install/run well in
 - Ubuntu 14.04
 - Archlinux
 
+There is however some initial support for:
+
+- OpenSUSE:
+	- jobs/trinity.yaml
+- Fedora
+
 As for now, lkp-tests still needs to run as root.
+
+## Adding distribution support
+
+If you want to add support for your Linux distribution you will need
+an installer file which allows us to install dependencies per job. For
+examples look at: distro/installer/* files.
+
+Since packages can have different names we provide an adaptation mapping for a
+base Ubuntu package (since development started with that) to your own
+distribution package name, for example adaptation files see:
+distro/adaptation/*. For now adaptation files must have the architecture
+dependent packages (ie, that ends with the postfix :i386) towards the end
+of the adaptation file.
+
+You will also want to add a case for your distribution on sync_distro_sources()
+on the file lib/install.sh.
diff --git a/distro/adaptation/opensuse b/distro/adaptation/opensuse
new file mode 100644
index 000000000000..c4543bf92b66
--- /dev/null
+++ b/distro/adaptation/opensuse
@@ -0,0 +1,14 @@
+# Go get it yourself:
+# https://github.com/schacon/ruby-git
+# We have no package for it yet
+ruby-git:
+linux-libc-dev: glibc-devel
+linux-perf: perf
+build-essential:
+libc6-dev: glibc-devel
+libc6-dev:i386: glibc-devel-32bit
+libc-dev: glibc-devel
+libc-dev:i386: glibc-devel-32bit
+linux-libc-dev: glibc-devel
+linux-libc-dev:i386: glibc-devel-32bit
+libklibc-dev:
diff --git a/distro/installer/opensuse b/distro/installer/opensuse
new file mode 100755
index 000000000000..a909f3e39c05
--- /dev/null
+++ b/distro/installer/opensuse
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+sudo zypper install -y $*
diff --git a/lib/install.sh b/lib/install.sh
index 0957f13c9937..0b090f8b82bf 100755
--- a/lib/install.sh
+++ b/lib/install.sh
@@ -17,6 +17,8 @@ sync_distro_sources()
 			yum update
 		fi ;;
 	archlinux) yaourt -Sy ;;
+	opensuse)
+		zypper update ;;
 	*) echo "Not support $distro to do update" ;;
 	esac
 }
-- 
2.11.0


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

* [PATCH 3/4] lib/install.*: make package dependency list uniq
  2017-01-06 19:06 [PATCH 0/4] lkp: add initial opensuse support Luis R. Rodriguez
  2017-01-06 19:06 ` [PATCH 1/4] lib/install.sh: fix shell adapt_packages() Luis R. Rodriguez
  2017-01-06 19:06 ` [PATCH 2/4] distro: add initial opensuse support Luis R. Rodriguez
@ 2017-01-06 19:06 ` Luis R. Rodriguez
  2017-01-09  7:40   ` Ye Xiaolong
  2017-01-06 19:06 ` [PATCH 4/4] .gitignore: add bin/event/wakeup Luis R. Rodriguez
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Luis R. Rodriguez @ 2017-01-06 19:06 UTC (permalink / raw)
  To: lkp

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

This provides a small optimization to reduce the list of
package dependencies we give back to the distribution installer
by making the list uniq. Since bash is rather stupid we need to
first sort the list prior to passing it to sort.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
 lib/install.rb | 2 +-
 lib/install.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/install.rb b/lib/install.rb
index 63b11ad1a5b2..8f40e3e902bc 100755
--- a/lib/install.rb
+++ b/lib/install.rb
@@ -31,5 +31,5 @@ def get_dependency_packages(distro, script)
 
 	packages = adapt_packages(distro, generic_packages)
 
-	return packages.flatten.compact
+	return packages.flatten.compact.uniq
 end
diff --git a/lib/install.sh b/lib/install.sh
index 0b090f8b82bf..cb9a8d0ea530 100755
--- a/lib/install.sh
+++ b/lib/install.sh
@@ -61,5 +61,5 @@ get_dependency_packages()
 
 	local generic_packages="$(sed 's/#.*//' "$base_file")"
 
-	adapt_packages
+	adapt_packages | sort | uniq
 }
-- 
2.11.0


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

* [PATCH 4/4] .gitignore: add bin/event/wakeup
  2017-01-06 19:06 [PATCH 0/4] lkp: add initial opensuse support Luis R. Rodriguez
                   ` (2 preceding siblings ...)
  2017-01-06 19:06 ` [PATCH 3/4] lib/install.*: make package dependency list uniq Luis R. Rodriguez
@ 2017-01-06 19:06 ` Luis R. Rodriguez
  2017-01-09  7:40   ` Ye Xiaolong
  2017-01-06 19:58 ` [PATCH 0/4] lkp: add initial opensuse support Luis R. Rodriguez
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Luis R. Rodriguez @ 2017-01-06 19:06 UTC (permalink / raw)
  To: lkp

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

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 56c20bff3d8f..d08002fb70fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ update
 deploy
 Gemfile
 Gemfile.lock
+bin/event/wakeup
-- 
2.11.0


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

* Re: [PATCH 0/4] lkp: add initial opensuse support
  2017-01-06 19:06 [PATCH 0/4] lkp: add initial opensuse support Luis R. Rodriguez
                   ` (3 preceding siblings ...)
  2017-01-06 19:06 ` [PATCH 4/4] .gitignore: add bin/event/wakeup Luis R. Rodriguez
@ 2017-01-06 19:58 ` Luis R. Rodriguez
  2017-01-09  7:49 ` Ye Xiaolong
  2017-01-09  8:48 ` [PATCH 0/4] lkp: add initial opensuse support Philip Li
  6 siblings, 0 replies; 18+ messages in thread
From: Luis R. Rodriguez @ 2017-01-06 19:58 UTC (permalink / raw)
  To: lkp

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

On Fri, Jan 6, 2017 at 1:06 PM, Luis R. Rodriguez <mcgrof@kernel.org> wrote:
> I received a failed test results notice from 0-day LKP test suite
> using trinity, however it was pretty hard to get reproduce given
> the LKP did not have OpenSUSE support to start off with, but the
> second issue I've stubmled upon is beyond me -- running either:
>
> ./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script
>
> or
>
> lkp qemu jobs/trinity.yaml
>
> ends up creating calling a few subroutines or files which are
> clearly not present, then tries to create a cpio archive but
> clearly there are a few files which LKP tree expects you to have
> and are not present such as lkp and lkp/scheduled.
>
> This is a run on OpenSUSE, first we install the dependencies for
> trinity.yaml deps:
>
>  # lkp install jobs/trinity.yaml
>
> Then we try to run it:
>
>  # lkp qemu jobs/trinity.yaml
> jobs/trinity.yaml: line 1: suite:: command not found
> jobs/trinity.yaml: line 2: testcase:: command not found
> jobs/trinity.yaml: line 4: runtime:: command not found
> jobs/trinity.yaml: line 6: kmsg:: command not found
> jobs/trinity.yaml: line 7: rootfs:: command not found
> jobs/trinity.yaml: line 9: trinity:: command not found
> make: Entering directory '/home/mcgrof/devel/lkp-tests/bin/event'
> klcc    -c -o wakeup.o wakeup.c
> klcc  -static -o wakeup wakeup.o
> rm -f wakeup.o
> strip wakeup
> make: Leaving directory '/home/mcgrof/devel/lkp-tests/bin/event'
> cpio: lkp: Cannot stat: No such file or directory
> cpio: lkp/scheduled: Cannot stat: No such file or directory
> cpio: blank line ignored
> cpio: File /dev/mqueue/���� shrunk by 20 bytes, padding with zeros
>
> This never complets, it just sits there.

I just tried running all this on Debian and I run into the same exact
issue so as I suspected, this is not a distribution problem but rather
a bug in the code or some missing files in the repository:

# ./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script
or
# ./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage jobs/trinity.yaml

yields:


The approx. disk space requirements are

10M             simple boot test in rootfs openwrt
50M             simple boot test in rootfs debian
1G              plan to run a number of different tests
100G or more    IO tests

Please enter a dir with enough disk space, or simply press Enter to
accept the default.
You may still symlink /root/.lkp to a more suitable place in future.
/root/.lkp =>
job-script: line 2: $'\r': command not found
job-script: line 3: syntax error near unexpected token `$'\r''
'ob-script: line 3: `export_top_env()
make: Entering directory '/home/mcgrof/devel/lkp-tests/bin/event'
klcc  -static -o wakeup wakeup.o
rm -f wakeup.o
strip wakeup
make: Leaving directory '/home/mcgrof/devel/lkp-tests/bin/event'
cpio: root:lkp: invalid group
cpio: root:lkp: invalid group
gzip: /root/.lkp/cache/lkp-x86_64.cpio: No such file or directory
mv: cannot stat '/root/.lkp/cache/lkp-x86_64.cpio.gz': No such file or directory
mv: cannot stat '/root/.lkp/cache/lkp-x86_64.cgz': No such file or directory
cpio: lkp: Cannot stat: No such file or directory
cpio: lkp/scheduled: Cannot stat: No such file or directory
cpio: blank line ignored

And it just sits there without end.

  Luis

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

* Re: [PATCH 1/4] lib/install.sh: fix shell adapt_packages()
  2017-01-06 19:06 ` [PATCH 1/4] lib/install.sh: fix shell adapt_packages() Luis R. Rodriguez
@ 2017-01-09  7:39   ` Ye Xiaolong
  0 siblings, 0 replies; 18+ messages in thread
From: Ye Xiaolong @ 2017-01-09  7:39 UTC (permalink / raw)
  To: lkp

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

Reviewed-by: Ye Xiaolong <xiaolong.ye@intel.com>

Thanks,
Xiaolong

On 01/06, Luis R. Rodriguez wrote:
>There are only a few packages with architecture specific
>annotations right now, they all use a :i386 postfix. The
>current ruby adapt_packages() works well, however on shell,
>the distro_pkg=${mapping#$pkg:} does not work as well as
>Ruby's array use and find. Furthermore the bash implementation
>allows a final grep to end up giving you more than one package,
>so if you have libc-dev but a distro mapping file has a mapping
>for both libc-dev and libc-dev:i386 we'd end up with both
>mappings. Lastly the mapping for architectures simply does
>not work...
>
>Fix this for now by modifying the shell implementation of
>adapt_packages() to check if a package we are going to
>query is architecture specific or not, and as a general
>rule for now just require non-arch packages to go first,
>while arch packages go last. The awk query is much better
>and will do what we expected.
>
>Long term we should just modify the distro/adaptation/*
>files to use a delimiter which can never be part of a package
>name, for instance using the pipe "|". That would allow us to
>get rid of this small cruft on the bash implementation and
>enable both bash and ruby implementations to match much closely.
>
>Since we are sticking to a rule for now of having the arch
>packages go last modify the few archs which do have these
>mappings to match this rule.
>
>Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
>---
> distro/adaptation/archlinux |  2 +-
> distro/adaptation/fedora    |  2 +-
> distro/depends/lkp-dev      |  4 ++++
> lib/install.sh              | 10 ++++++++--
> 4 files changed, 14 insertions(+), 4 deletions(-)
>
>diff --git a/distro/adaptation/archlinux b/distro/adaptation/archlinux
>index dd8b4ab5967f..0a4ecd5c6d4d 100644
>--- a/distro/adaptation/archlinux
>+++ b/distro/adaptation/archlinux
>@@ -66,6 +66,6 @@ xfslibs-dev: xfsprogs
> libattr1-dev: attr
> libacl1-dev: acl
> libc-dev:i386:
>-linux-libc-dev:i386:
> linux-libc-dev:
>+linux-libc-dev:i386:
> libklibc-dev:
>diff --git a/distro/adaptation/fedora b/distro/adaptation/fedora
>index a56ed9d0b870..b3ad3fbcdf20 100644
>--- a/distro/adaptation/fedora
>+++ b/distro/adaptation/fedora
>@@ -69,6 +69,6 @@ libreadline5:
> libtool-bin:
> libnuma-dev: numactl-devel
> libc-dev:i386:
>-linux-libc-dev:i386:
> linux-libc-dev:
>+linux-libc-dev:i386:
> libklibc-dev:
>diff --git a/distro/depends/lkp-dev b/distro/depends/lkp-dev
>index 70f3c731787e..f3f27f73a965 100644
>--- a/distro/depends/lkp-dev
>+++ b/distro/depends/lkp-dev
>@@ -1,3 +1,7 @@
>+# Put architecture packages after the non architecture specific
>+# package. We can change this requiremet if we modify
>+# distro/adaptation/* files to use something uniq that is not
>+# part of real packages, like: |
> make
> automake
> gcc
>diff --git a/lib/install.sh b/lib/install.sh
>index d4f8c1feab37..0957f13c9937 100755
>--- a/lib/install.sh
>+++ b/lib/install.sh
>@@ -33,9 +33,15 @@ adapt_packages()
> 
> 	for pkg in $generic_packages
> 	do
>-		local mapping="$(grep "^$pkg:" $distro_file)"
>+		local mapping=""
>+		local is_arch_dep="$(echo $pkg | grep ":")"
>+		if [ -n "$is_arch_dep" ]; then
>+			mapping="$(grep "^$pkg:" $distro_file | tail -1)"
>+		else
>+			mapping="$(grep "^$pkg:" $distro_file | head -1)"
>+		fi
> 		if [ -n "$mapping" ]; then
>-			distro_pkg=${mapping#$pkg:}
>+			distro_pkg=$(echo $mapping | awk -F": " '{print $2}')
> 			[ -n "$distro_pkg" ] && echo $distro_pkg
> 		else
> 			echo $pkg
>-- 
>2.11.0
>

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

* Re: [PATCH 2/4] distro: add initial opensuse support
  2017-01-06 19:06 ` [PATCH 2/4] distro: add initial opensuse support Luis R. Rodriguez
@ 2017-01-09  7:40   ` Ye Xiaolong
  0 siblings, 0 replies; 18+ messages in thread
From: Ye Xiaolong @ 2017-01-09  7:40 UTC (permalink / raw)
  To: lkp

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

Reviewed-by: Ye Xiaolong <xiaolong.ye@intel.com>

Thanks,
Xiaolong

On 01/06, Luis R. Rodriguez wrote:
>Tested with:
>
>export LKP_SRC=$PWD
>export PATH=$PATH:$LKP_SRC/bin
>lkp install jobs/trinity.yaml
>
>Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
>---
> README.md                  | 22 ++++++++++++++++++++++
> distro/adaptation/opensuse | 14 ++++++++++++++
> distro/installer/opensuse  |  3 +++
> lib/install.sh             |  2 ++
> 4 files changed, 41 insertions(+)
> create mode 100644 distro/adaptation/opensuse
> create mode 100755 distro/installer/opensuse
>
>diff --git a/README.md b/README.md
>index 8031c867c0af..b45a3f6bb91f 100644
>--- a/README.md
>+++ b/README.md
>@@ -50,4 +50,26 @@ Most test cases should install/run well in
> - Ubuntu 14.04
> - Archlinux
> 
>+There is however some initial support for:
>+
>+- OpenSUSE:
>+	- jobs/trinity.yaml
>+- Fedora
>+
> As for now, lkp-tests still needs to run as root.
>+
>+## Adding distribution support
>+
>+If you want to add support for your Linux distribution you will need
>+an installer file which allows us to install dependencies per job. For
>+examples look at: distro/installer/* files.
>+
>+Since packages can have different names we provide an adaptation mapping for a
>+base Ubuntu package (since development started with that) to your own
>+distribution package name, for example adaptation files see:
>+distro/adaptation/*. For now adaptation files must have the architecture
>+dependent packages (ie, that ends with the postfix :i386) towards the end
>+of the adaptation file.
>+
>+You will also want to add a case for your distribution on sync_distro_sources()
>+on the file lib/install.sh.
>diff --git a/distro/adaptation/opensuse b/distro/adaptation/opensuse
>new file mode 100644
>index 000000000000..c4543bf92b66
>--- /dev/null
>+++ b/distro/adaptation/opensuse
>@@ -0,0 +1,14 @@
>+# Go get it yourself:
>+# https://github.com/schacon/ruby-git
>+# We have no package for it yet
>+ruby-git:
>+linux-libc-dev: glibc-devel
>+linux-perf: perf
>+build-essential:
>+libc6-dev: glibc-devel
>+libc6-dev:i386: glibc-devel-32bit
>+libc-dev: glibc-devel
>+libc-dev:i386: glibc-devel-32bit
>+linux-libc-dev: glibc-devel
>+linux-libc-dev:i386: glibc-devel-32bit
>+libklibc-dev:
>diff --git a/distro/installer/opensuse b/distro/installer/opensuse
>new file mode 100755
>index 000000000000..a909f3e39c05
>--- /dev/null
>+++ b/distro/installer/opensuse
>@@ -0,0 +1,3 @@
>+#!/bin/bash
>+
>+sudo zypper install -y $*
>diff --git a/lib/install.sh b/lib/install.sh
>index 0957f13c9937..0b090f8b82bf 100755
>--- a/lib/install.sh
>+++ b/lib/install.sh
>@@ -17,6 +17,8 @@ sync_distro_sources()
> 			yum update
> 		fi ;;
> 	archlinux) yaourt -Sy ;;
>+	opensuse)
>+		zypper update ;;
> 	*) echo "Not support $distro to do update" ;;
> 	esac
> }
>-- 
>2.11.0
>

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

* Re: [PATCH 3/4] lib/install.*: make package dependency list uniq
  2017-01-06 19:06 ` [PATCH 3/4] lib/install.*: make package dependency list uniq Luis R. Rodriguez
@ 2017-01-09  7:40   ` Ye Xiaolong
  0 siblings, 0 replies; 18+ messages in thread
From: Ye Xiaolong @ 2017-01-09  7:40 UTC (permalink / raw)
  To: lkp

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

Reviewed-by: Ye Xiaolong <xiaolong.ye@intel.com>

Thanks,
Xiaolong

On 01/06, Luis R. Rodriguez wrote:
>This provides a small optimization to reduce the list of
>package dependencies we give back to the distribution installer
>by making the list uniq. Since bash is rather stupid we need to
>first sort the list prior to passing it to sort.
>
>Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
>---
> lib/install.rb | 2 +-
> lib/install.sh | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/lib/install.rb b/lib/install.rb
>index 63b11ad1a5b2..8f40e3e902bc 100755
>--- a/lib/install.rb
>+++ b/lib/install.rb
>@@ -31,5 +31,5 @@ def get_dependency_packages(distro, script)
> 
> 	packages = adapt_packages(distro, generic_packages)
> 
>-	return packages.flatten.compact
>+	return packages.flatten.compact.uniq
> end
>diff --git a/lib/install.sh b/lib/install.sh
>index 0b090f8b82bf..cb9a8d0ea530 100755
>--- a/lib/install.sh
>+++ b/lib/install.sh
>@@ -61,5 +61,5 @@ get_dependency_packages()
> 
> 	local generic_packages="$(sed 's/#.*//' "$base_file")"
> 
>-	adapt_packages
>+	adapt_packages | sort | uniq
> }
>-- 
>2.11.0
>

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

* Re: [PATCH 4/4] .gitignore: add bin/event/wakeup
  2017-01-06 19:06 ` [PATCH 4/4] .gitignore: add bin/event/wakeup Luis R. Rodriguez
@ 2017-01-09  7:40   ` Ye Xiaolong
  0 siblings, 0 replies; 18+ messages in thread
From: Ye Xiaolong @ 2017-01-09  7:40 UTC (permalink / raw)
  To: lkp

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

Reviewed-by: Ye Xiaolong <xiaolong.ye@intel.com>

Thanks,
Xiaolong

On 01/06, Luis R. Rodriguez wrote:
>Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
>---
> .gitignore | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/.gitignore b/.gitignore
>index 56c20bff3d8f..d08002fb70fa 100644
>--- a/.gitignore
>+++ b/.gitignore
>@@ -2,3 +2,4 @@ update
> deploy
> Gemfile
> Gemfile.lock
>+bin/event/wakeup
>-- 
>2.11.0
>

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

* Re: [PATCH 0/4] lkp: add initial opensuse support
  2017-01-06 19:06 [PATCH 0/4] lkp: add initial opensuse support Luis R. Rodriguez
                   ` (4 preceding siblings ...)
  2017-01-06 19:58 ` [PATCH 0/4] lkp: add initial opensuse support Luis R. Rodriguez
@ 2017-01-09  7:49 ` Ye Xiaolong
  2017-01-09 14:26   ` Luis R. Rodriguez
  2017-01-09  8:48 ` [PATCH 0/4] lkp: add initial opensuse support Philip Li
  6 siblings, 1 reply; 18+ messages in thread
From: Ye Xiaolong @ 2017-01-09  7:49 UTC (permalink / raw)
  To: lkp

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

Hi, Luis

On 01/06, Luis R. Rodriguez wrote:
>I received a failed test results notice from 0-day LKP test suite
>using trinity, however it was pretty hard to get reproduce given
>the LKP did not have OpenSUSE support to start off with, but the
>second issue I've stubmled upon is beyond me -- running either:
>
>./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script
>
>or
>
>lkp qemu jobs/trinity.yaml 
>
>ends up creating calling a few subroutines or files which are
>clearly not present, then tries to create a cpio archive but
>clearly there are a few files which LKP tree expects you to have
>and are not present such as lkp and lkp/scheduled.
>
>This is a run on OpenSUSE, first we install the dependencies for
>trinity.yaml deps:
>
> # lkp install jobs/trinity.yaml 
>
>Then we try to run it:
>
> # lkp qemu jobs/trinity.yaml 

Actually we don't use yaml file for lkp qemu, you could try "lkp run jobs/trinity.yaml"
instead.

Thanks,
Xiaolong

>jobs/trinity.yaml: line 1: suite:: command not found
>jobs/trinity.yaml: line 2: testcase:: command not found
>jobs/trinity.yaml: line 4: runtime:: command not found
>jobs/trinity.yaml: line 6: kmsg:: command not found
>jobs/trinity.yaml: line 7: rootfs:: command not found
>jobs/trinity.yaml: line 9: trinity:: command not found
>make: Entering directory '/home/mcgrof/devel/lkp-tests/bin/event'
>klcc    -c -o wakeup.o wakeup.c
>klcc  -static -o wakeup wakeup.o
>rm -f wakeup.o
>strip wakeup
>make: Leaving directory '/home/mcgrof/devel/lkp-tests/bin/event'
>cpio: lkp: Cannot stat: No such file or directory
>cpio: lkp/scheduled: Cannot stat: No such file or directory
>cpio: blank line ignored
>cpio: File /dev/mqueue/���� shrunk by 20 bytes, padding with zeros
>
>This never complets, it just sits there.
>
>Either way these patches help start to add OpenSUSE support.
>
>Luis R. Rodriguez (4):
>  lib/install.sh: fix shell adapt_packages()
>  distro: add initial opensuse support
>  lib/install.*: make package dependency list uniq
>  .gitignore: add bin/event/wakeup
>
> .gitignore                  |  1 +
> README.md                   | 22 ++++++++++++++++++++++
> distro/adaptation/archlinux |  2 +-
> distro/adaptation/fedora    |  2 +-
> distro/adaptation/opensuse  | 14 ++++++++++++++
> distro/depends/lkp-dev      |  4 ++++
> distro/installer/opensuse   |  3 +++
> lib/install.rb              |  2 +-
> lib/install.sh              | 14 +++++++++++---
> 9 files changed, 58 insertions(+), 6 deletions(-)
> create mode 100644 distro/adaptation/opensuse
> create mode 100755 distro/installer/opensuse
>
>-- 
>2.11.0
>

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

* Re: [PATCH 0/4] lkp: add initial opensuse support
  2017-01-06 19:06 [PATCH 0/4] lkp: add initial opensuse support Luis R. Rodriguez
                   ` (5 preceding siblings ...)
  2017-01-09  7:49 ` Ye Xiaolong
@ 2017-01-09  8:48 ` Philip Li
  6 siblings, 0 replies; 18+ messages in thread
From: Philip Li @ 2017-01-09  8:48 UTC (permalink / raw)
  To: lkp

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

On Fri, Jan 06, 2017 at 11:06:48AM -0800, Luis R. Rodriguez wrote:
> I received a failed test results notice from 0-day LKP test suite
> using trinity, however it was pretty hard to get reproduce given
> the LKP did not have OpenSUSE support to start off with, but the
> second issue I've stubmled upon is beyond me -- running either:
> 
> ./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script
> 
> or
> 
> lkp qemu jobs/trinity.yaml 
> 
> ends up creating calling a few subroutines or files which are
> clearly not present, then tries to create a cpio archive but
> clearly there are a few files which LKP tree expects you to have
> and are not present such as lkp and lkp/scheduled.
> 
> This is a run on OpenSUSE, first we install the dependencies for
> trinity.yaml deps:
> 
>  # lkp install jobs/trinity.yaml 
> 
> Then we try to run it:
> 
>  # lkp qemu jobs/trinity.yaml 
> jobs/trinity.yaml: line 1: suite:: command not found
> jobs/trinity.yaml: line 2: testcase:: command not found
> jobs/trinity.yaml: line 4: runtime:: command not found
> jobs/trinity.yaml: line 6: kmsg:: command not found
> jobs/trinity.yaml: line 7: rootfs:: command not found
> jobs/trinity.yaml: line 9: trinity:: command not found
> make: Entering directory '/home/mcgrof/devel/lkp-tests/bin/event'
> klcc    -c -o wakeup.o wakeup.c
> klcc  -static -o wakeup wakeup.o
> rm -f wakeup.o
> strip wakeup
> make: Leaving directory '/home/mcgrof/devel/lkp-tests/bin/event'
> cpio: lkp: Cannot stat: No such file or directory
> cpio: lkp/scheduled: Cannot stat: No such file or directory
> cpio: blank line ignored
> cpio: File /dev/mqueue/���� shrunk by 20 bytes, padding with zeros
> 
> This never complets, it just sits there.
> 
> Either way these patches help start to add OpenSUSE support.
> 
> Luis R. Rodriguez (4):
>   lib/install.sh: fix shell adapt_packages()
>   distro: add initial opensuse support
>   lib/install.*: make package dependency list uniq
>   .gitignore: add bin/event/wakeup

thanks a lot, all 4 patches applied

> 
>  .gitignore                  |  1 +
>  README.md                   | 22 ++++++++++++++++++++++
>  distro/adaptation/archlinux |  2 +-
>  distro/adaptation/fedora    |  2 +-
>  distro/adaptation/opensuse  | 14 ++++++++++++++
>  distro/depends/lkp-dev      |  4 ++++
>  distro/installer/opensuse   |  3 +++
>  lib/install.rb              |  2 +-
>  lib/install.sh              | 14 +++++++++++---
>  9 files changed, 58 insertions(+), 6 deletions(-)
>  create mode 100644 distro/adaptation/opensuse
>  create mode 100755 distro/installer/opensuse
> 
> -- 
> 2.11.0
> 

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

* Re: [PATCH 0/4] lkp: add initial opensuse support
  2017-01-09  7:49 ` Ye Xiaolong
@ 2017-01-09 14:26   ` Luis R. Rodriguez
  2017-01-10  2:11     ` Ye Xiaolong
  0 siblings, 1 reply; 18+ messages in thread
From: Luis R. Rodriguez @ 2017-01-09 14:26 UTC (permalink / raw)
  To: lkp

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

On Mon, Jan 09, 2017 at 03:49:14PM +0800, Ye Xiaolong wrote:
> Hi, Luis
> 
> On 01/06, Luis R. Rodriguez wrote:
> >I received a failed test results notice from 0-day LKP test suite
> >using trinity, however it was pretty hard to get reproduce given
> >the LKP did not have OpenSUSE support to start off with, but the
> >second issue I've stubmled upon is beyond me -- running either:
> >
> >./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script
> >
> >or
> >
> >lkp qemu jobs/trinity.yaml 
> >
> >ends up creating calling a few subroutines or files which are
> >clearly not present, then tries to create a cpio archive but
> >clearly there are a few files which LKP tree expects you to have
> >and are not present such as lkp and lkp/scheduled.
> >
> >This is a run on OpenSUSE, first we install the dependencies for
> >trinity.yaml deps:
> >
> > # lkp install jobs/trinity.yaml 
> >
> >Then we try to run it:
> >
> > # lkp qemu jobs/trinity.yaml 
> 
> Actually we don't use yaml file for lkp qemu, you could try "lkp run jobs/trinity.yaml"
> instead.

OK that runs, but that beats my actual machine with trinity, which is not
desirable. I am trying to reproduce a reported error caught by lpk tests
with trinity on my tree and that was with qemu. I have the job-script but
that produces the same error with missing files. Can you help me with that?

  Luis

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

* Re: [PATCH 0/4] lkp: add initial opensuse support
  2017-01-09 14:26   ` Luis R. Rodriguez
@ 2017-01-10  2:11     ` Ye Xiaolong
  2017-01-10 14:25       ` Luis R. Rodriguez
  0 siblings, 1 reply; 18+ messages in thread
From: Ye Xiaolong @ 2017-01-10  2:11 UTC (permalink / raw)
  To: lkp

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

On 01/09, Luis R. Rodriguez wrote:
>On Mon, Jan 09, 2017 at 03:49:14PM +0800, Ye Xiaolong wrote:
>> Hi, Luis
>> 
>> On 01/06, Luis R. Rodriguez wrote:
>> >I received a failed test results notice from 0-day LKP test suite
>> >using trinity, however it was pretty hard to get reproduce given
>> >the LKP did not have OpenSUSE support to start off with, but the
>> >second issue I've stubmled upon is beyond me -- running either:
>> >
>> >./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script
>> >
>> >or
>> >
>> >lkp qemu jobs/trinity.yaml 
>> >
>> >ends up creating calling a few subroutines or files which are
>> >clearly not present, then tries to create a cpio archive but
>> >clearly there are a few files which LKP tree expects you to have
>> >and are not present such as lkp and lkp/scheduled.
>> >
>> >This is a run on OpenSUSE, first we install the dependencies for
>> >trinity.yaml deps:
>> >
>> > # lkp install jobs/trinity.yaml 
>> >
>> >Then we try to run it:
>> >
>> > # lkp qemu jobs/trinity.yaml 
>> 
>> Actually we don't use yaml file for lkp qemu, you could try "lkp run jobs/trinity.yaml"
>> instead.
>
>OK that runs, but that beats my actual machine with trinity, which is not
>desirable. I am trying to reproduce a reported error caught by lpk tests
>with trinity on my tree and that was with qemu. I have the job-script but
>that produces the same error with missing files. Can you help me with that?

Sure, could you paste the exact error log when you tried
"./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script"?

Thanks,
Xiaolong
>
>  Luis

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

* Re: [PATCH 0/4] lkp: add initial opensuse support
  2017-01-10  2:11     ` Ye Xiaolong
@ 2017-01-10 14:25       ` Luis R. Rodriguez
  2017-01-11  1:52         ` Ye Xiaolong
  0 siblings, 1 reply; 18+ messages in thread
From: Luis R. Rodriguez @ 2017-01-10 14:25 UTC (permalink / raw)
  To: lkp

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

On Tue, Jan 10, 2017 at 10:11:57AM +0800, Ye Xiaolong wrote:
> On 01/09, Luis R. Rodriguez wrote:
> >On Mon, Jan 09, 2017 at 03:49:14PM +0800, Ye Xiaolong wrote:
> >> Hi, Luis
> >> 
> >> On 01/06, Luis R. Rodriguez wrote:
> >> >I received a failed test results notice from 0-day LKP test suite
> >> >using trinity, however it was pretty hard to get reproduce given
> >> >the LKP did not have OpenSUSE support to start off with, but the
> >> >second issue I've stubmled upon is beyond me -- running either:
> >> >
> >> >./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script

Note I had run the same command.

> >> >
> >> >or
> >> >
> >> >lkp qemu jobs/trinity.yaml 
> >> >
> >> >ends up creating calling a few subroutines or files which are
> >> >clearly not present, then tries to create a cpio archive but
> >> >clearly there are a few files which LKP tree expects you to have
> >> >and are not present such as lkp and lkp/scheduled.
> >> >
> >> >This is a run on OpenSUSE, first we install the dependencies for
> >> >trinity.yaml deps:
> >> >
> >> > # lkp install jobs/trinity.yaml 
> >> >
> >> >Then we try to run it:
> >> >
> >> > # lkp qemu jobs/trinity.yaml 
> >> 
> >> Actually we don't use yaml file for lkp qemu, you could try "lkp run jobs/trinity.yaml"
> >> instead.
> >
> >OK that runs, but that beats my actual machine with trinity, which is not
> >desirable. I am trying to reproduce a reported error caught by lpk tests
> >with trinity on my tree and that was with qemu. I have the job-script but
> >that produces the same error with missing files. Can you help me with that?
> 
> Sure, could you paste the exact error log when you tried
> "./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script"?

As I noted its the same exact output, but here it is again:

ergon:/home/mcgrof/devel/lkp-tests # export LKP_SRC=$PWD                                                     
ergon:/home/mcgrof/devel/lkp-tests # export PATH=$PATH:$LKP_SRC/bin 
ergon:/home/mcgrof/devel/lkp-tests # ./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script
job-script: line 2: $'\r': command not found
job-script: line 3: syntax error near unexpected token `$'\r''
'ob-script: line 3: `export_top_env()
make: Entering directory '/home/mcgrof/devel/lkp-tests/bin/event'
klcc    -c -o wakeup.o wakeup.c
klcc  -static -o wakeup wakeup.o
rm -f wakeup.o
strip wakeup
make: Leaving directory '/home/mcgrof/devel/lkp-tests/bin/event'
cpio: lkp: Cannot stat: No such file or directory
cpio: lkp/scheduled: Cannot stat: No such file or directory
cpio: blank line ignored
cpio: File /dev/mqueue/���� shrunk by 20 bytes, padding with zeros

  Luis

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

* Re: [PATCH 0/4] lkp: add initial opensuse support
  2017-01-10 14:25       ` Luis R. Rodriguez
@ 2017-01-11  1:52         ` Ye Xiaolong
  2017-01-11 14:34           ` Luis R. Rodriguez
  0 siblings, 1 reply; 18+ messages in thread
From: Ye Xiaolong @ 2017-01-11  1:52 UTC (permalink / raw)
  To: lkp

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

On 01/10, Luis R. Rodriguez wrote:

[snip]

>> >OK that runs, but that beats my actual machine with trinity, which is not
>> >desirable. I am trying to reproduce a reported error caught by lpk tests
>> >with trinity on my tree and that was with qemu. I have the job-script but
>> >that produces the same error with missing files. Can you help me with that?
>> 
>> Sure, could you paste the exact error log when you tried
>> "./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script"?
>
>As I noted its the same exact output, but here it is again:
>
>ergon:/home/mcgrof/devel/lkp-tests # export LKP_SRC=$PWD                                                     
>ergon:/home/mcgrof/devel/lkp-tests # export PATH=$PATH:$LKP_SRC/bin 
>ergon:/home/mcgrof/devel/lkp-tests # ./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script
>job-script: line 2: $'\r': command not found
>job-script: line 3: syntax error near unexpected token `$'\r''
>'ob-script: line 3: `export_top_env()
>make: Entering directory '/home/mcgrof/devel/lkp-tests/bin/event'
>klcc    -c -o wakeup.o wakeup.c
>klcc  -static -o wakeup wakeup.o
>rm -f wakeup.o
>strip wakeup
>make: Leaving directory '/home/mcgrof/devel/lkp-tests/bin/event'
>cpio: lkp: Cannot stat: No such file or directory
>cpio: lkp/scheduled: Cannot stat: No such file or directory
>cpio: blank line ignored
>cpio: File /dev/mqueue/���� shrunk by 20 bytes, padding with zeros
>
>  Luis

Hmm, I believe it was caused by job-script saved as dos format, I can reproduce
it when I downloaded it through outlook attachment.

Try `dos2unix job-script` before "lkp qemu" to see whether it works.

Thanks,
Xiaolong

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

* Re: [PATCH 0/4] lkp: add initial opensuse support
  2017-01-11  1:52         ` Ye Xiaolong
@ 2017-01-11 14:34           ` Luis R. Rodriguez
  2017-02-21  1:56             ` WARNING:at_lib/test_linktables/test-linktables.c:#test_linktable_init Ye Xiaolong
  0 siblings, 1 reply; 18+ messages in thread
From: Luis R. Rodriguez @ 2017-01-11 14:34 UTC (permalink / raw)
  To: lkp

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

On Wed, Jan 11, 2017 at 09:52:01AM +0800, Ye Xiaolong wrote:
> On 01/10, Luis R. Rodriguez wrote:
> 
> [snip]
> 
> >> >OK that runs, but that beats my actual machine with trinity, which is not
> >> >desirable. I am trying to reproduce a reported error caught by lpk tests
> >> >with trinity on my tree and that was with qemu. I have the job-script but
> >> >that produces the same error with missing files. Can you help me with that?
> >> 
> >> Sure, could you paste the exact error log when you tried
> >> "./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script"?
> >
> >As I noted its the same exact output, but here it is again:
> >
> >ergon:/home/mcgrof/devel/lkp-tests # export LKP_SRC=$PWD                                                     
> >ergon:/home/mcgrof/devel/lkp-tests # export PATH=$PATH:$LKP_SRC/bin 
> >ergon:/home/mcgrof/devel/lkp-tests # ./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script
> >job-script: line 2: $'\r': command not found
> >job-script: line 3: syntax error near unexpected token `$'\r''
> >'ob-script: line 3: `export_top_env()
> >make: Entering directory '/home/mcgrof/devel/lkp-tests/bin/event'
> >klcc    -c -o wakeup.o wakeup.c
> >klcc  -static -o wakeup wakeup.o
> >rm -f wakeup.o
> >strip wakeup
> >make: Leaving directory '/home/mcgrof/devel/lkp-tests/bin/event'
> >cpio: lkp: Cannot stat: No such file or directory
> >cpio: lkp/scheduled: Cannot stat: No such file or directory
> >cpio: blank line ignored
> >cpio: File /dev/mqueue/���� shrunk by 20 bytes, padding with zeros
> >
> >  Luis
> 
> Hmm, I believe it was caused by job-script saved as dos format, I can reproduce
> it when I downloaded it through outlook attachment.
> 
> Try `dos2unix job-script` before "lkp qemu" to see whether it works.

Thanks, that fixed it!

I cannot reproduce the error reported. See:

root(a)10:/# dmesg| grep linkta
[    6.189785] test_linktables: linker table tests: OK!

The original report:

https://lists.01.org/pipermail/lkp/2016-December/005358.html

I also pushed out a new linker table branch out for linker table
with a revert done first to force test avr32 (it worked!) a yesterday
and have not received any lkp complaints about it yet.

Also if I hit CTRL-C and try to run again I get:

make: Entering directory '/home/mcgrof/devel/lkp-tests/bin/event'
gcc  -m32 -static -o wakeup wakeup.o
/usr/lib64/gcc/x86_64-suse-linux/6/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/6/libgcc.a when searching for -lgcc
/usr/lib64/gcc/x86_64-suse-linux/6/../../../../x86_64-suse-linux/bin/ld: cannot find -lgcc
/usr/lib64/gcc/x86_64-suse-linux/6/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/6/libgcc_eh.a when searching for -lgcc_eh
/usr/lib64/gcc/x86_64-suse-linux/6/../../../../x86_64-suse-linux/bin/ld: cannot find -lgcc_eh
/usr/lib64/gcc/x86_64-suse-linux/6/../../../../x86_64-suse-linux/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make: *** [Makefile:14: main] Error 1
make: Leaving directory '/home/mcgrof/devel/lkp-tests/bin/event'
mv: cannot stat '/root/.lkp/cache/lkp-i386.cgz': No such file or directory
downloading initrds ...
/usr/bin/wget -q --local-encoding=UTF-8 --retry-connrefused --waitretry 1000 --tries 1000 https://github.com/0day-ci/lkp-qemu/raw/master/osimage/openwrt/openwrt-i386-2016-03-16.cgz -N -P /root/.lkp/cache/osimage/openwrt

It seems this tries to re-download the openwrt cpio -- why not avoid it if we already had it?

  Luis

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

* WARNING:at_lib/test_linktables/test-linktables.c:#test_linktable_init
  2017-01-11 14:34           ` Luis R. Rodriguez
@ 2017-02-21  1:56             ` Ye Xiaolong
  0 siblings, 0 replies; 18+ messages in thread
From: Ye Xiaolong @ 2017-02-21  1:56 UTC (permalink / raw)
  To: lkp

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

On 01/11, Luis R. Rodriguez wrote:
>On Wed, Jan 11, 2017 at 09:52:01AM +0800, Ye Xiaolong wrote:
>> On 01/10, Luis R. Rodriguez wrote:
>> 
>> [snip]
>> 
>> >> >OK that runs, but that beats my actual machine with trinity, which is not
>> >> >desirable. I am trying to reproduce a reported error caught by lpk tests
>> >> >with trinity on my tree and that was with qemu. I have the job-script but
>> >> >that produces the same error with missing files. Can you help me with that?
>> >> 
>> >> Sure, could you paste the exact error log when you tried
>> >> "./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script"?
>> >
>> >As I noted its the same exact output, but here it is again:
>> >
>> >ergon:/home/mcgrof/devel/lkp-tests # export LKP_SRC=$PWD                                                     
>> >ergon:/home/mcgrof/devel/lkp-tests # export PATH=$PATH:$LKP_SRC/bin 
>> >ergon:/home/mcgrof/devel/lkp-tests # ./bin/lkp qemu -k ~mcgrof/linux-next/arch/x86/boot/bzImage job-script
>> >job-script: line 2: $'\r': command not found
>> >job-script: line 3: syntax error near unexpected token `$'\r''
>> >'ob-script: line 3: `export_top_env()
>> >make: Entering directory '/home/mcgrof/devel/lkp-tests/bin/event'
>> >klcc    -c -o wakeup.o wakeup.c
>> >klcc  -static -o wakeup wakeup.o
>> >rm -f wakeup.o
>> >strip wakeup
>> >make: Leaving directory '/home/mcgrof/devel/lkp-tests/bin/event'
>> >cpio: lkp: Cannot stat: No such file or directory
>> >cpio: lkp/scheduled: Cannot stat: No such file or directory
>> >cpio: blank line ignored
>> >cpio: File /dev/mqueue/���� shrunk by 20 bytes, padding with zeros
>> >
>> >  Luis
>> 
>> Hmm, I believe it was caused by job-script saved as dos format, I can reproduce
>> it when I downloaded it through outlook attachment.
>> 
>> Try `dos2unix job-script` before "lkp qemu" to see whether it works.
>
>Thanks, that fixed it!
>
>I cannot reproduce the error reported. See:
>
>root(a)10:/# dmesg| grep linkta
>[    6.189785] test_linktables: linker table tests: OK!
>
>The original report:
>
>https://lists.01.org/pipermail/lkp/2016-December/005358.html
>
>I also pushed out a new linker table branch out for linker table
>with a revert done first to force test avr32 (it worked!) a yesterday
>and have not received any lkp complaints about it yet.

Sorry for the late. Actually I just tested with commit a02e947 ("lib: add linker tables test driver")
on branch mcgrof-next/20170113-linker-tables-v7-try2, and the warning log persists.
See dmesg attached.

>
>Also if I hit CTRL-C and try to run again I get:
>
>make: Entering directory '/home/mcgrof/devel/lkp-tests/bin/event'
>gcc  -m32 -static -o wakeup wakeup.o
>/usr/lib64/gcc/x86_64-suse-linux/6/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/6/libgcc.a when searching for -lgcc
>/usr/lib64/gcc/x86_64-suse-linux/6/../../../../x86_64-suse-linux/bin/ld: cannot find -lgcc
>/usr/lib64/gcc/x86_64-suse-linux/6/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/6/libgcc_eh.a when searching for -lgcc_eh
>/usr/lib64/gcc/x86_64-suse-linux/6/../../../../x86_64-suse-linux/bin/ld: cannot find -lgcc_eh
>/usr/lib64/gcc/x86_64-suse-linux/6/../../../../x86_64-suse-linux/bin/ld: cannot find -lc
>collect2: error: ld returned 1 exit status
>make: *** [Makefile:14: main] Error 1
>make: Leaving directory '/home/mcgrof/devel/lkp-tests/bin/event'
>mv: cannot stat '/root/.lkp/cache/lkp-i386.cgz': No such file or directory
>downloading initrds ...
>/usr/bin/wget -q --local-encoding=UTF-8 --retry-connrefused --waitretry 1000 --tries 1000 https://github.com/0day-ci/lkp-qemu/raw/master/osimage/openwrt/openwrt-i386-2016-03-16.cgz -N -P /root/.lkp/cache/osimage/openwrt
>
>It seems this tries to re-download the openwrt cpio -- why not avoid it if we already had it?

Nice suggestion. Actually we've added '-N' option for wget which will record file's timestamp,
and it will only re-download if remote file is newer than the local one. However, github server
seems refuse to send timestamp as wget would get message 'Last-modified header missing -- time-stamps
turned off', thus wget will ignore timestamp and re-download every time.
One workaround is to replace '-N' with '-nc' which means skip downloads if file exists.

diff --git a/lib/wget.sh b/lib/wget.sh
index 5524714..9db1e6f 100755
--- a/lib/wget.sh
+++ b/lib/wget.sh
@@ -41,7 +41,7 @@ http_get_directory()
 http_get_newer()
 {
        local path="$(dirname "$2")"
-       http_do_request "$1" -N -P "$path"
+       http_do_request "$1" -nc -P "$path"
 }
 
 http_get_cgi()


The risk is that it doesn't check the timestamp, so once you have a local cached file and we update the
remote one on github, `lkp qemu` would alway use the old one , but I figure it doesn't matter for this case.

Thanks,
Xiaolong
>
>  Luis

[-- Attachment #2: dmesg.xz --]
[-- Type: application/octet-stream, Size: 26372 bytes --]

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

end of thread, other threads:[~2017-02-21  1:56 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-06 19:06 [PATCH 0/4] lkp: add initial opensuse support Luis R. Rodriguez
2017-01-06 19:06 ` [PATCH 1/4] lib/install.sh: fix shell adapt_packages() Luis R. Rodriguez
2017-01-09  7:39   ` Ye Xiaolong
2017-01-06 19:06 ` [PATCH 2/4] distro: add initial opensuse support Luis R. Rodriguez
2017-01-09  7:40   ` Ye Xiaolong
2017-01-06 19:06 ` [PATCH 3/4] lib/install.*: make package dependency list uniq Luis R. Rodriguez
2017-01-09  7:40   ` Ye Xiaolong
2017-01-06 19:06 ` [PATCH 4/4] .gitignore: add bin/event/wakeup Luis R. Rodriguez
2017-01-09  7:40   ` Ye Xiaolong
2017-01-06 19:58 ` [PATCH 0/4] lkp: add initial opensuse support Luis R. Rodriguez
2017-01-09  7:49 ` Ye Xiaolong
2017-01-09 14:26   ` Luis R. Rodriguez
2017-01-10  2:11     ` Ye Xiaolong
2017-01-10 14:25       ` Luis R. Rodriguez
2017-01-11  1:52         ` Ye Xiaolong
2017-01-11 14:34           ` Luis R. Rodriguez
2017-02-21  1:56             ` WARNING:at_lib/test_linktables/test-linktables.c:#test_linktable_init Ye Xiaolong
2017-01-09  8:48 ` [PATCH 0/4] lkp: add initial opensuse support Philip Li

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.