[Qemu-devel] [PATCH v5 0/6] scripts/qemu.py fixes and cleanups

Amador Pahim posted 6 patches 6 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170725171014.25193-1-apahim@redhat.com
Test FreeBSD passed
Test checkpatch failed
Test s390x passed
There is a newer version of this series
scripts/qemu.py               | 72 ++++++++++++++++++++++++++++---------------
tests/qemu-iotests/iotests.py | 18 +++++------
2 files changed, 57 insertions(+), 33 deletions(-)
[Qemu-devel] [PATCH v5 0/6] scripts/qemu.py fixes and cleanups
Posted by Amador Pahim 6 years, 8 months ago
First commit renames self._args to self.args. The leading underscore
represents that the variable is private and as such it should not be
accessed on instances. But that variable is the main API for inclusion
of Qemu command arguments, so the rename makes it public.

Next commits contain a series of fixes and cleanups to make sure we are
correctly trying to launch the VM and properly shutting it down. More
details about the changes in the individual commit messages.

Changes v1->v2:
 - Style fixes to make checkpatch.pl happy.
 - Rebased.
Changes v2->v3:
 - Fix typo in patch 3 ("qemu.py: make 'args' public") commit message.
Changes v3->v4:
 - Squash the 2 first commits since they are co-dependant.
 - Cleanup launch() and shutdown().
 - Reorder the commits, putting the rename of self._args first.
 - Rebased.
Changes v4->v5:
 - Break the cleanup commit into logical changes and include in the
   commit messages the rationale for making them.

Amador Pahim (6):
  qemu.py: make 'args' public
  qemu.py: use poll() instead of 'returncode'
  qemu.py: cleanup message on negative exit code
  qemu.py: cleanup launch()
  qemu.py: make sure shutdown() is called before launching again
  qemu.py: include qemu command line and output on launch error

 scripts/qemu.py               | 72 ++++++++++++++++++++++++++++---------------
 tests/qemu-iotests/iotests.py | 18 +++++------
 2 files changed, 57 insertions(+), 33 deletions(-)

-- 
2.13.3


Re: [Qemu-devel] [PATCH v5 0/6] scripts/qemu.py fixes and cleanups
Posted by no-reply@patchew.org 6 years, 8 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Subject: [Qemu-devel] [PATCH v5 0/6] scripts/qemu.py fixes and cleanups
Message-id: 20170725171014.25193-1-apahim@redhat.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
04d94fd qemu.py: include qemu command line and output on launch error
70b7dac qemu.py: make sure shutdown() is called before launching again
84b4932 qemu.py: cleanup launch()
c82bab2 qemu.py: cleanup message on negative exit code
333f6d6 qemu.py: use poll() instead of 'returncode'
e2a1825 qemu.py: make 'args' public

=== OUTPUT BEGIN ===
Checking PATCH 1/6: qemu.py: make 'args' public...
WARNING: line over 80 characters
#52: FILE: scripts/qemu.py:134:
+            args = self._wrapper + [self._binary] + self._base_args() + self.args

ERROR: line over 90 characters
#61: FILE: scripts/qemu.py:157:
+                sys.stderr.write('qemu received signal %i: %s\n' % (-exitcode, ' '.join(self.args)))

total: 1 errors, 1 warnings, 83 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 2/6: qemu.py: use poll() instead of 'returncode'...
Checking PATCH 3/6: qemu.py: cleanup message on negative exit code...
Checking PATCH 4/6: qemu.py: cleanup launch()...
Checking PATCH 5/6: qemu.py: make sure shutdown() is called before launching again...
Checking PATCH 6/6: qemu.py: include qemu command line and output on launch error...
WARNING: line over 80 characters
#33: FILE: scripts/qemu.py:147:
+            args = self._wrapper + [self._binary] + self._base_args() + self._args

total: 0 errors, 1 warnings, 36 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org