瀏覽代碼

tests/qemu-iotests: Explicit usage of Python3 (scripts without __main__)

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>
Philippe Mathieu-Daudé 5 年之前
父節點
當前提交
7c47752608

+ 1 - 1
tests/qemu-iotests/149

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2016 Red Hat, Inc.
 #

+ 1 - 1
tests/qemu-iotests/194

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2017 Red Hat, Inc.
 #

+ 1 - 1
tests/qemu-iotests/202

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2017 Red Hat, Inc.
 #

+ 1 - 1
tests/qemu-iotests/203

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2017 Red Hat, Inc.
 #

+ 1 - 1
tests/qemu-iotests/206

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test qcow2 and file image creation
 #

+ 1 - 1
tests/qemu-iotests/207

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test ssh image creation
 #

+ 1 - 1
tests/qemu-iotests/208

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2018 Red Hat, Inc.
 #

+ 1 - 1
tests/qemu-iotests/209

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for NBD BLOCK_STATUS extension
 #

+ 1 - 1
tests/qemu-iotests/210

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test luks and file image creation
 #

+ 1 - 1
tests/qemu-iotests/211

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test VDI and file image creation
 #

+ 1 - 1
tests/qemu-iotests/212

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test parallels and file image creation
 #

+ 1 - 1
tests/qemu-iotests/213

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test vhdx and file image creation
 #

+ 1 - 1
tests/qemu-iotests/216

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copy-on-read tests using a COR filter node
 #

+ 1 - 1
tests/qemu-iotests/218

@@ -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.

+ 1 - 1
tests/qemu-iotests/219

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2018 Red Hat, Inc.
 #

+ 1 - 1
tests/qemu-iotests/222

@@ -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.

+ 1 - 1
tests/qemu-iotests/224

@@ -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)

+ 1 - 1
tests/qemu-iotests/228

@@ -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

+ 1 - 1
tests/qemu-iotests/234

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2018 Red Hat, Inc.
 #

+ 1 - 1
tests/qemu-iotests/235

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Simple mirror test
 #

+ 1 - 1
tests/qemu-iotests/236

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test bitmap merges.
 #

+ 1 - 1
tests/qemu-iotests/237

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test vmdk and file image creation
 #

+ 1 - 1
tests/qemu-iotests/238

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Regression test for throttle group member unregister segfault with iothread
 #

+ 1 - 1
tests/qemu-iotests/242

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test for qcow2 bitmap printed information
 #

+ 1 - 1
tests/qemu-iotests/246

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test persistent bitmap resizing.
 #

+ 1 - 1
tests/qemu-iotests/248

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test resume mirror after auto pause on ENOSPC
 #

+ 1 - 1
tests/qemu-iotests/254

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test external snapshot with bitmap copying and moving.
 #

+ 1 - 1
tests/qemu-iotests/255

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test commit job graph modifications while requests are active
 #

+ 1 - 1
tests/qemu-iotests/256

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test incremental/backup across iothread contexts
 #

+ 1 - 1
tests/qemu-iotests/260

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Tests for temporary external snapshot when we have bitmaps.
 #

+ 1 - 1
tests/qemu-iotests/262

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2019 Red Hat, Inc.
 #

+ 1 - 1
tests/qemu-iotests/264

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test nbd reconnect
 #

+ 1 - 1
tests/qemu-iotests/266

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test VPC and file image creation
 #

+ 1 - 1
tests/qemu-iotests/277

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test NBD client reconnection
 #

+ 1 - 1
tests/qemu-iotests/280

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2019 Red Hat, Inc.
 #

+ 1 - 1
tests/qemu-iotests/283

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Test for backup-top filter permission activation failure
 #