qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* make -i check resut for msys2
@ 2020-09-03  9:18 罗勇刚(Yonggang Luo)
  2020-09-03 14:33 ` Thomas Huth
  0 siblings, 1 reply; 7+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-03  9:18 UTC (permalink / raw)
  To: qemu-level

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

$ make -i check
Regenerating build files.
Directory does not contain a valid build tree:
C:/work/xemu/qemu/build
make: [Makefile.ninja:5217:build.ninja] 错误 1 (已忽略)
make[1]: 进入目录“/c/work/xemu/qemu/slirp”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/c/work/xemu/qemu/slirp”
Generating qemu-version.h with a meson_exe.py custom command
Running test decodetree
Running test QAPI schema regression tests
Running test QAPI doc
Running test QAPI schema regression tests
Running test QAPI doc
  LINK    tests/test-aio-multithread.exe
  LINK    tests/test-bdrv-drain.exe
  CC      tests/test-qht-par.o
  LINK    tests/test-qht-par.exe
  TEST    check-unit: tests/check-qdict.exe
  TEST    check-unit: tests/check-block-qdict.exe
  TEST    check-unit: tests/check-qnum.exe
  TEST    check-unit: tests/check-qstring.exe
  TEST    check-unit: tests/check-qlist.exe
  TEST    check-unit: tests/check-qnull.exe
  TEST    check-unit: tests/check-qobject.exe
  TEST    check-unit: tests/check-qjson.exe
  TEST    check-unit: tests/check-qlit.exe
  TEST    check-unit: tests/test-qobject-output-visitor.exe
  TEST    check-unit: tests/test-clone-visitor.exe
  TEST    check-unit: tests/test-qobject-input-visitor.exe
  TEST    check-unit: tests/test-qmp-cmds.exe
  TEST    check-unit: tests/test-string-input-visitor.exe
  TEST    check-unit: tests/test-string-output-visitor.exe
  TEST    check-unit: tests/test-qmp-event.exe
  TEST    check-unit: tests/test-opts-visitor.exe
  TEST    check-unit: tests/test-coroutine.exe
  TEST    check-unit: tests/test-visitor-serialization.exe
  TEST    check-unit: tests/test-iov.exe
  TEST    check-unit: tests/test-bitmap.exe
  TEST    check-unit: tests/test-aio.exe
  TEST    check-unit: tests/test-aio-multithread.exe

(C:\work\xemu\qemu\build\tests\test-aio-multithread.exe:15216):
GLib-CRITICAL **: 17:11:56.670: g_source_remove_poll: assertion
'!SOURCE_DESTROYED (source)' failed
ERROR test-aio-multithread.exe - Bail out! GLib-FATAL-CRITICAL:
g_source_remove_poll: assertion '!SOURCE_DESTROYED (source)' failed
make: [C:/work/xemu/qemu/tests/Makefile.include:426:check-unit] 错误 1 (已忽略)
  TEST    check-unit: tests/test-throttle.exe
  TEST    check-unit: tests/test-thread-pool.exe
  TEST    check-unit: tests/test-hbitmap.exe
  TEST    check-unit: tests/test-bdrv-drain.exe

(C:\work\xemu\qemu\build\tests\test-bdrv-drain.exe:9152): GLib-CRITICAL **:
17:12:01.403: g_source_remove_poll: assertion '!SOURCE_DESTROYED (source)'
failed
ERROR test-bdrv-drain.exe - Bail out! GLib-FATAL-CRITICAL:
g_source_remove_poll: assertion '!SOURCE_DESTROYED (source)' failed
make: [C:/work/xemu/qemu/tests/Makefile.include:426:check-unit] 错误 1 (已忽略)
  TEST    check-unit: tests/test-bdrv-graph-mod.exe
  TEST    check-unit: tests/test-blockjob.exe
  TEST    check-unit: tests/test-blockjob-txn.exe
  TEST    check-unit: tests/test-block-backend.exe
  TEST    check-unit: tests/test-block-iothread.exe
  TEST    check-unit: tests/test-x86-cpuid.exe
  TEST    check-unit: tests/test-xbzrle.exe
  TEST    check-unit: tests/test-cutils.exe
  TEST    check-unit: tests/test-shift128.exe
  TEST    check-unit: tests/test-mul64.exe
  TEST    check-unit: tests/test-int128.exe
  TEST    check-unit: tests/rcutorture.exe
  TEST    check-unit: tests/test-rcu-list.exe
  TEST    check-unit: tests/test-rcu-simpleq.exe
  TEST    check-unit: tests/test-rcu-tailq.exe
  TEST    check-unit: tests/test-rcu-slist.exe
  TEST    check-unit: tests/test-qdist.exe
  TEST    check-unit: tests/test-qht.exe
  TEST    check-unit: tests/test-qht-par.exe
系统找不到指定的路径。
**
ERROR:C:/work/xemu/qemu/tests/test-qht-par.c:20:test_qht: assertion failed
(rc == 0): (1 == 0)
ERROR test-qht-par.exe - Bail out!
ERROR:C:/work/xemu/qemu/tests/test-qht-par.c:20:test_qht: assertion failed
(rc == 0): (1 == 0)
make: [C:/work/xemu/qemu/tests/Makefile.include:426:check-unit] 错误 1 (已忽略)
  TEST    check-unit: tests/test-bitops.exe
  TEST    check-unit: tests/test-bitcnt.exe
  TEST    check-unit: tests/test-qgraph.exe
  TEST    check-unit: tests/check-qom-interface.exe
  TEST    check-unit: tests/check-qom-proplist.exe
  TEST    check-unit: tests/test-qemu-opts.exe
  TEST    check-unit: tests/test-keyval.exe
  TEST    check-unit: tests/test-write-threshold.exe
  TEST    check-unit: tests/test-crypto-hash.exe
  TEST    check-unit: tests/test-crypto-hmac.exe
  TEST    check-unit: tests/test-crypto-cipher.exe
  TEST    check-unit: tests/test-crypto-secret.exe
  TEST    check-unit: tests/test-crypto-tlscredsx509.exe
ERROR test-crypto-tlscredsx509.exe - missing test plan
make: [C:/work/xemu/qemu/tests/Makefile.include:426:check-unit] 错误 1 (已忽略)
  TEST    check-unit: tests/test-crypto-tlssession.exe
ERROR test-crypto-tlssession.exe - missing test plan
make: [C:/work/xemu/qemu/tests/Makefile.include:426:check-unit] 错误 1 (已忽略)
  TEST    check-unit: tests/test-qdev-global-props.exe
**
ERROR:C:/work/xemu/qemu/tests/test-qdev-global-props.c:253:test_dynamic_globalprop:
stderr of child process (/qdev/properties/dynamic/global/subprocess) failed
to match: *warning: global dynamic-prop-type-bad.prop3 has invalid class
name
*
stderr was:
warning: global dynamic-prop-type-bad.prop3 has invalid class name
warning: global nohotplug-type.prop5=105 not used
warning: global nondevice-type.prop6 has invalid class name

ERROR test-qdev-global-props.exe - Bail out!
ERROR:C:/work/xemu/qemu/tests/test-qdev-global-props.c:253:test_dynamic_globalprop:
stderr of child process (/qdev/properties/dynamic/global/subprocess) failed
to match: *warning: global dynamic-prop-type-bad.prop3 has invalid class
name
make: [C:/work/xemu/qemu/tests/Makefile.include:426:check-unit] 错误 1 (已忽略)
  TEST    check-unit: tests/test-timed-average.exe
  TEST    check-unit: tests/test-util-sockets.exe
ERROR test-util-sockets.exe - missing test plan
make: [C:/work/xemu/qemu/tests/Makefile.include:426:check-unit] 错误 1 (已忽略)
  TEST    check-unit: tests/test-authz-simple.exe
  TEST    check-unit: tests/test-authz-list.exe
  TEST    check-unit: tests/test-authz-listfile.exe
  TEST    check-unit: tests/test-io-task.exe
  TEST    check-unit: tests/test-io-channel-socket.exe
ERROR test-io-channel-socket.exe - missing test plan
make: [C:/work/xemu/qemu/tests/Makefile.include:426:check-unit] 错误 1 (已忽略)
  TEST    check-unit: tests/test-io-channel-file.exe
**
ERROR:C:/work/xemu/qemu/tests/test-io-channel-file.c:59:test_io_channel_file_helper:
assertion failed (TEST_MASK & ~mask == st.st_mode & 0777): (384 == 438)
ERROR test-io-channel-file.exe - Bail out!
ERROR:C:/work/xemu/qemu/tests/test-io-channel-file.c:59:test_io_channel_file_helper:
assertion failed (TEST_MASK & ~mask == st.st_mode & 0777): (384 == 438)

make: [C:/work/xemu/qemu/tests/Makefile.include:426:check-unit] 错误 1 (已忽略)
  TEST    check-unit: tests/test-io-channel-tls.exe
ERROR test-io-channel-tls.exe - missing test plan
make: [C:/work/xemu/qemu/tests/Makefile.include:426:check-unit] 错误 1 (已忽略)
  TEST    check-unit: tests/test-io-channel-command.exe
  TEST    check-unit: tests/test-io-channel-buffer.exe
  TEST    check-unit: tests/test-base64.exe
  TEST    check-unit: tests/test-crypto-pbkdf.exe
  TEST    check-unit: tests/test-crypto-ivgen.exe
  TEST    check-unit: tests/test-crypto-afsplit.exe
  TEST    check-unit: tests/test-crypto-block.exe
  TEST    check-unit: tests/test-logging.exe
**
ERROR:C:/work/xemu/qemu/tests/test-logging.c:190:rmdir_full: assertion
failed: (g_remove(entry_path) == 0)
ERROR test-logging.exe - Bail out!
ERROR:C:/work/xemu/qemu/tests/test-logging.c:190:rmdir_full: assertion
failed: (g_remove(entry_path) == 0)
make: [C:/work/xemu/qemu/tests/Makefile.include:426:check-unit] 错误 1 (已忽略)
  TEST    check-unit: tests/test-replication.exe
**
ERROR:C:/work/xemu/qemu/tests/test-replication.c:136:make_temp: assertion
failed: (fd >= 0)
ERROR test-replication.exe - Bail out!
ERROR:C:/work/xemu/qemu/tests/test-replication.c:136:make_temp: assertion
failed: (fd >= 0)
make: [C:/work/xemu/qemu/tests/Makefile.include:426:check-unit] 错误 1 (已忽略)
  TEST    check-unit: tests/test-bufferiszero.exe
  TEST    check-unit: tests/test-uuid.exe
  TEST    check-unit: tests/ptimer-test.exe
  TEST    check-unit: tests/test-qapi-util.exe


-- 
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

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

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

* Re: make -i check resut for msys2
  2020-09-03  9:18 make -i check resut for msys2 罗勇刚(Yonggang Luo)
@ 2020-09-03 14:33 ` Thomas Huth
  2020-09-03 22:53   ` 罗勇刚(Yonggang Luo)
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Huth @ 2020-09-03 14:33 UTC (permalink / raw)
  To: luoyonggang, qemu-level; +Cc: Xie Changlong, Daniel P. Berrange, Wen Congyang

On 03/09/2020 11.18, 罗勇刚(Yonggang Luo) wrote:
[...]
>   TEST    check-unit: tests/test-replication.exe
> **
> ERROR:C:/work/xemu/qemu/tests/test-replication.c:136:make_temp:
> assertion failed: (fd >= 0)
> ERROR test-replication.exe - Bail out!
> ERROR:C:/work/xemu/qemu/tests/test-replication.c:136:make_temp:
> assertion failed: (fd >= 0)

At least this one should be easy to fix: The test uses /tmp as
hard-coded directory for temporary files. I think it should use
g_get_tmp_dir() from glib to get that directory instead.

 Thomas



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

* Re: make -i check resut for msys2
  2020-09-03 14:33 ` Thomas Huth
@ 2020-09-03 22:53   ` 罗勇刚(Yonggang Luo)
  2020-09-04  6:03     ` Thomas Huth
  0 siblings, 1 reply; 7+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-03 22:53 UTC (permalink / raw)
  To: Thomas Huth; +Cc: Xie Changlong, Daniel P. Berrange, qemu-level, Wen Congyang

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

On Thu, Sep 3, 2020 at 10:33 PM Thomas Huth <thuth@redhat.com> wrote:

> On 03/09/2020 11.18, 罗勇刚(Yonggang Luo) wrote:
> [...]
> >   TEST    check-unit: tests/test-replication.exe
> > **
> > ERROR:C:/work/xemu/qemu/tests/test-replication.c:136:make_temp:
> > assertion failed: (fd >= 0)
> > ERROR test-replication.exe - Bail out!
> > ERROR:C:/work/xemu/qemu/tests/test-replication.c:136:make_temp:
> > assertion failed: (fd >= 0)
>
> At least this one should be easy to fix: The test uses /tmp as
> hard-coded directory for temporary files. I think it should use
> g_get_tmp_dir() from glib to get that directory instead.
>
>  Thomas
>
> After fixes tmp path, how to fixes following error:
$ tests/test-replication.exe


# random seed: R02Sdf2e4ffc0e6fbe96624598386b538927
1..13
# Start of replication tests
# Start of primary tests
Unexpected error in bdrv_open_inherit() at ../block.c:3456:
Block protocol 'file' doesn't support the option 'locking'


-- 
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

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

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

* Re: make -i check resut for msys2
  2020-09-03 22:53   ` 罗勇刚(Yonggang Luo)
@ 2020-09-04  6:03     ` Thomas Huth
  2020-09-04  8:50       ` Kevin Wolf
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Huth @ 2020-09-04  6:03 UTC (permalink / raw)
  To: luoyonggang
  Cc: Daniel P. Berrange, Qemu-block, Wen Congyang, Xie Changlong, qemu-level

On 04/09/2020 00.53, 罗勇刚(Yonggang Luo) wrote:
> 
> 
> On Thu, Sep 3, 2020 at 10:33 PM Thomas Huth <thuth@redhat.com
> <mailto:thuth@redhat.com>> wrote:
> 
>     On 03/09/2020 11.18, 罗勇刚(Yonggang Luo) wrote:
>     [...]
>     >   TEST    check-unit: tests/test-replication.exe
>     > **
>     > ERROR:C:/work/xemu/qemu/tests/test-replication.c:136:make_temp:
>     > assertion failed: (fd >= 0)
>     > ERROR test-replication.exe - Bail out!
>     > ERROR:C:/work/xemu/qemu/tests/test-replication.c:136:make_temp:
>     > assertion failed: (fd >= 0)
> 
>     At least this one should be easy to fix: The test uses /tmp as
>     hard-coded directory for temporary files. I think it should use
>     g_get_tmp_dir() from glib to get that directory instead.
> 
>      Thomas
> 
> After fixes tmp path, how to fixes following error:
> $ tests/test-replication.exe                                            
>                                                                        
>                                                                        
>          
> # random seed: R02Sdf2e4ffc0e6fbe96624598386b538927
> 1..13
> # Start of replication tests
> # Start of primary tests
> Unexpected error in bdrv_open_inherit() at ../block.c:3456:
> Block protocol 'file' doesn't support the option 'locking' 

Not sure ... as a temporary test, try to remove the "locking=off"
strings from the test. If it then works, it might be worth discussing
with the block layer folks how to handle this test on Windows in the
best way. If it still does not work, it's maybe simply not worth the
effort to try to get this test running on Windows - and thus mark it
with CONFIG_POSIX in the Makefile / meson.build.

 Thomas



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

* Re: make -i check resut for msys2
  2020-09-04  6:03     ` Thomas Huth
@ 2020-09-04  8:50       ` Kevin Wolf
  2020-09-05  6:21         ` 罗勇刚(Yonggang Luo)
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin Wolf @ 2020-09-04  8:50 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Daniel P. Berrange, Qemu-block, Wen Congyang, Xie Changlong,
	qemu-level, luoyonggang

Am 04.09.2020 um 08:03 hat Thomas Huth geschrieben:
> On 04/09/2020 00.53, 罗勇刚(Yonggang Luo) wrote:
> > 
> > 
> > On Thu, Sep 3, 2020 at 10:33 PM Thomas Huth <thuth@redhat.com
> > <mailto:thuth@redhat.com>> wrote:
> > 
> >     On 03/09/2020 11.18, 罗勇刚(Yonggang Luo) wrote:
> >     [...]
> >     >   TEST    check-unit: tests/test-replication.exe
> >     > **
> >     > ERROR:C:/work/xemu/qemu/tests/test-replication.c:136:make_temp:
> >     > assertion failed: (fd >= 0)
> >     > ERROR test-replication.exe - Bail out!
> >     > ERROR:C:/work/xemu/qemu/tests/test-replication.c:136:make_temp:
> >     > assertion failed: (fd >= 0)
> > 
> >     At least this one should be easy to fix: The test uses /tmp as
> >     hard-coded directory for temporary files. I think it should use
> >     g_get_tmp_dir() from glib to get that directory instead.
> > 
> >      Thomas
> > 
> > After fixes tmp path, how to fixes following error:
> > $ tests/test-replication.exe                                            
> >                                                                        
> >                                                                        
> >          
> > # random seed: R02Sdf2e4ffc0e6fbe96624598386b538927
> > 1..13
> > # Start of replication tests
> > # Start of primary tests
> > Unexpected error in bdrv_open_inherit() at ../block.c:3456:
> > Block protocol 'file' doesn't support the option 'locking' 
> 
> Not sure ... as a temporary test, try to remove the "locking=off"
> strings from the test. If it then works, it might be worth discussing
> with the block layer folks how to handle this test on Windows in the
> best way. If it still does not work, it's maybe simply not worth the
> effort to try to get this test running on Windows - and thus mark it
> with CONFIG_POSIX in the Makefile / meson.build.

This is a bug in file-win32. It reads "locking" from the options QDict,
but doesn't delete it from it.

Does the following help? (Only compile-tested.)

If it works for you, I'll send it as a proper patch.

Kevin

diff --git a/block/file-win32.c b/block/file-win32.c
index ab69bd811a..e2900c3a51 100644
--- a/block/file-win32.c
+++ b/block/file-win32.c
@@ -299,6 +299,11 @@ static QemuOptsList raw_runtime_opts = {
             .type = QEMU_OPT_STRING,
             .help = "host AIO implementation (threads, native)",
         },
+        {
+            .name = "locking",
+            .type = QEMU_OPT_STRING,
+            .help = "file locking mode (on/off/auto, default: auto)",
+        },
         { /* end of list */ }
     },
 };
@@ -333,6 +338,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
     Error *local_err = NULL;
     const char *filename;
     bool use_aio;
+    OnOffAuto locking;
     int ret;

     s->type = FTYPE_FILE;
@@ -343,10 +349,24 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
         goto fail;
     }

-    if (qdict_get_try_bool(options, "locking", false)) {
+    locking = qapi_enum_parse(&OnOffAuto_lookup,
+                              qemu_opt_get(opts, "locking"),
+                              ON_OFF_AUTO_AUTO, &local_err);
+    if (local_err) {
+        error_propagate(errp, local_err);
+        ret = -EINVAL;
+        goto fail;
+    }
+    switch (locking) {
+    case ON_OFF_AUTO_ON:
         error_setg(errp, "locking=on is not supported on Windows");
         ret = -EINVAL;
         goto fail;
+    case ON_OFF_AUTO_OFF:
+    case ON_OFF_AUTO_AUTO:
+        break;
+    default:
+        g_assert_not_reached();
     }

     filename = qemu_opt_get(opts, "filename");



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

* Re: make -i check resut for msys2
  2020-09-04  8:50       ` Kevin Wolf
@ 2020-09-05  6:21         ` 罗勇刚(Yonggang Luo)
  2020-09-07  9:23           ` Kevin Wolf
  0 siblings, 1 reply; 7+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-05  6:21 UTC (permalink / raw)
  To: Kevin Wolf
  Cc: Thomas Huth, Daniel P. Berrange, Qemu-block, Wen Congyang,
	Xie Changlong, qemu-level

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

On Fri, Sep 4, 2020 at 4:51 PM Kevin Wolf <kwolf@redhat.com> wrote:

> Am 04.09.2020 um 08:03 hat Thomas Huth geschrieben:
> > On 04/09/2020 00.53, 罗勇刚(Yonggang Luo) wrote:
> > >
> > >
> > > On Thu, Sep 3, 2020 at 10:33 PM Thomas Huth <thuth@redhat.com
> > > <mailto:thuth@redhat.com>> wrote:
> > >
> > >     On 03/09/2020 11.18, 罗勇刚(Yonggang Luo) wrote:
> > >     [...]
> > >     >   TEST    check-unit: tests/test-replication.exe
> > >     > **
> > >     > ERROR:C:/work/xemu/qemu/tests/test-replication.c:136:make_temp:
> > >     > assertion failed: (fd >= 0)
> > >     > ERROR test-replication.exe - Bail out!
> > >     > ERROR:C:/work/xemu/qemu/tests/test-replication.c:136:make_temp:
> > >     > assertion failed: (fd >= 0)
> > >
> > >     At least this one should be easy to fix: The test uses /tmp as
> > >     hard-coded directory for temporary files. I think it should use
> > >     g_get_tmp_dir() from glib to get that directory instead.
> > >
> > >      Thomas
> > >
> > > After fixes tmp path, how to fixes following error:
> > > $ tests/test-replication.exe
>
> > >
> > >
> > >
> > > # random seed: R02Sdf2e4ffc0e6fbe96624598386b538927
> > > 1..13
> > > # Start of replication tests
> > > # Start of primary tests
> > > Unexpected error in bdrv_open_inherit() at ../block.c:3456:
> > > Block protocol 'file' doesn't support the option 'locking'
> >
> > Not sure ... as a temporary test, try to remove the "locking=off"
> > strings from the test. If it then works, it might be worth discussing
> > with the block layer folks how to handle this test on Windows in the
> > best way. If it still does not work, it's maybe simply not worth the
> > effort to try to get this test running on Windows - and thus mark it
> > with CONFIG_POSIX in the Makefile / meson.build.
>
> This is a bug in file-win32. It reads "locking" from the options QDict,
> but doesn't delete it from it.
>
> Does the following help? (Only compile-tested.)
>
> If it works for you, I'll send it as a proper patch.
>
> Kevin
>
> diff --git a/block/file-win32.c b/block/file-win32.c
> index ab69bd811a..e2900c3a51 100644
> --- a/block/file-win32.c
> +++ b/block/file-win32.c
> @@ -299,6 +299,11 @@ static QemuOptsList raw_runtime_opts = {
>              .type = QEMU_OPT_STRING,
>              .help = "host AIO implementation (threads, native)",
>          },
> +        {
> +            .name = "locking",
> +            .type = QEMU_OPT_STRING,
> +            .help = "file locking mode (on/off/auto, default: auto)",
> +        },
>          { /* end of list */ }
>      },
>  };
> @@ -333,6 +338,7 @@ static int raw_open(BlockDriverState *bs, QDict
> *options, int flags,
>      Error *local_err = NULL;
>      const char *filename;
>      bool use_aio;
> +    OnOffAuto locking;
>      int ret;
>
>      s->type = FTYPE_FILE;
> @@ -343,10 +349,24 @@ static int raw_open(BlockDriverState *bs, QDict
> *options, int flags,
>          goto fail;
>      }
>
> -    if (qdict_get_try_bool(options, "locking", false)) {
> +    locking = qapi_enum_parse(&OnOffAuto_lookup,
> +                              qemu_opt_get(opts, "locking"),
> +                              ON_OFF_AUTO_AUTO, &local_err);
> +    if (local_err) {
> +        error_propagate(errp, local_err);
> +        ret = -EINVAL;
> +        goto fail;
> +    }
> +    switch (locking) {
> +    case ON_OFF_AUTO_ON:
>          error_setg(errp, "locking=on is not supported on Windows");
>          ret = -EINVAL;
>          goto fail;
> +    case ON_OFF_AUTO_OFF:
> +    case ON_OFF_AUTO_AUTO:
> +        break;
> +    default:
> +        g_assert_not_reached();
>      }
>
>      filename = qemu_opt_get(opts, "filename");
>
> Partial error fixed, new error are coming:
$ ./tests/test-replication.exe
# random seed: R02S3f4d1c01af2b0a046990e0235c481faf
1..13
# Start of replication tests
# Start of primary tests
ok 1 /replication/primary/read
ok 2 /replication/primary/write
ok 3 /replication/primary/start
ok 4 /replication/primary/stop
ok 5 /replication/primary/do_checkpoint
ok 6 /replication/primary/get_error_all
# End of primary tests
# Start of secondary tests
ok 7 /replication/secondary/read
ok 8 /replication/secondary/write
Unexpected error in bdrv_reopen_prepare() at ../block.c:4191:
Block format 'file' used by node '#block4287' does not support reopening
files

-- 
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

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

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

* Re: make -i check resut for msys2
  2020-09-05  6:21         ` 罗勇刚(Yonggang Luo)
@ 2020-09-07  9:23           ` Kevin Wolf
  0 siblings, 0 replies; 7+ messages in thread
From: Kevin Wolf @ 2020-09-07  9:23 UTC (permalink / raw)
  To: 罗勇刚(Yonggang Luo)
  Cc: Thomas Huth, Daniel P. Berrange, Qemu-block, Wen Congyang,
	Xie Changlong, qemu-level

Am 05.09.2020 um 08:21 hat 罗勇刚(Yonggang Luo) geschrieben:
> On Fri, Sep 4, 2020 at 4:51 PM Kevin Wolf <kwolf@redhat.com> wrote:
> 
> > Am 04.09.2020 um 08:03 hat Thomas Huth geschrieben:
> > > On 04/09/2020 00.53, 罗勇刚(Yonggang Luo) wrote:
> > > >
> > > >
> > > > On Thu, Sep 3, 2020 at 10:33 PM Thomas Huth <thuth@redhat.com
> > > > <mailto:thuth@redhat.com>> wrote:
> > > >
> > > >     On 03/09/2020 11.18, 罗勇刚(Yonggang Luo) wrote:
> > > >     [...]
> > > >     >   TEST    check-unit: tests/test-replication.exe
> > > >     > **
> > > >     > ERROR:C:/work/xemu/qemu/tests/test-replication.c:136:make_temp:
> > > >     > assertion failed: (fd >= 0)
> > > >     > ERROR test-replication.exe - Bail out!
> > > >     > ERROR:C:/work/xemu/qemu/tests/test-replication.c:136:make_temp:
> > > >     > assertion failed: (fd >= 0)
> > > >
> > > >     At least this one should be easy to fix: The test uses /tmp as
> > > >     hard-coded directory for temporary files. I think it should use
> > > >     g_get_tmp_dir() from glib to get that directory instead.
> > > >
> > > >      Thomas
> > > >
> > > > After fixes tmp path, how to fixes following error:
> > > > $ tests/test-replication.exe
> >
> > > >
> > > >
> > > >
> > > > # random seed: R02Sdf2e4ffc0e6fbe96624598386b538927
> > > > 1..13
> > > > # Start of replication tests
> > > > # Start of primary tests
> > > > Unexpected error in bdrv_open_inherit() at ../block.c:3456:
> > > > Block protocol 'file' doesn't support the option 'locking'
> > >
> > > Not sure ... as a temporary test, try to remove the "locking=off"
> > > strings from the test. If it then works, it might be worth discussing
> > > with the block layer folks how to handle this test on Windows in the
> > > best way. If it still does not work, it's maybe simply not worth the
> > > effort to try to get this test running on Windows - and thus mark it
> > > with CONFIG_POSIX in the Makefile / meson.build.
> >
> > This is a bug in file-win32. It reads "locking" from the options QDict,
> > but doesn't delete it from it.
> >
> > Does the following help? (Only compile-tested.)
> >
> > If it works for you, I'll send it as a proper patch.
> >
> > Kevin
> >
> > diff --git a/block/file-win32.c b/block/file-win32.c
> > index ab69bd811a..e2900c3a51 100644
> > --- a/block/file-win32.c
> > +++ b/block/file-win32.c
> > @@ -299,6 +299,11 @@ static QemuOptsList raw_runtime_opts = {
> >              .type = QEMU_OPT_STRING,
> >              .help = "host AIO implementation (threads, native)",
> >          },
> > +        {
> > +            .name = "locking",
> > +            .type = QEMU_OPT_STRING,
> > +            .help = "file locking mode (on/off/auto, default: auto)",
> > +        },
> >          { /* end of list */ }
> >      },
> >  };
> > @@ -333,6 +338,7 @@ static int raw_open(BlockDriverState *bs, QDict
> > *options, int flags,
> >      Error *local_err = NULL;
> >      const char *filename;
> >      bool use_aio;
> > +    OnOffAuto locking;
> >      int ret;
> >
> >      s->type = FTYPE_FILE;
> > @@ -343,10 +349,24 @@ static int raw_open(BlockDriverState *bs, QDict
> > *options, int flags,
> >          goto fail;
> >      }
> >
> > -    if (qdict_get_try_bool(options, "locking", false)) {
> > +    locking = qapi_enum_parse(&OnOffAuto_lookup,
> > +                              qemu_opt_get(opts, "locking"),
> > +                              ON_OFF_AUTO_AUTO, &local_err);
> > +    if (local_err) {
> > +        error_propagate(errp, local_err);
> > +        ret = -EINVAL;
> > +        goto fail;
> > +    }
> > +    switch (locking) {
> > +    case ON_OFF_AUTO_ON:
> >          error_setg(errp, "locking=on is not supported on Windows");
> >          ret = -EINVAL;
> >          goto fail;
> > +    case ON_OFF_AUTO_OFF:
> > +    case ON_OFF_AUTO_AUTO:
> > +        break;
> > +    default:
> > +        g_assert_not_reached();
> >      }
> >
> >      filename = qemu_opt_get(opts, "filename");
> >
> Partial error fixed, new error are coming:

Good, I'll send the patch then.

> $ ./tests/test-replication.exe
> # random seed: R02S3f4d1c01af2b0a046990e0235c481faf
> 1..13
> # Start of replication tests
> # Start of primary tests
> ok 1 /replication/primary/read
> ok 2 /replication/primary/write
> ok 3 /replication/primary/start
> ok 4 /replication/primary/stop
> ok 5 /replication/primary/do_checkpoint
> ok 6 /replication/primary/get_error_all
> # End of primary tests
> # Start of secondary tests
> ok 7 /replication/secondary/read
> ok 8 /replication/secondary/write
> Unexpected error in bdrv_reopen_prepare() at ../block.c:4191:
> Block format 'file' used by node '#block4287' does not support reopening
> files

Can you try to find out what reopen this is?

I assume it's for switching between read-write and read-only. In this
case an implementation of .bdrv_reopen_prepare/commit/abort that can do
this switch is required.

This is more serious development work, so I can't propose a quick fix.

Alternatively, we could just declare replication unsupported on Windows
and let configure make sure that CONFIG_REPLICATION is never set for it.

Kevin



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

end of thread, other threads:[~2020-09-07  9:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03  9:18 make -i check resut for msys2 罗勇刚(Yonggang Luo)
2020-09-03 14:33 ` Thomas Huth
2020-09-03 22:53   ` 罗勇刚(Yonggang Luo)
2020-09-04  6:03     ` Thomas Huth
2020-09-04  8:50       ` Kevin Wolf
2020-09-05  6:21         ` 罗勇刚(Yonggang Luo)
2020-09-07  9:23           ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).