On Mon, Apr 24, 2023 at 05:58:16PM +0800, 任敏敏(联通集团联通数字科技有限公司本部) wrote: > >On Sun, Apr 23, 2023 at 12:34:36PM +0800, 任敏敏(联通集团联通数字科技有限公司本部) wrote: > >> From: rminmin <renmm6@xxxxxxxxxxxxxx> > >> > >> run_qemu should return 0 if logs doesn't > >> contain "warning" keyword. > > > >Why? What are you trying to fix? > > > > I encountered a problem that the differet results when I run the same > test case using standalone mode, "run_test.sh -t -g", "run_test.sh -g". > When I use "run_test.sh -g", it always returns a FAIL message. > In my env, qemu version is 6.2. > > e.g. runnig debug test cases. > > # without "-t" > ./run_tests.sh -g debug > FAIL debug (22 tests) > > # "-t" > ./run_tests.sh -t -g debug > TAP version 13 > ok 1 - debug: DR4==DR6 with CR4.DE == 0 > ok 2 - debug: DR4 read got #UD with CR4.DE == 1 > ok 3 - debug: #BP > ok 4 - debug: hw breakpoint (test that dr6.BS is not set) > ok 5 - debug: hw breakpoint (test that dr6.BS is not cleared) > ok 6 - debug: Single-step #DB basic test > ok 7 - debug: Usermode Single-step #DB basic test > ok 8 - debug: Single-step #DB on emulated instructions > ok 9 - debug: Usermode Single-step #DB on emulated instructions > ok 10 - debug: Single-step #DB w/ STI blocking > ok 11 - debug: Usermode Single-step #DB w/ STI blocking > ok 12 - debug: Single-step #DB w/ MOVSS blocking > ok 13 - debug: Usermode Single-step #DB w/ MOVSS blocking > ok 14 - debug: Single-Step + ICEBP #DB w/ MOVSS blocking > ok 15 - debug: Usermode Single-Step + ICEBP #DB w/ MOVSS blocking > ok 16 - debug: Single-step #DB w/ MOVSS blocking and DR7.GD=1 > ok 17 - debug: hw watchpoint (test that dr6.BS is not cleared) > ok 18 - debug: hw watchpoint (test that dr6.BS is not set) > ok 19 - debug: icebp > ok 20 - debug: MOV SS + watchpoint + ICEBP > ok 21 - debug: MOV SS + watchpoint + int $1 > ok 22 - debug: MOV SS + watchpoint + INT3 > 1..22 > > # standalone > > tests/debug > BUILD_HEAD=02d8befe > timeout -k 1s --foreground 90s /usr/bin/qemu-kvm --no-reboot -nodefaults -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -machine accel=kvm -kernel /tmp/tmp.1GdMZXhTTs -smp 1 # -initrd /tmp/tmp.LzHnmXchfO > configure accelerator pc-i440fx-6.2 start > machine init start > device init start > add qdev pc-testdev:none success > add qdev pc-testdev:none success > add qdev isa-debug-exit:none success > add qdev isa-debug-exit:none success > add qdev pci-testdev:none success > add qdev pci-testdev:none success > reset all devices > qmp cont is received and vm is started > qemu enter main_loop All the above messages are debug messages that QEMU doesn't output. So you're running your own QEMU build with extra messages which kvm-unit-tests has to assume are errors. Please don't try to debug test frameworks without using known-good software-under-test. It also appears you modified kvm-unit-tests, because there is no 'debug' group. Thanks, drew