qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [libvirt] [RFC v4 00/13] qmp: query-device-slots comman


From: no-reply
Subject: Re: [Qemu-devel] [libvirt] [RFC v4 00/13] qmp: query-device-slots command
Date: Mon, 14 Aug 2017 15:37:55 -0700 (PDT)

Hi,

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

Message-id: address@hidden
Subject: [libvirt] [RFC v4 00/13] qmp: query-device-slots command
Type: series

=== 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'
74ba25a5a6 tests: Experimental query-device-slots test code
7f1ba7578a usb: enumerate_slots implementation
d4d30fcce1 pci: enumerate_slots implementation
c1efb02a42 pci: device-number & function properties
d846237b2b pci: pci_bus_has_pcie_upstream_port() function
303d9fc784 ide: enumerate_slots implementation
4141d83d87 qdev: Enumerate CPU slots on query-device-slots
d6b8967936 qdev core: generic enumerate_slots implementation
1ef51c3a5d query-device-slots: Collapse similar entries
0d84442287 qdev: Slot info helpers
3cfd385bcb qdev: Add BusClass::device_type field
6c98a4872f qapi: qobject_compare() helper
f695dbd533 qmp: Define query-device-slots command

=== OUTPUT BEGIN ===
Checking PATCH 1/13: qmp: Define query-device-slots command...
Checking PATCH 2/13: qapi: qobject_compare() helper...
ERROR: line over 90 characters
#140: FILE: qapi/qapi-util.c:140:
+        return strcmp(qstring_get_str(qobject_to_qstring(a)), 
qstring_get_str(qobject_to_qstring(b)));

ERROR: line over 90 characters
#142: FILE: qapi/qapi-util.c:142:
+        return (int)qbool_get_bool(qobject_to_qbool(a)) - 
(int)qbool_get_bool(qobject_to_qbool(b));

total: 2 errors, 0 warnings, 193 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 3/13: qdev: Add BusClass::device_type field...
Checking PATCH 4/13: qdev: Slot info helpers...
ERROR: do not use C99 // comments
#54: FILE: hw/core/slotinfo.c:13:
+//#define DEBUG_QOBJECTS

ERROR: __func__ should be used instead of gcc specific __FUNCTION__
#59: FILE: hw/core/slotinfo.c:18:
+#define DBG(args...) do { _DBG("%s: ", __FUNCTION__); \

ERROR: line over 90 characters
#559: FILE: hw/core/slotinfo.c:518:
+static DeviceSlotInfoList **slot_list_try_combine_slot(DeviceSlotInfoList **l, 
DeviceSlotInfo *slot)

ERROR: code indent should never use tabs
#709: FILE: include/hw/qdev-slotinfo.h:52:
+^I                       const char **opt_name);$

WARNING: line over 80 characters
#734: FILE: include/hw/qdev-slotinfo.h:77:
+static inline SlotOption *slot_find_opt(DeviceSlotInfo *slot, const char 
*option)

ERROR: code indent should never use tabs
#736: FILE: include/hw/qdev-slotinfo.h:79:
+^Ireturn slot_options_find_opt(slot->opts, option);$

ERROR: space prohibited after that open parenthesis '('
#848: FILE: tests/test-slotinfo.c:54:
+    g_assert_true( json_valuelist_contains(TEST_RANGE, "-100"));

ERROR: space prohibited after that open parenthesis '('
#849: FILE: tests/test-slotinfo.c:55:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,  "-99"));

ERROR: space prohibited after that open parenthesis '('
#852: FILE: tests/test-slotinfo.c:58:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,  "-51"));

ERROR: space prohibited after that open parenthesis '('
#853: FILE: tests/test-slotinfo.c:59:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,  "-50"));

ERROR: space prohibited after that open parenthesis '('
#854: FILE: tests/test-slotinfo.c:60:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,  "-49"));

ERROR: space prohibited after that open parenthesis '('
#857: FILE: tests/test-slotinfo.c:63:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,   "-1"));

ERROR: space prohibited after that open parenthesis '('
#858: FILE: tests/test-slotinfo.c:64:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,    "0"));

ERROR: space prohibited after that open parenthesis '('
#859: FILE: tests/test-slotinfo.c:65:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,    "1"));

ERROR: space prohibited after that open parenthesis '('
#860: FILE: tests/test-slotinfo.c:66:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,    "2"));

ERROR: space prohibited after that open parenthesis '('
#863: FILE: tests/test-slotinfo.c:69:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,    "4"));

ERROR: space prohibited after that open parenthesis '('
#864: FILE: tests/test-slotinfo.c:70:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,    "5"));

ERROR: space prohibited after that open parenthesis '('
#865: FILE: tests/test-slotinfo.c:71:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,    "6"));

ERROR: space prohibited after that open parenthesis '('
#868: FILE: tests/test-slotinfo.c:74:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,    "9"));

ERROR: space prohibited after that open parenthesis '('
#869: FILE: tests/test-slotinfo.c:75:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,   "10"));

ERROR: space prohibited after that open parenthesis '('
#874: FILE: tests/test-slotinfo.c:80:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,   "14"));

ERROR: space prohibited after that open parenthesis '('
#879: FILE: tests/test-slotinfo.c:85:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,   "18"));

ERROR: space prohibited after that open parenthesis '('
#880: FILE: tests/test-slotinfo.c:86:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,   "19"));

ERROR: space prohibited after that open parenthesis '('
#881: FILE: tests/test-slotinfo.c:87:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,   "20"));

ERROR: space prohibited after that open parenthesis '('
#886: FILE: tests/test-slotinfo.c:92:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,   "51"));

ERROR: space prohibited after that open parenthesis '('
#892: FILE: tests/test-slotinfo.c:98:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,   "\"aaaa2\""));

ERROR: space prohibited after that open parenthesis '('
#899: FILE: tests/test-slotinfo.c:105:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,   "\"jyz\""));

ERROR: space prohibited after that open parenthesis '('
#900: FILE: tests/test-slotinfo.c:106:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,   "\"jyz2\""));

ERROR: space prohibited after that open parenthesis '('
#901: FILE: tests/test-slotinfo.c:107:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,   "\"jyz3\""));

ERROR: space prohibited after that open parenthesis '('
#906: FILE: tests/test-slotinfo.c:112:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,   "\"kkk\""));

ERROR: space prohibited after that open parenthesis '('
#912: FILE: tests/test-slotinfo.c:118:
+    g_assert_true( json_valuelist_contains(TEST_RANGE,   "[30, 31]"));

ERROR: do not use C99 // comments
#1003: FILE: tests/test-slotinfo.c:209:
+    //TODO: make this work:

total: 31 errors, 1 warnings, 1142 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 5/13: query-device-slots: Collapse similar entries...
Checking PATCH 6/13: qdev core: generic enumerate_slots implementation...
Checking PATCH 7/13: qdev: Enumerate CPU slots on query-device-slots...
Checking PATCH 8/13: ide: enumerate_slots implementation...
Checking PATCH 9/13: pci: pci_bus_has_pcie_upstream_port() function...
ERROR: space required before the open parenthesis '('
#35: FILE: hw/pci/pci.c:2612:
+    if(pci_bus_has_pcie_upstream_port(pci_dev->bus)) {

total: 1 errors, 0 warnings, 19 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 10/13: pci: device-number & function properties...
Checking PATCH 11/13: pci: enumerate_slots implementation...
ERROR: space required before the open parenthesis '('
#166: FILE: hw/pci/pci.c:167:
+    for(devnr = PCI_SLOT(pb->devfn_min); devnr < devnrs; devnr++) {

WARNING: line over 80 characters
#171: FILE: hw/pci/pci.c:172:
+            /*TODO: add info about accepting only bridges on extra PCI root 
buses */

total: 1 errors, 1 warnings, 68 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 12/13: usb: enumerate_slots implementation...
ERROR: line over 90 characters
#54: FILE: hw/usb/bus.c:29:
+static void usb_bus_enumerate_slot_list(DeviceSlotInfoList **r, USBBus *bus, 
USBPortList *l)

total: 1 errors, 0 warnings, 72 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 13/13: tests: Experimental query-device-slots test code...
WARNING: line over 80 characters
#152: FILE: tests/qmp-machine-info.py:132:
+        types = self.vm.command('qom-list-types', implements=implements, 
**kwargs)

WARNING: line over 80 characters
#160: FILE: tests/qmp-machine-info.py:140:
+        no_user_devs = set([d['name'] for d in infoQDM(self.vm, ) if 
d['no-user']])

WARNING: line over 80 characters
#170: FILE: tests/qmp-machine-info.py:150:
+        """Check if the bus identified by the slot matches the information 
returned

ERROR: line over 90 characters
#181: FILE: tests/qmp-machine-info.py:161:
+        ## but the bus _name_ (accepted by qbus_find()) does not necessarily 
matches the bus _path_

WARNING: line over 80 characters
#207: FILE: tests/qmp-machine-info.py:187:
+            for st in self.vm.command('qom-list-types', implements=t, 
abstract=False):

WARNING: line over 80 characters
#208: FILE: tests/qmp-machine-info.py:188:
+                dprops = self.vm.command('device-list-properties', 
typename=st['name'])

ERROR: line over 90 characters
#215: FILE: tests/qmp-machine-info.py:195:
+            if slot.has_key('max-devices') and len(slot['devices']) >= 
slot['max-devices']:

ERROR: line over 90 characters
#240: FILE: tests/qmp-machine-info.py:220:
+                self.assertTrue(any(self.typeImplements(dtype, t) for t in 
slot['device-types']))

ERROR: line over 90 characters
#243: FILE: tests/qmp-machine-info.py:223:
+                self.assertTrue(len(self.getUserCreatableSubtypes(dt)) > 0, 
"There's no user-creatable subtype of %s" % (dt))

WARNING: line over 80 characters
#248: FILE: tests/qmp-machine-info.py:228:
+                all_counts = [len(ValuesIterator(p['values'])) for p in 
slot['opts']]

WARNING: line over 80 characters
#266: FILE: tests/qmp-machine-info.py:246:
+        """Dynamically add a testMachine_<arch>_<name>_<machine> method to the 
class"""

WARNING: line over 80 characters
#273: FILE: tests/qmp-machine-info.py:253:
+        method_name = 'test_%s_%s_%s' % (method_name, machine['arch'], 
machine_name)

WARNING: line over 80 characters
#286: FILE: tests/qmp-machine-info.py:266:
+        vm = qtest.QEMUQtestMachine(binary=binary, args=['-S', '-machine', 
'none'])

WARNING: line over 80 characters
#305: FILE: tests/qmp-machine-info.py:285:
+        method_names = unittest.loader.getTestCaseNames(klass, 
prefix='machineTest')

total: 4 errors, 10 warnings, 300 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 address@hidden

reply via email to

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