All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests] ./run_tests.sh error?
@ 2019-12-25  5:38 Haiwei Li
  2019-12-27 12:46 ` Andrew Jones
  0 siblings, 1 reply; 5+ messages in thread
From: Haiwei Li @ 2019-12-25  5:38 UTC (permalink / raw)
  To: kvm

When i run ./run_tests.sh, i get output like this:

SKIP apic-split (qemu: could not open kernel file '_NO_FILE_4Uhere_': No 
such file or directory)
SKIP ioapic-split (qemu: could not open kernel file '_NO_FILE_4Uhere_': 
No such file or directory)
SKIP apic (qemu: could not open kernel file '_NO_FILE_4Uhere_': No such 
file or directory)
......

Seems like the code below causing of "SKIP" above.

file: scripts/runtime.bash

# We assume that QEMU is going to work if it tried to load the kernel
premature_failure()
{
     local log="$(eval $(get_cmdline _NO_FILE_4Uhere_) 2>&1)"

     echo "$log" | grep "_NO_FILE_4Uhere_" |
         grep -q -e "could not load kernel" -e "error loading" &&
         return 1

     RUNTIME_log_stderr <<< "$log"

     echo "$log"
     return 0
}

get_cmdline()
{
     local kernel=$1
     echo "TESTNAME=$testname TIMEOUT=$timeout ACCEL=$accel 
$RUNTIME_arch_run $kernel -smp $smp $opts"
}

function run()
{
...
     last_line=$(premature_failure > >(tail -1)) && {
         print_result "SKIP" $testname "" "$last_line"
         return 77
     }
...
}

Is that proper? What can i do?

What i did:

1. git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git
2. cd kvm-unit-tests/
3. git checkout -b next origin/next
4. ./configure
5. make
6. ./run_test.sh

Related config file:

# cat config.mak
SRCDIR=/data/kvm-unit-tests
PREFIX=/usr/local
HOST=x86_64
ARCH=x86_64
ARCH_NAME=x86_64
PROCESSOR=x86_64
CC=gcc
CXX=g++
LD=ld
OBJCOPY=objcopy
OBJDUMP=objdump
AR=ar
ADDR2LINE=addr2line
API=yes
TEST_DIR=x86
FIRMWARE=
ENDIAN=
PRETTY_PRINT_STACKS=yes
ENVIRON_DEFAULT=yes
ERRATATXT=errata.txt
U32_LONG_FMT=

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

* Re: [kvm-unit-tests] ./run_tests.sh error?
  2019-12-25  5:38 [kvm-unit-tests] ./run_tests.sh error? Haiwei Li
@ 2019-12-27 12:46 ` Andrew Jones
  2019-12-28  4:03   ` Haiwei Li
  2020-01-07 13:22   ` Thomas Huth
  0 siblings, 2 replies; 5+ messages in thread
From: Andrew Jones @ 2019-12-27 12:46 UTC (permalink / raw)
  To: Haiwei Li; +Cc: kvm

On Wed, Dec 25, 2019 at 01:38:53PM +0800, Haiwei Li wrote:
> When i run ./run_tests.sh, i get output like this:
> 
> SKIP apic-split (qemu: could not open kernel file '_NO_FILE_4Uhere_': No
> such file or directory)
> SKIP ioapic-split (qemu: could not open kernel file '_NO_FILE_4Uhere_': No
> such file or directory)
> SKIP apic (qemu: could not open kernel file '_NO_FILE_4Uhere_': No such file
> or directory)
> ......
> 
> Seems like the code below causing of "SKIP" above.
> 
> file: scripts/runtime.bash
> 
> # We assume that QEMU is going to work if it tried to load the kernel
> premature_failure()
> {
>     local log="$(eval $(get_cmdline _NO_FILE_4Uhere_) 2>&1)"
> 
>     echo "$log" | grep "_NO_FILE_4Uhere_" |
>         grep -q -e "could not load kernel" -e "error loading" &&
>         return 1
> 
>     RUNTIME_log_stderr <<< "$log"
> 
>     echo "$log"
>     return 0
> }
> 
> get_cmdline()
> {
>     local kernel=$1
>     echo "TESTNAME=$testname TIMEOUT=$timeout ACCEL=$accel $RUNTIME_arch_run
> $kernel -smp $smp $opts"
> }
> 
> function run()
> {
> ...
>     last_line=$(premature_failure > >(tail -1)) && {
>         print_result "SKIP" $testname "" "$last_line"
>         return 77
>     }
> ...
> }
> 
> Is that proper? What can i do?
> 
> What i did:
> 
> 1. git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git
> 2. cd kvm-unit-tests/
> 3. git checkout -b next origin/next
> 4. ./configure
> 5. make
> 6. ./run_test.sh
> 
> Related config file:
> 
> # cat config.mak
> SRCDIR=/data/kvm-unit-tests
> PREFIX=/usr/local
> HOST=x86_64
> ARCH=x86_64
> ARCH_NAME=x86_64
> PROCESSOR=x86_64
> CC=gcc
> CXX=g++
> LD=ld
> OBJCOPY=objcopy
> OBJDUMP=objdump
> AR=ar
> ADDR2LINE=addr2line
> API=yes
> TEST_DIR=x86
> FIRMWARE=
> ENDIAN=
> PRETTY_PRINT_STACKS=yes
> ENVIRON_DEFAULT=yes
> ERRATATXT=errata.txt
> U32_LONG_FMT=
>

You need https://patchwork.kernel.org/patch/11284587/ for this issue. But
I just tried a latest qemu on x86 and see tests are hanging. So that may
not be enough to get you running.

drew


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

* Re: [kvm-unit-tests] ./run_tests.sh error?
  2019-12-27 12:46 ` Andrew Jones
@ 2019-12-28  4:03   ` Haiwei Li
  2020-01-07 13:22   ` Thomas Huth
  1 sibling, 0 replies; 5+ messages in thread
From: Haiwei Li @ 2019-12-28  4:03 UTC (permalink / raw)
  To: Andrew Jones; +Cc: kvm



On 2019/12/27 20:46, Andrew Jones wrote:
> On Wed, Dec 25, 2019 at 01:38:53PM +0800, Haiwei Li wrote:
>> When i run ./run_tests.sh, i get output like this:
>>
>> SKIP apic-split (qemu: could not open kernel file '_NO_FILE_4Uhere_': No
>> such file or directory)
>> SKIP ioapic-split (qemu: could not open kernel file '_NO_FILE_4Uhere_': No
>> such file or directory)
>> SKIP apic (qemu: could not open kernel file '_NO_FILE_4Uhere_': No such file
>> or directory)
>> ......
>>
>> Seems like the code below causing of "SKIP" above.
>>
>> file: scripts/runtime.bash
>>
>> # We assume that QEMU is going to work if it tried to load the kernel
>> premature_failure()
>> {
>>      local log="$(eval $(get_cmdline _NO_FILE_4Uhere_) 2>&1)"
>>
>>      echo "$log" | grep "_NO_FILE_4Uhere_" |
>>          grep -q -e "could not load kernel" -e "error loading" &&
>>          return 1
>>
>>      RUNTIME_log_stderr <<< "$log"
>>
>>      echo "$log"
>>      return 0
>> }
>>
>> get_cmdline()
>> {
>>      local kernel=$1
>>      echo "TESTNAME=$testname TIMEOUT=$timeout ACCEL=$accel $RUNTIME_arch_run
>> $kernel -smp $smp $opts"
>> }
>>
>> function run()
>> {
>> ...
>>      last_line=$(premature_failure > >(tail -1)) && {
>>          print_result "SKIP" $testname "" "$last_line"
>>          return 77
>>      }
>> ...
>> }
>>
>> Is that proper? What can i do?
>>
>> What i did:
>>
>> 1. git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git
>> 2. cd kvm-unit-tests/
>> 3. git checkout -b next origin/next
>> 4. ./configure
>> 5. make
>> 6. ./run_test.sh
>>
>> Related config file:
>>
>> # cat config.mak
>> SRCDIR=/data/kvm-unit-tests
>> PREFIX=/usr/local
>> HOST=x86_64
>> ARCH=x86_64
>> ARCH_NAME=x86_64
>> PROCESSOR=x86_64
>> CC=gcc
>> CXX=g++
>> LD=ld
>> OBJCOPY=objcopy
>> OBJDUMP=objdump
>> AR=ar
>> ADDR2LINE=addr2line
>> API=yes
>> TEST_DIR=x86
>> FIRMWARE=
>> ENDIAN=
>> PRETTY_PRINT_STACKS=yes
>> ENVIRON_DEFAULT=yes
>> ERRATATXT=errata.txt
>> U32_LONG_FMT=
>>
> 
> You need https://patchwork.kernel.org/patch/11284587/ for this issue. But
> I just tried a latest qemu on x86 and see tests are hanging. So that may
> not be enough to get you running.
> 
> drew
> 

Thanks a lot. It's ok to run. The qemu i use is based on the commit 
"2061735ff09f9d5e67c501a96227b470e7de69b1".

Haiwei Li

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

* Re: [kvm-unit-tests] ./run_tests.sh error?
  2019-12-27 12:46 ` Andrew Jones
  2019-12-28  4:03   ` Haiwei Li
@ 2020-01-07 13:22   ` Thomas Huth
  2020-01-07 13:29     ` Paolo Bonzini
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2020-01-07 13:22 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Andrew Jones, Haiwei Li, kvm

On 27/12/2019 13.46, Andrew Jones wrote:
> On Wed, Dec 25, 2019 at 01:38:53PM +0800, Haiwei Li wrote:
>> When i run ./run_tests.sh, i get output like this:
>>
>> SKIP apic-split (qemu: could not open kernel file '_NO_FILE_4Uhere_': No
>> such file or directory)
>> SKIP ioapic-split (qemu: could not open kernel file '_NO_FILE_4Uhere_': No
>> such file or directory)
>> SKIP apic (qemu: could not open kernel file '_NO_FILE_4Uhere_': No such file
>> or directory)
>> ......
[...]
> You need https://patchwork.kernel.org/patch/11284587/ for this issue.
 Hi Paolo,

could you maybe apply my patch directly, to avoid that other people run
into this issue, too?

 Thanks,
  Thomas


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

* Re: [kvm-unit-tests] ./run_tests.sh error?
  2020-01-07 13:22   ` Thomas Huth
@ 2020-01-07 13:29     ` Paolo Bonzini
  0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2020-01-07 13:29 UTC (permalink / raw)
  To: Thomas Huth; +Cc: Andrew Jones, Haiwei Li, kvm

On 07/01/20 14:22, Thomas Huth wrote:
> On 27/12/2019 13.46, Andrew Jones wrote:
>> On Wed, Dec 25, 2019 at 01:38:53PM +0800, Haiwei Li wrote:
>>> When i run ./run_tests.sh, i get output like this:
>>>
>>> SKIP apic-split (qemu: could not open kernel file '_NO_FILE_4Uhere_': No
>>> such file or directory)
>>> SKIP ioapic-split (qemu: could not open kernel file '_NO_FILE_4Uhere_': No
>>> such file or directory)
>>> SKIP apic (qemu: could not open kernel file '_NO_FILE_4Uhere_': No such file
>>> or directory)
>>> ......
> [...]
>> You need https://patchwork.kernel.org/patch/11284587/ for this issue.
>  Hi Paolo,
> 
> could you maybe apply my patch directly, to avoid that other people run
> into this issue, too?

Yes, I will apply the whole series.  I've finished more or less going
through QEMU patches.

Paolo


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

end of thread, other threads:[~2020-01-07 13:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-25  5:38 [kvm-unit-tests] ./run_tests.sh error? Haiwei Li
2019-12-27 12:46 ` Andrew Jones
2019-12-28  4:03   ` Haiwei Li
2020-01-07 13:22   ` Thomas Huth
2020-01-07 13:29     ` Paolo Bonzini

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.