History log of /openbmc/qemu/scripts/qapi/ (Results 226 – 250 of 510)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
538cd41021-Apr-2021 John Snow <jsnow@redhat.com>

qapi/expr.py: Modify check_keys to accept any Collection

This is a minor adjustment that lets parameters @required and
@optional take tuple arguments, in particular (). Later patches will
make use

qapi/expr.py: Modify check_keys to accept any Collection

This is a minor adjustment that lets parameters @required and
@optional take tuple arguments, in particular (). Later patches will
make use of that.

(Iterable would also have worked, but Iterable also includes things like
generator expressions which are consumed upon iteration, which would
require a rewrite to make sure that each input was only traversed
once. Collection implies the "can re-iterate" property.)

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-10-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>

show more ...

7a783ce521-Apr-2021 John Snow <jsnow@redhat.com>

qapi/expr.py: Add casts in a few select cases

Casts are instructions to the type checker only, they aren't "safe" and
should probably be avoided in general. In this case, when we perform
type checki

qapi/expr.py: Add casts in a few select cases

Casts are instructions to the type checker only, they aren't "safe" and
should probably be avoided in general. In this case, when we perform
type checking on a nested structure, the type of each field does not
"stick".

(See PEP 647 for an example of "type narrowing" that does "stick".
It is available in Python 3.10, so we can't use it yet.)

We don't need to assert that something is a str if we've already checked
or asserted that it is -- use a cast instead for these cases.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-9-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>

show more ...

4918bb7d21-Apr-2021 John Snow <jsnow@redhat.com>

qapi/expr.py: Check type of union and alternate 'data' member

Prior to this commit, specifying a non-object value here causes the QAPI
parser to crash in expr.py with a stack trace with (likely) an

qapi/expr.py: Check type of union and alternate 'data' member

Prior to this commit, specifying a non-object value here causes the QAPI
parser to crash in expr.py with a stack trace with (likely) an
AttributeError when we attempt to call that value's items() method.

This member needs to be an object (Dict), and not anything else. Add a
check for this with a nicer error message, and formalize that check with
new test cases that exercise that error.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-8-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>

show more ...

926bb8ad21-Apr-2021 John Snow <jsnow@redhat.com>

qapi/expr.py: move string check upwards in check_type

For readability purposes only, shimmy the early return upwards to the
top of the function, so cases proceed in order from least to most
complex.

qapi/expr.py: move string check upwards in check_type

For readability purposes only, shimmy the early return upwards to the
top of the function, so cases proceed in order from least to most
complex.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210421182032.3521476-7-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>

show more ...

b66c62a221-Apr-2021 John Snow <jsnow@redhat.com>

qapi/expr.py: Add assertion for union type 'check_dict'

mypy isn't fond of allowing you to check for bool membership in a
collection of str elements. Guard this lookup for precisely when we were
giv

qapi/expr.py: Add assertion for union type 'check_dict'

mypy isn't fond of allowing you to check for bool membership in a
collection of str elements. Guard this lookup for precisely when we were
given a name.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210421182032.3521476-6-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>

show more ...

59b5556c21-Apr-2021 John Snow <jsnow@redhat.com>

qapi/expr.py: constrain incoming expression types

mypy does not know the types of values stored in Dicts that masquerade
as objects. Help the type checker out by constraining the type.

Signed-off-b

qapi/expr.py: constrain incoming expression types

mypy does not know the types of values stored in Dicts that masquerade
as objects. Help the type checker out by constraining the type.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-5-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>

show more ...

0f231dcf21-Apr-2021 John Snow <jsnow@redhat.com>

qapi/expr.py: Check for dict instead of OrderedDict

OrderedDict is a subtype of dict, so we can check for a more general
form. These functions do not themselves depend on it being any
particular typ

qapi/expr.py: Check for dict instead of OrderedDict

OrderedDict is a subtype of dict, so we can check for a more general
form. These functions do not themselves depend on it being any
particular type.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210421182032.3521476-4-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>

show more ...

b7341b8921-Apr-2021 John Snow <jsnow@redhat.com>

qapi/expr.py: Remove 'info' argument from nested check_if_str

The function can just use the argument from the scope above. Otherwise,
we get shadowed argument errors because the parameter name clash

qapi/expr.py: Remove 'info' argument from nested check_if_str

The function can just use the argument from the scope above. Otherwise,
we get shadowed argument errors because the parameter name clashes with
the name of a variable already in-scope.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210421182032.3521476-3-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>

show more ...

d0a263cd21-Apr-2021 John Snow <jsnow@redhat.com>

qapi/expr: Comment cleanup

The linter yaps after 0825f62c842. Fix this trivial issue to restore the
linter baseline.

(Yes, ideally -- and soon -- the linter will be part of CI so we don't
clutter u

qapi/expr: Comment cleanup

The linter yaps after 0825f62c842. Fix this trivial issue to restore the
linter baseline.

(Yes, ideally -- and soon -- the linter will be part of CI so we don't
clutter up the log with fixups. For now, though, the baseline is useful
for testing intermediate commits as types are added to the QAPI
library.)

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-2-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>

show more ...


/openbmc/qemu/.cirrus.yml
/openbmc/qemu/.gitlab-ci.d/crossbuilds.yml
/openbmc/qemu/.gitlab-ci.yml
/openbmc/qemu/MAINTAINERS
/openbmc/qemu/VERSION
/openbmc/qemu/accel/tcg/translate-all.c
/openbmc/qemu/backends/dbus-vmstate.c
/openbmc/qemu/block/mirror.c
/openbmc/qemu/block/monitor/block-hmp-cmds.c
/openbmc/qemu/block/nbd.c
/openbmc/qemu/block/qcow2.c
/openbmc/qemu/block/rbd.c
/openbmc/qemu/block/vdi.c
/openbmc/qemu/blockdev.c
/openbmc/qemu/chardev/char-socket.c
/openbmc/qemu/chardev/char.c
/openbmc/qemu/configure
/openbmc/qemu/contrib/vhost-user-gpu/meson.build
/openbmc/qemu/contrib/vhost-user-gpu/vhost-user-gpu.c
/openbmc/qemu/contrib/vhost-user-gpu/virgl.c
/openbmc/qemu/contrib/vhost-user-gpu/vugbm.c
/openbmc/qemu/contrib/vhost-user-gpu/vugbm.h
/openbmc/qemu/crypto/tlscredsx509.c
/openbmc/qemu/disas/arm-a64.cc
/openbmc/qemu/disas/nanomips.cpp
/openbmc/qemu/docs/defs.rst.inc
/openbmc/qemu/docs/devel/build-system.rst
/openbmc/qemu/docs/devel/code-of-conduct.rst
/openbmc/qemu/docs/devel/conflict-resolution.rst
/openbmc/qemu/docs/devel/index.rst
/openbmc/qemu/docs/devel/style.rst
/openbmc/qemu/docs/devel/tcg-plugins.rst
/openbmc/qemu/docs/interop/index.rst
/openbmc/qemu/docs/specs/index.rst
/openbmc/qemu/docs/sphinx/qapidoc.py
/openbmc/qemu/docs/system/gdb.rst
/openbmc/qemu/docs/system/index.rst
/openbmc/qemu/docs/system/nvme.rst
/openbmc/qemu/docs/system/removed-features.rst
/openbmc/qemu/docs/tools/index.rst
/openbmc/qemu/docs/tools/qemu-storage-daemon.rst
/openbmc/qemu/docs/user/index.rst
/openbmc/qemu/hmp-commands.hx
/openbmc/qemu/hw/acpi/piix4.c
/openbmc/qemu/hw/arm/armsse.c
/openbmc/qemu/hw/arm/mps2-tz.c
/openbmc/qemu/hw/arm/smmuv3-internal.h
/openbmc/qemu/hw/arm/smmuv3.c
/openbmc/qemu/hw/arm/virt-acpi-build.c
/openbmc/qemu/hw/arm/virt.c
/openbmc/qemu/hw/block/fdc.c
/openbmc/qemu/hw/block/nvme-dif.c
/openbmc/qemu/hw/block/nvme-dif.h
/openbmc/qemu/hw/block/nvme-ns.c
/openbmc/qemu/hw/block/nvme-ns.h
/openbmc/qemu/hw/block/nvme-subsys.c
/openbmc/qemu/hw/block/nvme-subsys.h
/openbmc/qemu/hw/block/nvme.c
/openbmc/qemu/hw/block/nvme.h
/openbmc/qemu/hw/block/trace-events
/openbmc/qemu/hw/block/vhost-user-blk.c
/openbmc/qemu/hw/block/xen-block.c
/openbmc/qemu/hw/char/pl011.c
/openbmc/qemu/hw/char/terminal3270.c
/openbmc/qemu/hw/core/loader.c
/openbmc/qemu/hw/core/machine.c
/openbmc/qemu/hw/cpu/core.c
/openbmc/qemu/hw/display/edid-generate.c
/openbmc/qemu/hw/display/xlnx_dp.c
/openbmc/qemu/hw/isa/Kconfig
/openbmc/qemu/hw/isa/piix4.c
/openbmc/qemu/hw/isa/vt82c686.c
/openbmc/qemu/hw/net/fsl_etsec/rings.c
/openbmc/qemu/hw/net/npcm7xx_emc.c
/openbmc/qemu/hw/net/xen_nic.c
/openbmc/qemu/hw/pci/pci.c
/openbmc/qemu/hw/pci/pcie.c
/openbmc/qemu/hw/ppc/e500.c
/openbmc/qemu/hw/ppc/e500plat.c
/openbmc/qemu/hw/ppc/spapr.c
/openbmc/qemu/hw/ppc/spapr_drc.c
/openbmc/qemu/hw/s390x/3270-ccw.c
/openbmc/qemu/hw/s390x/css.c
/openbmc/qemu/hw/s390x/meson.build
/openbmc/qemu/hw/s390x/virtio-ccw-gpu.c
/openbmc/qemu/hw/s390x/virtio-ccw.c
/openbmc/qemu/hw/s390x/virtio-ccw.h
/openbmc/qemu/hw/scsi/esp-pci.c
/openbmc/qemu/hw/scsi/esp.c
/openbmc/qemu/hw/scsi/mptsas.c
/openbmc/qemu/hw/scsi/mptsas.h
/openbmc/qemu/hw/timer/renesas_tmr.c
/openbmc/qemu/hw/usb/dev-smartcard-reader.c
/openbmc/qemu/hw/usb/hcd-ehci-sysbus.c
/openbmc/qemu/hw/usb/hcd-ehci.c
/openbmc/qemu/hw/virtio/vhost-user-fs.c
/openbmc/qemu/hw/virtio/virtio-balloon.c
/openbmc/qemu/hw/virtio/virtio-pci.c
/openbmc/qemu/hw/virtio/virtio-pci.h
/openbmc/qemu/include/block/nvme.h
/openbmc/qemu/include/chardev/char.h
/openbmc/qemu/include/crypto/tlscreds.h
/openbmc/qemu/include/exec/cpu-all.h
/openbmc/qemu/include/exec/memory.h
/openbmc/qemu/include/exec/page-vary.h
/openbmc/qemu/include/hw/boards.h
/openbmc/qemu/include/hw/char/pl011.h
/openbmc/qemu/include/hw/i386/x86.h
/openbmc/qemu/include/hw/loader.h
/openbmc/qemu/include/hw/pci/pcie.h
/openbmc/qemu/include/hw/ppc/spapr.h
/openbmc/qemu/include/hw/ppc/spapr_drc.h
/openbmc/qemu/include/hw/s390x/css.h
/openbmc/qemu/include/hw/s390x/s390_flic.h
/openbmc/qemu/include/hw/scsi/esp.h
/openbmc/qemu/include/migration/misc.h
/openbmc/qemu/include/net/net.h
/openbmc/qemu/include/qemu/compiler.h
/openbmc/qemu/include/qemu/coroutine.h
/openbmc/qemu/include/qemu/osdep.h
/openbmc/qemu/include/qemu/timer.h
/openbmc/qemu/include/qemu/yank.h
/openbmc/qemu/include/sysemu/arch_init.h
/openbmc/qemu/include/ui/console.h
/openbmc/qemu/job.c
/openbmc/qemu/linux-user/qemu.h
/openbmc/qemu/linux-user/riscv/cpu_loop.c
/openbmc/qemu/linux-user/s390x/signal.c
/openbmc/qemu/linux-user/syscall.c
/openbmc/qemu/linux-user/uaccess.c
/openbmc/qemu/meson.build
/openbmc/qemu/migration/block-dirty-bitmap.c
/openbmc/qemu/migration/channel.c
/openbmc/qemu/migration/meson.build
/openbmc/qemu/migration/migration.c
/openbmc/qemu/migration/multifd.c
/openbmc/qemu/migration/qemu-file-channel.c
/openbmc/qemu/migration/ram.c
/openbmc/qemu/migration/ram.h
/openbmc/qemu/migration/yank_functions.c
/openbmc/qemu/migration/yank_functions.h
/openbmc/qemu/monitor/qmp-cmds.c
/openbmc/qemu/net/l2tpv3.c
/openbmc/qemu/net/net.c
/openbmc/qemu/net/netmap.c
/openbmc/qemu/net/slirp.c
/openbmc/qemu/net/socket.c
/openbmc/qemu/net/tap-win32.c
/openbmc/qemu/net/tap.c
/openbmc/qemu/net/vde.c
/openbmc/qemu/net/vhost-user.c
/openbmc/qemu/net/vhost-vdpa.c
/openbmc/qemu/page-vary-common.c
/openbmc/qemu/page-vary.c
/openbmc/qemu/qapi/block-core.json
/openbmc/qemu/qapi/meson.build
/openbmc/qemu/qapi/migration.json
/openbmc/qemu/qapi/net.json
/openbmc/qemu/qapi/pragma.json
/openbmc/qemu/qapi/qom.json
/openbmc/qemu/qapi/ui.json
/openbmc/qemu/qemu-options.hx
/openbmc/qemu/qga/commands-posix.c
/openbmc/qemu/qom/object_interfaces.c
/openbmc/qemu/replay/replay-events.c
/openbmc/qemu/replay/replay.c
/openbmc/qemu/scripts/device-crash-test
/openbmc/qemu/scripts/kernel-doc
expr.py
/openbmc/qemu/semihosting/arm-compat-semi.c
/openbmc/qemu/softmmu/cpu-timers.c
/openbmc/qemu/softmmu/icount.c
/openbmc/qemu/softmmu/memory.c
/openbmc/qemu/softmmu/qdev-monitor.c
/openbmc/qemu/softmmu/timers-state.h
/openbmc/qemu/storage-daemon/qemu-storage-daemon.c
/openbmc/qemu/stubs/meson.build
/openbmc/qemu/target/alpha/translate.c
/openbmc/qemu/target/arm/cpu.c
/openbmc/qemu/target/arm/mte_helper.c
/openbmc/qemu/target/arm/tlb_helper.c
/openbmc/qemu/target/arm/translate.c
/openbmc/qemu/target/hexagon/meson.build
/openbmc/qemu/target/i386/cpu.c
/openbmc/qemu/target/i386/tcg/translate.c
/openbmc/qemu/target/mips/rel6_translate.c
/openbmc/qemu/target/mips/translate.c
/openbmc/qemu/target/openrisc/translate.c
/openbmc/qemu/target/ppc/kvm.c
/openbmc/qemu/target/s390x/cpu.h
/openbmc/qemu/target/s390x/mem_helper.c
/openbmc/qemu/target/xtensa/import_core.sh
/openbmc/qemu/target/xtensa/meson.build
/openbmc/qemu/tcg/mips/tcg-target.c.inc
/openbmc/qemu/tcg/tcg.c
/openbmc/qemu/tests/docker/Makefile.include
/openbmc/qemu/tests/docker/dockerfiles/centos8.docker
/openbmc/qemu/tests/migration/guestperf/engine.py
/openbmc/qemu/tests/qemu-iotests/040
/openbmc/qemu/tests/qemu-iotests/046
/openbmc/qemu/tests/qemu-iotests/046.out
/openbmc/qemu/tests/qemu-iotests/051
/openbmc/qemu/tests/qemu-iotests/051.out
/openbmc/qemu/tests/qemu-iotests/051.pc.out
/openbmc/qemu/tests/qemu-iotests/068
/openbmc/qemu/tests/qemu-iotests/093
/openbmc/qemu/tests/qemu-iotests/116.out
/openbmc/qemu/tests/qemu-iotests/127
/openbmc/qemu/tests/qemu-iotests/139
/openbmc/qemu/tests/qemu-iotests/182
/openbmc/qemu/tests/qemu-iotests/238
/openbmc/qemu/tests/qemu-iotests/240
/openbmc/qemu/tests/qemu-iotests/244
/openbmc/qemu/tests/qemu-iotests/244.out
/openbmc/qemu/tests/qemu-iotests/256
/openbmc/qemu/tests/qemu-iotests/257
/openbmc/qemu/tests/qemu-iotests/307
/openbmc/qemu/tests/qemu-iotests/common.rc
/openbmc/qemu/tests/qemu-iotests/iotests.py
/openbmc/qemu/tests/qemu-iotests/testenv.py
/openbmc/qemu/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
/openbmc/qemu/tests/qemu-iotests/tests/mirror-top-perms
/openbmc/qemu/tests/qemu-iotests/tests/mirror-top-perms.out
/openbmc/qemu/tests/qemu-iotests/tests/qsd-jobs
/openbmc/qemu/tests/qemu-iotests/tests/qsd-jobs.out
/openbmc/qemu/tests/qemu-iotests/tests/remove-bitmap-from-backing
/openbmc/qemu/tests/qemu-iotests/tests/remove-bitmap-from-backing.out
/openbmc/qemu/tests/qtest/am53c974-test.c
/openbmc/qemu/tests/qtest/bios-tables-test.c
/openbmc/qemu/tests/qtest/fuzz/generic_fuzz.c
/openbmc/qemu/tests/qtest/meson.build
/openbmc/qemu/tests/qtest/npcm7xx_emc-test.c
/openbmc/qemu/tests/tcg/Makefile.target
/openbmc/qemu/tests/tcg/aarch64/Makefile.target
/openbmc/qemu/tests/tcg/aarch64/mte-6.c
/openbmc/qemu/tests/tcg/aarch64/mte.h
/openbmc/qemu/tests/tcg/aarch64/semicall.h
/openbmc/qemu/tests/tcg/arm/Makefile.target
/openbmc/qemu/tests/tcg/arm/semicall.h
/openbmc/qemu/tests/tcg/configure.sh
/openbmc/qemu/tests/tcg/i386/Makefile.target
/openbmc/qemu/tests/tcg/i386/system/kernel.ld
/openbmc/qemu/tests/tcg/multiarch/Makefile.target
/openbmc/qemu/tests/tcg/multiarch/arm-compat-semi/semiconsole.c
/openbmc/qemu/tests/tcg/multiarch/arm-compat-semi/semihosting.c
/openbmc/qemu/tests/tcg/multiarch/gdbstub/sha1.py
/openbmc/qemu/tests/tcg/riscv64/semicall.h
/openbmc/qemu/tests/unit/meson.build
/openbmc/qemu/tests/unit/test-blockjob.c
/openbmc/qemu/tests/unit/test-coroutine.c
/openbmc/qemu/tests/unit/test-cutils.c
/openbmc/qemu/tests/unit/test-yank.c
/openbmc/qemu/tools/virtiofsd/fuse_lowlevel.c
/openbmc/qemu/tools/virtiofsd/passthrough_ll.c
/openbmc/qemu/ui/vnc.c
/openbmc/qemu/util/compatfd.c
/openbmc/qemu/util/cutils.c
/openbmc/qemu/util/meson.build
/openbmc/qemu/util/module.c
/openbmc/qemu/util/qemu-coroutine-lock.c
/openbmc/qemu/util/qemu-timer.c
/openbmc/qemu/util/yank.c
d83b476423-Mar-2021 Markus Armbruster <armbru@redhat.com>

qapi: Enforce union and alternate branch naming rules

Union branch names should use '-', not '_'. Enforce this. The only
offenders are in tests/. Fix them.

Signed-off-by: Markus Armbruster <armb

qapi: Enforce union and alternate branch naming rules

Union branch names should use '-', not '_'. Enforce this. The only
offenders are in tests/. Fix them.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-29-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[Commit message typo fixed]

show more ...

407efbf923-Mar-2021 Markus Armbruster <armbru@redhat.com>

qapi: Enforce enum member naming rules

Enum members should use '-', not '_'. Enforce this. Fix the fixable
offenders (all in tests/), and add the remainder to pragma
member-name-exceptions.

Signe

qapi: Enforce enum member naming rules

Enum members should use '-', not '_'. Enforce this. Fix the fixable
offenders (all in tests/), and add the remainder to pragma
member-name-exceptions.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-28-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>

show more ...

5aceeac023-Mar-2021 Markus Armbruster <armbru@redhat.com>

qapi: Enforce struct member naming rules

Struct members, including command arguments, event data, and union
inline base members, should use '-', not '_'. Enforce this. Fix the
fixable offenders (a

qapi: Enforce struct member naming rules

Struct members, including command arguments, event data, and union
inline base members, should use '-', not '_'. Enforce this. Fix the
fixable offenders (all in tests/), and add the remainder to pragma
member-name-exceptions.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-27-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>

show more ...

05ebf84123-Mar-2021 Markus Armbruster <armbru@redhat.com>

qapi: Enforce command naming rules

Command names should be lower-case. Enforce this. Fix the fixable
offenders (all in tests/), and add the remainder to pragma
command-name-exceptions.

Signed-off

qapi: Enforce command naming rules

Command names should be lower-case. Enforce this. Fix the fixable
offenders (all in tests/), and add the remainder to pragma
command-name-exceptions.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-25-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>

show more ...

e744708a23-Mar-2021 Markus Armbruster <armbru@redhat.com>

qapi: Enforce feature naming rules

Feature names should use '-', not '_'. Enforce this.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-24-armbru@redhat.co

qapi: Enforce feature naming rules

Feature names should use '-', not '_'. Enforce this.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-24-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>

show more ...

9af4b6b923-Mar-2021 Markus Armbruster <armbru@redhat.com>

qapi: Prepare for rejecting underscore in command and member names

Command names and member names within a type should be all lower case
with words separated by a hyphen. We also accept underscore.

qapi: Prepare for rejecting underscore in command and member names

Command names and member names within a type should be all lower case
with words separated by a hyphen. We also accept underscore. Rework
check_name_lower() to optionally reject underscores, but don't use
that option, yet.

Update expected test output for the changed error message.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-23-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>

show more ...

b86df37423-Mar-2021 Markus Armbruster <armbru@redhat.com>

qapi: Rename pragma *-whitelist to *-exceptions

Rename pragma returns-whitelist to command-returns-exceptions, and
name-case-whitelist to member-name-case-exceptions.

Signed-off-by: Markus Armbrust

qapi: Rename pragma *-whitelist to *-exceptions

Rename pragma returns-whitelist to command-returns-exceptions, and
name-case-whitelist to member-name-case-exceptions.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-20-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>

show more ...

4a67bd3123-Mar-2021 Markus Armbruster <armbru@redhat.com>

qapi: Factor out QAPISchemaParser._check_pragma_list_of_str()

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-17-armbru@redhat.com>
Reviewed-by: Eric Blake <

qapi: Factor out QAPISchemaParser._check_pragma_list_of_str()

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-17-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>

show more ...

3e6c8a6323-Mar-2021 Markus Armbruster <armbru@redhat.com>

qapi: Enforce type naming rules

Type names should be CamelCase. Enforce this. The only offenders are
in tests/. Fix them. Add test type-case to cover the new error.

Signed-off-by: Markus Armbru

qapi: Enforce type naming rules

Type names should be CamelCase. Enforce this. The only offenders are
in tests/. Fix them. Add test type-case to cover the new error.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-15-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[Regexp simplified, new test made more robust]

show more ...

d4f4cae823-Mar-2021 Markus Armbruster <armbru@redhat.com>

qapi: Enforce event naming rules

Event names should be ALL_CAPS with words separated by underscore.
Enforce this. The only offenders are in tests/. Fix them. Existing
test event-case covers the n

qapi: Enforce event naming rules

Event names should be ALL_CAPS with words separated by underscore.
Enforce this. The only offenders are in tests/. Fix them. Existing
test event-case covers the new error.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-14-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>

show more ...

00ffe24223-Mar-2021 Markus Armbruster <armbru@redhat.com>

qapi: Consistently permit any case in downstream prefixes

We require lowercase __RFQDN_ downstream prefixes only where we
require the prefixed name to be lowercase. Don't; permit any case in
__RFQD

qapi: Consistently permit any case in downstream prefixes

We require lowercase __RFQDN_ downstream prefixes only where we
require the prefixed name to be lowercase. Don't; permit any case in
__RFQDN_ prefixes anywhere.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-13-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>

show more ...

d224e0c023-Mar-2021 Markus Armbruster <armbru@redhat.com>

qapi: Move uppercase rejection to check_name_lower()

check_name_lower() is the only user of check_name_str() using
permit_upper=False. Move the associated code from check_name_str() to
check_name_l

qapi: Move uppercase rejection to check_name_lower()

check_name_lower() is the only user of check_name_str() using
permit_upper=False. Move the associated code from check_name_str() to
check_name_lower(), and drop the parameter.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-12-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>

show more ...

eaab06fa23-Mar-2021 Markus Armbruster <armbru@redhat.com>

qapi: Rework name checking in preparation of stricter checking

Naming rules differ for the various kinds of names. To prepare
enforcing them, define functions to check them: check_name_upper(),
che

qapi: Rework name checking in preparation of stricter checking

Naming rules differ for the various kinds of names. To prepare
enforcing them, define functions to check them: check_name_upper(),
check_name_lower(), and check_name_camel(). For now, these merely
wrap around check_name_str(), but that will change shortly. Replace
the other uses of check_name_str() by appropriate uses of the
wrappers. No change in behavior just yet.

check_name_str() now returns the name without downstream and x-
prefix, for use by the wrappers in later patches. Requires tweaking
regexp @valid_name. It accepts the same strings as before.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-11-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[Commit message improved]

show more ...

0825f62c23-Mar-2021 Markus Armbruster <armbru@redhat.com>

qapi: Lift enum-specific code out of check_name_str()

check_name_str() masks leading digits when passed enum_member=True.
Only check_enum() does. Lift the masking into check_enum().

Signed-off-by:

qapi: Lift enum-specific code out of check_name_str()

check_name_str() masks leading digits when passed enum_member=True.
Only check_enum() does. Lift the masking into check_enum().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-10-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>

show more ...

5fbc78dd23-Mar-2021 Markus Armbruster <armbru@redhat.com>

qapi: Permit flat union members for any tag value

Flat union branch names match the tag enum's member names. Omitted
branches default to "no members for this tag value".

Branch names starting with

qapi: Permit flat union members for any tag value

Flat union branch names match the tag enum's member names. Omitted
branches default to "no members for this tag value".

Branch names starting with a digit get rejected like "'data' member
'0' has an invalid name". However, omitting the branch works.

This is because flat union tag values get checked twice: as enum
member name, and as union branch name. The former accepts leading
digits, the latter doesn't.

Branches whose names start with a digit therefore cannot have members.
Feels wrong. Get rid of the restriction by skipping the latter check.

This can expose c_name() to input it can't handle: a name starting
with a digit. Improve it to return a valid C identifier for any
input.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-9-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[Commit message rewritten]

show more ...

dbfe3c7c23-Mar-2021 Markus Armbruster <armbru@redhat.com>

qapi: Fix to reject optional members with reserved names

check_type() fails to reject optional members with reserved names,
because it neglects to strip off the leading '*'. Fix that.

The strippin

qapi: Fix to reject optional members with reserved names

check_type() fails to reject optional members with reserved names,
because it neglects to strip off the leading '*'. Fix that.

The stripping in check_name_str() is now useless. Drop.

Also drop the "no leading '*'" assertion, because valid_name.match()
ensures it can't fail.

Fixes: 9fb081e0b98409556d023c7193eeb68947cd1211
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-8-armbru@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>

show more ...


/openbmc/qemu/MAINTAINERS
/openbmc/qemu/blockdev.c
/openbmc/qemu/configure
/openbmc/qemu/contrib/ivshmem-client/ivshmem-client.c
/openbmc/qemu/contrib/ivshmem-server/ivshmem-server.c
/openbmc/qemu/docs/devel/testing.rst
/openbmc/qemu/docs/hyperv.txt
/openbmc/qemu/docs/system/deprecated.rst
/openbmc/qemu/docs/system/removed-features.rst
/openbmc/qemu/docs/system/riscv/microchip-icicle-kit.rst
/openbmc/qemu/docs/system/target-riscv.rst
/openbmc/qemu/hw/acpi/aml-build.c
/openbmc/qemu/hw/acpi/pci.c
/openbmc/qemu/hw/acpi/pcihp.c
/openbmc/qemu/hw/acpi/piix4.c
/openbmc/qemu/hw/acpi/trace-events
/openbmc/qemu/hw/acpi/utils.c
/openbmc/qemu/hw/arm/virt-acpi-build.c
/openbmc/qemu/hw/arm/xilinx_zynq.c
/openbmc/qemu/hw/audio/cs4231.c
/openbmc/qemu/hw/block/fdc.c
/openbmc/qemu/hw/block/m25p80.c
/openbmc/qemu/hw/char/etraxfs_ser.c
/openbmc/qemu/hw/char/ibex_uart.c
/openbmc/qemu/hw/cris/axis_dev88.c
/openbmc/qemu/hw/display/tcx.c
/openbmc/qemu/hw/i386/acpi-build.c
/openbmc/qemu/hw/i386/acpi-microvm.c
/openbmc/qemu/hw/i386/microvm.c
/openbmc/qemu/hw/i386/pc.c
/openbmc/qemu/hw/i386/x86.c
/openbmc/qemu/hw/intc/etraxfs_pic.c
/openbmc/qemu/hw/intc/i8259.c
/openbmc/qemu/hw/microblaze/xlnx-zynqmp-pmu.c
/openbmc/qemu/hw/misc/zynq_slcr.c
/openbmc/qemu/hw/net/virtio-net.c
/openbmc/qemu/hw/pci/pci.c
/openbmc/qemu/hw/riscv/Kconfig
/openbmc/qemu/hw/riscv/microchip_pfsoc.c
/openbmc/qemu/hw/riscv/virt.c
/openbmc/qemu/hw/sd/sd.c
/openbmc/qemu/hw/sd/sdhci.c
/openbmc/qemu/hw/sparc/sun4m.c
/openbmc/qemu/hw/timer/etraxfs_timer.c
/openbmc/qemu/hw/virtio/vhost-user.c
/openbmc/qemu/hw/virtio/virtio-mmio.c
/openbmc/qemu/hw/virtio/virtio-pmem.c
/openbmc/qemu/include/exec/memory.h
/openbmc/qemu/include/hw/acpi/aml-build.h
/openbmc/qemu/include/hw/acpi/pci.h
/openbmc/qemu/include/hw/acpi/pcihp.h
/openbmc/qemu/include/hw/acpi/utils.h
/openbmc/qemu/include/hw/arm/armv7m.h
/openbmc/qemu/include/hw/arm/fsl-imx25.h
/openbmc/qemu/include/hw/arm/fsl-imx31.h
/openbmc/qemu/include/hw/arm/fsl-imx6.h
/openbmc/qemu/include/hw/arm/fsl-imx6ul.h
/openbmc/qemu/include/hw/arm/fsl-imx7.h
/openbmc/qemu/include/hw/arm/xlnx-zynqmp.h
/openbmc/qemu/include/hw/char/ibex_uart.h
/openbmc/qemu/include/hw/cris/etraxfs.h
/openbmc/qemu/include/hw/i386/ich9.h
/openbmc/qemu/include/hw/i386/microvm.h
/openbmc/qemu/include/hw/i386/pc.h
/openbmc/qemu/include/hw/i386/x86.h
/openbmc/qemu/include/hw/misc/grlib_ahb_apb_pnp.h
/openbmc/qemu/include/hw/misc/zynq-xadc.h
/openbmc/qemu/include/hw/pci/pci.h
/openbmc/qemu/include/hw/register.h
/openbmc/qemu/include/hw/riscv/microchip_pfsoc.h
/openbmc/qemu/include/hw/riscv/virt.h
/openbmc/qemu/include/hw/sparc/grlib.h
/openbmc/qemu/include/net/eth.h
/openbmc/qemu/include/net/net.h
/openbmc/qemu/include/sysemu/blockdev.h
/openbmc/qemu/net/colo-compare.c
/openbmc/qemu/net/eth.c
/openbmc/qemu/net/slirp.c
/openbmc/qemu/net/tap-win32.c
/openbmc/qemu/net/tap.c
/openbmc/qemu/qapi/compat.json
/openbmc/qemu/qapi/pragma.json
/openbmc/qemu/qapi/qmp-dispatch.c
/openbmc/qemu/qapi/qobject-input-visitor.c
/openbmc/qemu/qemu-options.hx
/openbmc/qemu/qom/object_interfaces.c
expr.py
/openbmc/qemu/softmmu/vl.c
/openbmc/qemu/target/i386/cpu.c
/openbmc/qemu/target/i386/cpu.h
/openbmc/qemu/target/i386/kvm/hyperv-proto.h
/openbmc/qemu/target/i386/machine.c
/openbmc/qemu/target/i386/tcg/excp_helper.c
/openbmc/qemu/target/i386/tcg/helper-tcg.h
/openbmc/qemu/target/i386/tcg/misc_helper.c
/openbmc/qemu/target/i386/tcg/seg_helper.c
/openbmc/qemu/target/i386/tcg/svm_helper.c
/openbmc/qemu/target/mips/mxu_translate.c
/openbmc/qemu/target/riscv/cpu.c
/openbmc/qemu/target/riscv/cpu.h
/openbmc/qemu/target/riscv/cpu_helper.c
/openbmc/qemu/target/riscv/csr.c
/openbmc/qemu/target/riscv/pmp.c
/openbmc/qemu/target/riscv/pmp.h
/openbmc/qemu/target/riscv/translate.c
/openbmc/qemu/tests/data/acpi/pc/DSDT
/openbmc/qemu/tests/data/acpi/pc/DSDT.acpihmat
/openbmc/qemu/tests/data/acpi/pc/DSDT.bridge
/openbmc/qemu/tests/data/acpi/pc/DSDT.cphp
/openbmc/qemu/tests/data/acpi/pc/DSDT.dimmpxm
/openbmc/qemu/tests/data/acpi/pc/DSDT.hpbridge
/openbmc/qemu/tests/data/acpi/pc/DSDT.ipmikcs
/openbmc/qemu/tests/data/acpi/pc/DSDT.memhp
/openbmc/qemu/tests/data/acpi/pc/DSDT.nohpet
/openbmc/qemu/tests/data/acpi/pc/DSDT.numamem
/openbmc/qemu/tests/data/acpi/pc/DSDT.roothp
/openbmc/qemu/tests/qapi-schema/alternate-clash.err
/openbmc/qemu/tests/qapi-schema/alternate-clash.json
/openbmc/qemu/tests/qapi-schema/event-member-invalid-dict.err
/openbmc/qemu/tests/qapi-schema/event-member-invalid-dict.json
/openbmc/qemu/tests/qapi-schema/flat-union-inline-invalid-dict.json
/openbmc/qemu/tests/qapi-schema/flat-union-no-base.err
/openbmc/qemu/tests/qapi-schema/flat-union-no-base.json
/openbmc/qemu/tests/qapi-schema/meson.build
/openbmc/qemu/tests/qapi-schema/nested-struct-data-invalid-dict.err
/openbmc/qemu/tests/qapi-schema/nested-struct-data-invalid-dict.json
/openbmc/qemu/tests/qapi-schema/nested-struct-data.json
/openbmc/qemu/tests/qapi-schema/reserved-member-u.err
/openbmc/qemu/tests/qapi-schema/reserved-member-u.json
/openbmc/qemu/tests/qapi-schema/struct-member-invalid-dict.err
/openbmc/qemu/tests/qapi-schema/struct-member-invalid-dict.json
/openbmc/qemu/tests/qemu-iotests/172
/openbmc/qemu/tests/qemu-iotests/172.out
/openbmc/qemu/tests/qtest/fuzz-e1000e-test.c
/openbmc/qemu/tests/qtest/fuzz/generic_fuzz_configs.h
/openbmc/qemu/tests/qtest/lpc-ich9-test.c
/openbmc/qemu/tests/qtest/meson.build
/openbmc/qemu/tests/unit/test-block-iothread.c
/openbmc/qemu/tests/vm/freebsd
/openbmc/qemu/tests/vmstate-static-checker-data/dump1.json
/openbmc/qemu/tests/vmstate-static-checker-data/dump2.json

12345678910>>...21