qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 835d68: iotests: Hide timestamps for skipped


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 835d68: iotests: Hide timestamps for skipped tests
Date: Tue, 18 Jun 2019 09:32:50 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 835d689d257ddc8893febf6e93747c201614d078
      
https://github.com/qemu/qemu/commit/835d689d257ddc8893febf6e93747c201614d078
  Author: Max Reitz <address@hidden>
  Date:   2019-06-18 (Tue, 18 Jun 2019)

  Changed paths:
    M tests/qemu-iotests/check

  Log Message:
  -----------
  iotests: Hide timestamps for skipped tests

Currently, the "thistime" variable is not reinitialized on every loop
iteration.  This leads to tests that do not yield a run time (because
they failed or were skipped) printing the run time of the previous test
that did.  Fix that by reinitializing "thistime" for every test.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: cc19f1773d30d13293d703140eb5627e393ace6e
      
https://github.com/qemu/qemu/commit/cc19f1773d30d13293d703140eb5627e393ace6e
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-06-18 (Tue, 18 Jun 2019)

  Changed paths:
    M block/mirror.c
    M block/replication.c
    M include/block/block_int.h

  Log Message:
  -----------
  block/replication: drop usage of bs->job

We are going to remove bs->job pointer. Drop it's usage in replication
code. Additionally we have to return job pointer from some mirror APIs.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 68d00e429395a273cf25827f89f036548fb67bdd
      
https://github.com/qemu/qemu/commit/68d00e429395a273cf25827f89f036548fb67bdd
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-06-18 (Tue, 18 Jun 2019)

  Changed paths:
    M block/block-backend.c
    M monitor/qmp-cmds.c

  Log Message:
  -----------
  block/block-backend: blk_iostatus_reset: drop usage of bs->job

We are going to remove bs->job pointer. Drop it's usage in
blk_iostatus_reset.

blk_iostatus_reset() has only two callers:

1. blk_attach_dev(). This doesn't have anything to do with jobs and
    attaching a new guest device won't solve any problem the job
    encountered, so no reason to reset the iostatus for the job.

2. qmp_cont(). This resets the iostatus for everything. We can just
    call block_job_iostatus_reset() for all block jobs instead of going
    through BlockBackend.

Suggested-by: Kevin Wolf <address@hidden>
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 8164102ffe02dfc6478c0b3f8ffce29705a9a53b
      
https://github.com/qemu/qemu/commit/8164102ffe02dfc6478c0b3f8ffce29705a9a53b
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-06-18 (Tue, 18 Jun 2019)

  Changed paths:
    M blockdev.c
    M blockjob.c
    M include/block/blockjob.h

  Log Message:
  -----------
  blockdev: blockdev_mark_auto_del: drop usage of bs->job

We are going to remove bs->job pointer. Drop it's usage in
blockdev_mark_auto_del: instead of looking at bs->job let's check all
jobs for references to bs.

Suggested-by: Kevin Wolf <address@hidden>
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: b23c580c946644b906af36e3f903b9fedd6ccd61
      
https://github.com/qemu/qemu/commit/b23c580c946644b906af36e3f903b9fedd6ccd61
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-06-18 (Tue, 18 Jun 2019)

  Changed paths:
    M block.c
    M block/trace-events
    M blockdev.c
    M blockjob.c
    M include/block/block_int.h
    M tests/test-blockjob.c

  Log Message:
  -----------
  block: drop bs->job

Drop remaining users of bs->job:
1. assertions actually duplicated by assert(!bs->refcnt)
2. trace-point seems not enough reason to change stream_start to return
   BlockJob pointer
3. Restricting creation of two jobs based on same bs is bad idea, as
   3.1 Some jobs creates filters to be their main node, so, this check
   don't actually prevent creating second job on same real node (which
   will create another filter node) (but I hope it is restricted by
   other mechanisms)
   3.2 Even without bs->job we have two systems of permissions:
   op-blockers and BLK_PERM
   3.3 We may want to run several jobs on one node one day

And finally, drop bs->job pointer itself. Hurrah!

Suggested-by: Kevin Wolf <address@hidden>
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 094e36394481fd2c8493cec2a7c026f342232f15
      
https://github.com/qemu/qemu/commit/094e36394481fd2c8493cec2a7c026f342232f15
  Author: Max Reitz <address@hidden>
  Date:   2019-06-18 (Tue, 18 Jun 2019)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  file-posix: Update open_flags in raw_set_perm()

raw_check_perm() + raw_set_perm() can change the flags associated with
the current FD.  If so, we have to update BDRVRawState.open_flags
accordingly.  Otherwise, we may keep reopening the FD even though the
current one already has the correct flags.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c1087f12066a1ff34153dd10662c1a46a874087c
      
https://github.com/qemu/qemu/commit/c1087f12066a1ff34153dd10662c1a46a874087c
  Author: Max Reitz <address@hidden>
  Date:   2019-06-18 (Tue, 18 Jun 2019)

  Changed paths:
    M block.c
    M include/block/block_int.h

  Log Message:
  -----------
  block: Add bdrv_child_refresh_perms()

If a block node uses bdrv_child_try_set_perm() to change the permission
it takes on its child, the result may be very short-lived.  If anything
makes the block layer recalculate the permissions internally, it will
invoke the node driver's .bdrv_child_perm() implementation.  The
permission/shared permissions masks that returns will then override the
values previously passed to bdrv_child_try_set_perm().

If drivers want a child edge to have specific values for the
permissions/shared permissions mask, it must return them in
.bdrv_child_perm().  Consequentially, there is no need for them to pass
the same values to bdrv_child_try_set_perm() then: It is better to have
a function that invokes .bdrv_child_perm() and calls
bdrv_child_try_set_perm() with the result.  This patch adds such a
function under the name of bdrv_child_refresh_perms().

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: f94dc3b414028bc762f51ea66c170276130d5f8a
      
https://github.com/qemu/qemu/commit/f94dc3b414028bc762f51ea66c170276130d5f8a
  Author: Max Reitz <address@hidden>
  Date:   2019-06-18 (Tue, 18 Jun 2019)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  block/mirror: Fix child permissions

We cannot use bdrv_child_try_set_perm() to give up all restrictions on
the child edge, and still have bdrv_mirror_top_child_perm() request
BLK_PERM_WRITE.  Fix this by making bdrv_mirror_top_child_perm() return
0/BLK_PERM_ALL when we want to give up all permissions, and replacing
bdrv_child_try_set_perm() by bdrv_child_refresh_perms().

The bdrv_child_try_set_perm() before removing the node with
bdrv_replace_node() is then unnecessary.  No permissions have changed
since the previous invocation of bdrv_child_try_set_perm().

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a193ad3b3b27eec6914bd3cd7dc4bff02f59177f
      
https://github.com/qemu/qemu/commit/a193ad3b3b27eec6914bd3cd7dc4bff02f59177f
  Author: Max Reitz <address@hidden>
  Date:   2019-06-18 (Tue, 18 Jun 2019)

  Changed paths:
    M block/commit.c

  Log Message:
  -----------
  block/commit: Drop bdrv_child_try_set_perm()

commit_top_bs never requests or unshares any permissions.  There is no
reason to make this so explicit here.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 87ace5f8b6cbb9be14cf771a8962e32fd97f9660
      
https://github.com/qemu/qemu/commit/87ace5f8b6cbb9be14cf771a8962e32fd97f9660
  Author: Max Reitz <address@hidden>
  Date:   2019-06-18 (Tue, 18 Jun 2019)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Fix order in bdrv_replace_child()

We have to start by applying the permission restrictions to new_bs
before we can loosen them on old_bs.  See the comment for the
explanation.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 9eab1544150229609d67e83f52e969ed0ec2c8a3
      
https://github.com/qemu/qemu/commit/9eab1544150229609d67e83f52e969ed0ec2c8a3
  Author: Max Reitz <address@hidden>
  Date:   2019-06-18 (Tue, 18 Jun 2019)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Add *tighten_restrictions to *check*_perm()

This patch makes three functions report whether the necessary permission
change tightens restrictions or not.  These functions are:
- bdrv_check_perm()
- bdrv_check_update_perm()
- bdrv_child_check_perm()

Callers can use this result to decide whether a failure is fatal or not
(see the next patch).

Signed-off-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 1046779e64eaa7ff0f3949e29e70364947fb48b6
      
https://github.com/qemu/qemu/commit/1046779e64eaa7ff0f3949e29e70364947fb48b6
  Author: Max Reitz <address@hidden>
  Date:   2019-06-18 (Tue, 18 Jun 2019)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Ignore loosening perm restrictions failures

We generally assume that loosening permission restrictions can never
fail.  We have seen in the past that this assumption is wrong.  This has
led to crashes because we generally pass &error_abort when loosening
permissions.

However, a failure in such a case should actually be handled in quite
the opposite way: It is very much not fatal, so qemu may report it, but
still consider the operation successful.  The only realistic problem is
that qemu may then retain permissions and thus locks on images it
actually does not require.  But again, that is not fatal.

To implement this behavior, we make all functions that change
permissions and that pass &error_abort to the initiating function
(bdrv_check_perm() or bdrv_child_check_perm()) evaluate the
@loosen_restrictions value introduced in the previous patch.  If it is
true and an error did occur, we abort the permission update, discard the
error, and instead report success to the caller.

bdrv_child_try_set_perm() itself does not pass &error_abort, but it is
the only public function to change permissions.  As such, callers may
pass &error_abort to it, expecting dropping permission restrictions to
never fail.

Signed-off-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: dc68c9d3e80e605c8ff5165a7e352d6efd9f999d
      
https://github.com/qemu/qemu/commit/dc68c9d3e80e605c8ff5165a7e352d6efd9f999d
  Author: Max Reitz <address@hidden>
  Date:   2019-06-18 (Tue, 18 Jun 2019)

  Changed paths:
    M tests/qemu-iotests/182
    M tests/qemu-iotests/182.out

  Log Message:
  -----------
  iotests: Test failure to loosen restrictions

Signed-off-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 128b05f7e00765d883164631b974a27af5b4b613
      
https://github.com/qemu/qemu/commit/128b05f7e00765d883164631b974a27af5b4b613
  Author: Kevin Wolf <address@hidden>
  Date:   2019-06-18 (Tue, 18 Jun 2019)

  Changed paths:
    M qapi/block-core.json

  Log Message:
  -----------
  block/null: Expose read-zeroes option in QAPI schema

Commit cd219eb1e55 added the read-zeroes option for the null-co and
null-aio block driver, but forgot to add them to the QAPI schema.
Therefore, this option wasn't available in -blockdev and blockdev-add
until now.

Add the missing option in the schema to make it available there, too.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>


  Commit: 33d609990621dea6c7d056c86f707b8811320ac1
      
https://github.com/qemu/qemu/commit/33d609990621dea6c7d056c86f707b8811320ac1
  Author: Peter Maydell <address@hidden>
  Date:   2019-06-18 (Tue, 18 Jun 2019)

  Changed paths:
    M block.c
    M block/block-backend.c
    M block/commit.c
    M block/file-posix.c
    M block/mirror.c
    M block/replication.c
    M block/trace-events
    M blockdev.c
    M blockjob.c
    M include/block/block_int.h
    M include/block/blockjob.h
    M monitor/qmp-cmds.c
    M qapi/block-core.json
    M tests/qemu-iotests/182
    M tests/qemu-iotests/182.out
    M tests/qemu-iotests/check
    M tests/test-blockjob.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Block layer patches:

- block: Remove bs->job
- block: Ignore loosening perm restrictions failures
- block/null: Expose read-zeroes option in QAPI schema
- iotests: Hide timestamps for skipped tests

# gpg: Signature made Tue 18 Jun 2019 15:44:12 BST
# gpg:                using RSA key 7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>" [full]
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* remotes/kevin/tags/for-upstream:
  block/null: Expose read-zeroes option in QAPI schema
  iotests: Test failure to loosen restrictions
  block: Ignore loosening perm restrictions failures
  block: Add *tighten_restrictions to *check*_perm()
  block: Fix order in bdrv_replace_child()
  block/commit: Drop bdrv_child_try_set_perm()
  block/mirror: Fix child permissions
  block: Add bdrv_child_refresh_perms()
  file-posix: Update open_flags in raw_set_perm()
  block: drop bs->job
  blockdev: blockdev_mark_auto_del: drop usage of bs->job
  block/block-backend: blk_iostatus_reset: drop usage of bs->job
  block/replication: drop usage of bs->job
  iotests: Hide timestamps for skipped tests

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/afec70e4de8e...33d609990621



reply via email to

[Prev in Thread] Current Thread [Next in Thread]