]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tests/qemu-iotests: Explicit usage of Python3 (scripts without __main__)
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Thu, 30 Jan 2020 16:32:30 +0000 (17:32 +0100)
committerPhilippe Mathieu-Daudé <philmd@redhat.com>
Fri, 7 Feb 2020 14:15:16 +0000 (15:15 +0100)
Use the program search path to find the Python 3 interpreter.

Patch created mechanically by running:

  $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \
      $(git grep -lF '#!/usr/bin/env python' \
      | xargs grep -L 'if __name__.*__main__')

Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200130163232.10446-11-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
36 files changed:
tests/qemu-iotests/149
tests/qemu-iotests/194
tests/qemu-iotests/202
tests/qemu-iotests/203
tests/qemu-iotests/206
tests/qemu-iotests/207
tests/qemu-iotests/208
tests/qemu-iotests/209
tests/qemu-iotests/210
tests/qemu-iotests/211
tests/qemu-iotests/212
tests/qemu-iotests/213
tests/qemu-iotests/216
tests/qemu-iotests/218
tests/qemu-iotests/219
tests/qemu-iotests/222
tests/qemu-iotests/224
tests/qemu-iotests/228
tests/qemu-iotests/234
tests/qemu-iotests/235
tests/qemu-iotests/236
tests/qemu-iotests/237
tests/qemu-iotests/238
tests/qemu-iotests/242
tests/qemu-iotests/246
tests/qemu-iotests/248
tests/qemu-iotests/254
tests/qemu-iotests/255
tests/qemu-iotests/256
tests/qemu-iotests/260
tests/qemu-iotests/262
tests/qemu-iotests/264
tests/qemu-iotests/266
tests/qemu-iotests/277
tests/qemu-iotests/280
tests/qemu-iotests/283

index 8ab42e94c6c9686a8fa78e02c40b2618d94f7d69..0a7b765d07ab2d74566e766516eb7cf871cf6c19 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2016 Red Hat, Inc.
 #
index 72e47e8833d5404cdc59477651c95866aef42acc..9dc1bd35105076dc1023882a2a790d5bedce81b1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2017 Red Hat, Inc.
 #
index 581ca34d79962d84a1e9d259feb1524357ca5a64..920a8683ef0c4b2d33097aab5c29026e0718292b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2017 Red Hat, Inc.
 #
index 4874a1a0d853c044946949a949d9490ef6bcba75..49eff5d405be204b07ff869ec464d56b4a1c45a1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2017 Red Hat, Inc.
 #
index 9f16a7df8df064c0aa09dccaa83435511c5ce99e..e2b50ae24d0bdf39c7363eb2715ede9d3d542071 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test qcow2 and file image creation
 #
index 812ab34e47b26e1a740cf2ea5fcff1d149b807c7..3d9c1208cade0065afcb160d4486191616b0996b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test ssh image creation
 #
index 546eb1de3e238882533bdbe12bcf2c592b880256..1c3fc8c7fdd78412b7a628cb08a1dfcdf8a02ad5 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2018 Red Hat, Inc.
 #
index e0f464bcbe0ba43b8a95583be847ce63d4b8e7ae..65c1a1e70a533aa777cd22e028c60a9cbf5ed8d8 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for NBD BLOCK_STATUS extension
 #
index 4ca0fe26ef27964de0a643d9f0c9cd14fedc9b29..e49896e23dd8c60915ea3d6f3302a56c1dae2635 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test luks and file image creation
 #
index 8834ebfe85399a9f0807e54a43b5eed55a7ec118..163994d55951e8a28179e42bb837c5c5ef5bb8a0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test VDI and file image creation
 #
index 8f3ccc7b15b3d8bf1eafb6f590ac1e315c8cba47..800f92dd841248e246dd6a6c3c907a8568b450d0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test parallels and file image creation
 #
index 3fc8dc6eaaccf95dc0c879edfd90aaa571d376d9..1eee45276a663b1aba26ba90ad1c3f0699213e0b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test vhdx and file image creation
 #
index 3c0ae54b4450b7ce684c45f64768f6d3c8837ec5..372f042d3ebf1bb81f1cd52864f77dba70e1cc9f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copy-on-read tests using a COR filter node
 #
index 2554d84581c0569478965324cb855fff0ec2afd0..1325ba9eaa6f02ad17aa51ef5fe1132712c41ecc 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # This test covers what happens when a mirror block job is cancelled
 # in various phases of its existence.
index 655f54d88199168c7e6685e9fc47d7e95e3e8881..b8774770c48a0226f2a81d67c3e34d0f77c67dd7 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2018 Red Hat, Inc.
 #
index 3f9f934ad81ab3e77e34ccae947570d4400e8cde..bf1718e179324ac626602c84d39d42d56cf200f4 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # This test covers the basic fleecing workflow, which provides a
 # point-in-time snapshot of a node that can be queried over NBD.
index b4dfaa639f30ee4d698a0f6036f54714d902b17c..e91fb26fd8ebc837e5cdc515d444b8826145cbee 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test json:{} filenames with qemu-internal BDSs
 # (the one of commit, to be precise)
index 9a50afd205b2d8b2fdaf800a13214c85a52130b2..64bc82ee2346114ca8bd60cb9a8d4ee3e15d6124 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test for when a backing file is considered overridden (thus, a
 # json:{} filename is generated for the overlay) and when it is not
index 59a7f949ec7d1aa0ea543568d21d262526f17674..324c1549fdcd64a15cdefe334cee7307b83ca351 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2018 Red Hat, Inc.
 #
index 3d7533980de654a515a7ce22df794debe4f2137a..760826128e3a20085e3f1c41b71ddf54ec16d511 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Simple mirror test
 #
index 79a6381f8e8e1c4e5256406b450caa97fd658c43..8ce927a16c9f83a712a6a2ef248bec51e302e476 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test bitmap merges.
 #
index a2242a47365cb276b91f17f8a5609372a6483232..50ba364a3eb9ba1717765eee0545bfdfe7a7d69a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test vmdk and file image creation
 #
index e5ac2b2ff8457d9b089411ebabeb7f12b94f08ed..d4e060228c2d6bf903eb077389561661a81f5055 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Regression test for throttle group member unregister segfault with iothread
 #
index c176e92da6a95c793974c87653677e56435302c5..97617876bcabb6f3cadc103fb80b8313111362cc 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test for qcow2 bitmap printed information
 #
index b0997a392f7d65f7f018e7569add55fd13f5ddac..59a216a839e9d0adebdd8d4d3d6ccb07090655b1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test persistent bitmap resizing.
 #
index f26b4bb2aad7b8867a994616e08d6907c6bef8f4..68c374692e75fabc86a1b5fecb996bb73867b06f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test resume mirror after auto pause on ENOSPC
 #
index 09584f3f7de2de8e91350bc962869c4752cee439..ee66c986dbba2a9743fac10a9c981d533c846af6 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test external snapshot with bitmap copying and moving.
 #
index 0ba03d9e61ea0700639bcba5b1b00062a1d72fe9..4a4818bafbf918ddfb520d0a312ee5c92b2d0309 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test commit job graph modifications while requests are active
 #
index c594a43205ee1740cb8339dee572172792920cef..e34074c83e1824a6bc2fb027a88a46eb8511f99f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test incremental/backup across iothread contexts
 #
index 4f6082c9d22d6a246cdc4b39926cf8fc26690436..30c0de380dc7f097841e9d8b31625592ac270a7b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for temporary external snapshot when we have bitmaps.
 #
index bbcb5260a6e9e857cf78feedad67a0a37fe6dfb4..8835dce7be0760504bd8e21007a6355883e7c2fe 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2019 Red Hat, Inc.
 #
index 131366422bc3a0f77c7711cbbee710e24217defc..879123a343219c4aff0f5ee1ac0068fa206c96d0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test nbd reconnect
 #
index c353cf88ee82f9541658aafdc219a57527977fb0..91bdf8729eafe917245ca4e44331e918d87e23a3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test VPC and file image creation
 #
index 1f72dca2d423bd7aa54a6900a0c2901695935c7b..04aa15a3d50fa4c8f0f2585c30bc004a718cc416 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test NBD client reconnection
 #
index 85e9114c5e6cc3b88b45a5919df02045c31179e2..69288fdd0eae7725b1aa0272b7758acac40db78d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2019 Red Hat, Inc.
 #
index 293e557bd95f0553624fba89cd555614ff4a8c1b..55b7cff953e72790e5061793b41781d4363b7955 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test for backup-top filter permission activation failure
 #