python_code stringlengths 0 679k | repo_name stringlengths 9 41 | file_path stringlengths 6 149 |
|---|---|---|
# Copyright 2016 The Brotli Authors. All rights reserved.
#
# Distributed under MIT license.
# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
"""Functions to compress and decompress data using the Brotli library."""
import _brotli
# The library version.
__version__ = _brotli.__version__
... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/python/brotli.py |
# Copyright 2016 The Brotli Authors. All rights reserved.
#
# Distributed under MIT license.
# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
import unittest
from . import _test_utils
import brotli
class TestCompress(_test_utils.TestCase):
VARIANTS = {'quality': (1, 6, 9, 11), 'lgwi... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/python/tests/compress_test.py |
# Copyright 2016 The Brotli Authors. All rights reserved.
#
# Distributed under MIT license.
# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
import subprocess
import unittest
from . import _test_utils
import brotli
BRO_ARGS = _test_utils.BRO_ARGS
TEST_ENV = _test_utils.TEST_ENV
def _ge... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/python/tests/bro_test.py |
# Copyright 2016 The Brotli Authors. All rights reserved.
#
# Distributed under MIT license.
# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
import unittest
from . import _test_utils
import brotli
def _get_original_name(test_data):
return test_data.split('.compressed')[0]
class Te... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/python/tests/decompress_test.py |
# Copyright 2016 The Brotli Authors. All rights reserved.
#
# Distributed under MIT license.
# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
import functools
import unittest
from . import _test_utils
import brotli
def _get_original_name(test_data):
return test_data.split('.compresse... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/python/tests/decompressor_test.py |
nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/python/tests/__init__.py | |
from __future__ import print_function
import filecmp
import glob
import itertools
import os
import sys
import sysconfig
import tempfile
import unittest
project_dir = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
test_dir = os.getenv("BROTLI_TESTS_PATH")
BRO_ARGS = [os.getenv("BROTLI_WRAPPER")]
# Fallback... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/python/tests/_test_utils.py |
# Copyright 2016 The Brotli Authors. All rights reserved.
#
# Distributed under MIT license.
# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
import functools
import unittest
from . import _test_utils
import brotli
# Do not inherit from TestCase here to ensure that test methods
# are not... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/python/tests/compressor_test.py |
#!/usr/bin/env python
#
# Copyright 2006, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/gtest_xml_output_unittest.py |
#!/usr/bin/env python
#
# Copyright 2008, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-output-test.py |
#!/usr/bin/env python
#
# Copyright 2015 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-param-test-invalid-name1-test.py |
#!/usr/bin/env python
#
# Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/gtest_help_test.py |
# Copyright 2021 Google Inc. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the foll... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-global-environment-unittest.py |
# Copyright 2006, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/gtest_test_utils.py |
# Copyright 2018, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/gtest_json_test_utils.py |
#!/usr/bin/env python
#
# Copyright 2015 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-param-test-invalid-name2-test.py |
#!/usr/bin/env python
# Copyright 2018, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list o... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-json-output-unittest.py |
#!/usr/bin/env python
#
# Copyright 2006, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-break-on-failure-unittest.py |
#!/usr/bin/env python
#
# Copyright 2019, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-setuptestsuite-test.py |
#!/usr/bin/env python
#
# Copyright 2006, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-list-tests-unittest.py |
#!/usr/bin/env python
#
# Copyright 2008, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-env-var-test.py |
#!/usr/bin/env python
#
# Copyright 2008, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/gtest_xml_outfiles_test.py |
#!/usr/bin/env python
#
# Copyright 2006, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/gtest_list_output_unittest.py |
# Copyright 2006, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/gtest_xml_test_utils.py |
#!/usr/bin/env python
#
# Copyright 2008, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-color-test.py |
#!/usr/bin/env python
#
# Copyright 2005 Google Inc. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-filter-unittest.py |
#!/usr/bin/env python
#
# Copyright 2019 Google LLC. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list o... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/gtest_skip_check_output_test.py |
#!/usr/bin/env python
#
# Copyright 2018 Google LLC. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/gtest_testbridge_test.py |
#!/usr/bin/env python
#
# Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-throw-on-failure-test.py |
#!/usr/bin/env python
#
# Copyright 2009 Google Inc. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-shuffle-test.py |
#!/usr/bin/env python
#
# Copyright 2008, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-uninitialized-test.py |
#!/usr/bin/env python
#
# Copyright 2010 Google Inc. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list o... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-catch-exceptions-test.py |
#!/usr/bin/env python
# Copyright 2018, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list o... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-json-outfiles-test.py |
#!/usr/bin/env python
#
# Copyright 2019 Google LLC. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list o... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/gtest_skip_environment_check_output_test.py |
#!/usr/bin/env python
#
# Copyright 2020 Google Inc. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googletest/test/googletest-failfast-unittest.py |
#!/usr/bin/env python
#
# Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googlemock/test/gmock_leak_test.py |
# Copyright 2006, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googlemock/test/gmock_test_utils.py |
#!/usr/bin/env python
#
# Copyright 2008, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest/googlemock/test/gmock_output_test.py |
import os
import ycm_core
flags = [
'-Wall',
'-Wextra',
'-Werror',
'-x', 'c',
'-Iinclude',
]
# Set this to the absolute path to the folder (NOT the file!) containing the
# compile_commands.json file to use that instead of 'flags'. See here for
# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html
#
... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/UnitTestFrameworkPkg/Library/CmockaLib/cmocka/.ycm_extra_conf.py |
# @file
# Script to Build OVMF UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from PlatformBuildLib import SettingsManager
from PlatformBuildLib import PlatformBuilder
# #####... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/ArmVirtPkg/PlatformCI/QemuKernelBuild.py |
# @file
# Script to Build ArmVirtPkg UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import logging
import io
from edk2toolext.environment import shell_environment
from edk2toolext.environment.uefi_build import UefiBuilder
from edk2toolext.invocables.e... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/ArmVirtPkg/PlatformCI/PlatformBuildLib.py |
# @file
# Script to Build OVMF UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from PlatformBuildLib import SettingsManager
from PlatformBuildLib import PlatformBuilder
# #####... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/ArmVirtPkg/PlatformCI/QemuBuild.py |
# @file
# Script to Build ArmVirtPkg UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from PlatformBuildLib import SettingsManager
from PlatformBuildLib import PlatformBuilder
#... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/ArmVirtPkg/PlatformCI/KvmToolBuild.py |
# Keycode Map Generator Python Tests
#
# Copyright 2017 Pierre Ossman for Cendio AB
#
# This file is dual license under the terms of the GPLv2 or later
# and 3-clause BSD licenses.
import osx2win32
import osx2win32_name
import osx2xkb
import osx2xkb_name
import html2win32
import html2win32_name
import osx
import os... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/ui/keycodemapdb/tests/test.py |
nvtrust-main | infrastructure/kvm/qemu/qemu_source/ui/keycodemapdb/thirdparty/__init__.py | |
# Author: Steven J. Bethard <steven.bethard@gmail.com>.
# Maintainer: Thomas Waldmann <tw@waldmann-edv.de>
"""Command-line parsing library
This module is an optparse-inspired command-line parsing library that:
- handles both optional and positional arguments
- produces highly informative usage messages
-... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/ui/keycodemapdb/thirdparty/argparse.py |
#!/usr/bin/env python3
"""
QEMU tooling installer script
Copyright (c) 2020-2021 John Snow for Red Hat, Inc.
"""
import setuptools
import pkg_resources
def main():
"""
QEMU tooling installer
"""
# https://medium.com/@daveshawley/safely-using-setup-cfg-for-metadata-1babbe54c108
pkg_resources.requ... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/setup.py |
import asyncio
from contextlib import contextmanager
import os
import socket
from tempfile import TemporaryDirectory
import avocado
from qemu.aqmp import ConnectError, Runstate
from qemu.aqmp.protocol import AsyncProtocol, StateError
from qemu.aqmp.util import asyncio_run, create_task
class NullProtocol(AsyncProtoc... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/tests/protocol.py |
"""
AQMP Error Classes
This package seeks to provide semantic error classes that are intended
to be used directly by clients when they would like to handle particular
semantic failures (e.g. "failed to connect") without needing to know the
enumeration of possible reasons for that failure.
AQMPError serves as the ance... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/aqmp/error.py |
"""
QMP Data Models
This module provides simplistic data classes that represent the few
structures that the QMP spec mandates; they are used to verify incoming
data to make sure it conforms to spec.
"""
# pylint: disable=too-few-public-methods
from collections import abc
import copy
from typing import (
Any,
... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/aqmp/models.py |
"""
QMP Protocol Implementation
This module provides the `QMPClient` class, which can be used to connect
and send commands to a QMP server such as QEMU. The QMP class can be
used to either connect to a listening server, or used to listen and
accept an incoming connection from that server.
"""
import asyncio
import lo... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/aqmp/qmp_client.py |
"""
Miscellaneous Utilities
This module provides asyncio utilities and compatibility wrappers for
Python 3.6 to provide some features that otherwise become available in
Python 3.7+.
Various logging and debugging utilities are also provided, such as
`exception_summary()` and `pretty_traceback()`, used primarily for
ad... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/aqmp/util.py |
"""
AQMP Events and EventListeners
Asynchronous QMP uses `EventListener` objects to listen for events. An
`EventListener` is a FIFO event queue that can be pre-filtered to listen
for only specific events. Each `EventListener` instance receives its own
copy of events that it hears, so events may be consumed without fea... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/aqmp/events.py |
"""
Generic Asynchronous Message-based Protocol Support
This module provides a generic framework for sending and receiving
messages over an asyncio stream. `AsyncProtocol` is an abstract class
that implements the core mechanisms of a simple send/receive protocol,
and is designed to be extended.
In this package, it is... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/aqmp/protocol.py |
"""
QEMU Monitor Protocol (QMP) development library & tooling.
This package provides a fairly low-level class for communicating
asynchronously with QMP protocol servers, as implemented by QEMU, the
QEMU Guest Agent, and the QEMU Storage Daemon.
`QMPClient` provides the main functionality of this package. All errors
r... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/aqmp/__init__.py |
"""
QMP Message Format
This module provides the `Message` class, which represents a single QMP
message sent to or from the server.
"""
import json
from json import JSONDecodeError
from typing import (
Dict,
Iterator,
Mapping,
MutableMapping,
Optional,
Union,
)
from .error import ProtocolError... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/aqmp/message.py |
# Copyright (c) 2021
#
# Authors:
# Niteesh Babu G S <niteesh.gs@gmail.com>
#
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
"""
AQMP TUI
AQMP TUI is an asynchronous interface built on top the of the AQMP library.
It is the successor of ... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/aqmp/aqmp_tui.py |
"""
QEMU Guest Agent Client
Usage:
Start QEMU with:
# qemu [...] -chardev socket,path=/tmp/qga.sock,server,wait=off,id=qga0 \
-device virtio-serial \
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0
Run the script:
$ qemu-ga-client --address=/tmp/qga.sock <command> [args...]
or
$ export QGA_CL... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/qmp/qemu_ga_client.py |
"""
QOM Command abstractions.
"""
##
# Copyright John Snow 2020, for Red Hat, Inc.
# Copyright IBM, Corp. 2011
#
# Authors:
# John Snow <jsnow@redhat.com>
# Anthony Liguori <aliguori@amazon.com>
#
# This work is licensed under the terms of the GNU GPL, version 2 or later.
# See the COPYING file in the top-level direc... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/qmp/qom_common.py |
"""
QEMU Object Model FUSE filesystem tool
This script offers a simple FUSE filesystem within which the QOM tree
may be browsed, queried and edited using traditional shell tooling.
This script requires the 'fusepy' python package.
usage: qom-fuse [-h] [--socket SOCKET] <mount>
Mount a QOM tree as a FUSE filesystem... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/qmp/qom_fuse.py |
"""
QEMU Monitor Protocol (QMP) development library & tooling.
This package provides a fairly low-level class for communicating to QMP
protocol servers, as implemented by QEMU, the QEMU Guest Agent, and the
QEMU Storage Daemon. This library is not intended for production use.
`QEMUMonitorProtocol` is the primary clas... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/qmp/__init__.py |
#
# Copyright (C) 2009, 2010 Red Hat Inc.
#
# Authors:
# Luiz Capitulino <lcapitulino@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2. See
# the COPYING file in the top-level directory.
#
"""
Low-level QEMU shell on top of QMP.
usage: qmp-shell [-h] [-H] [-N] [-v] [-p] qmp_server
po... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/qmp/qmp_shell.py |
"""
QEMU Object Model testing tools.
usage: qom [-h] {set,get,list,tree,fuse} ...
Query and manipulate QOM data
optional arguments:
-h, --help show this help message and exit
QOM commands:
{set,get,list,tree,fuse}
set Set a QOM property value
get Get a QOM propert... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/qmp/qom.py |
"""
QEMU accel module:
This module provides utilities for discover and check the availability of
accelerators.
"""
# Copyright (C) 2015-2016 Red Hat Inc.
# Copyright (C) 2012 IBM Corp.
#
# Authors:
# Fam Zheng <famz@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2. See
# the COPYING fi... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/utils/accel.py |
"""
QEMU development and testing utilities
This package provides a small handful of utilities for performing
various tasks not directly related to the launching of a VM.
"""
# Copyright (C) 2021 Red Hat Inc.
#
# Authors:
# John Snow <jsnow@redhat.com>
# Cleber Rosa <crosa@redhat.com>
#
# This work is licensed under... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/utils/__init__.py |
"""
QEMU Console Socket Module:
This python module implements a ConsoleSocket object,
which can drain a socket and optionally dump the bytes to file.
"""
# Copyright 2020 Linaro
#
# Authors:
# Robert Foley <robert.foley@linaro.org>
#
# This code is licensed under the GPL version 2 or later. See
# the COPYING file in... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/machine/console_socket.py |
"""
QEMU development and testing library.
This library provides a few high-level classes for driving QEMU from a
test suite, not intended for production use.
| QEMUQtestProtocol: send/receive qtest messages.
| QEMUMachine: Configure and Boot a QEMU VM
| +-- QEMUQtestMachine: VM class, with a qtest socket.
"""
# ... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/machine/__init__.py |
"""
QEMU machine module:
The machine module primarily provides the QEMUMachine class,
which provides facilities for managing the lifetime of a QEMU VM.
"""
# Copyright (C) 2015-2016 Red Hat Inc.
# Copyright (C) 2012 IBM Corp.
#
# Authors:
# Fam Zheng <famz@redhat.com>
#
# This work is licensed under the terms of the... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/machine/machine.py |
"""
QEMU qtest library
qtest offers the QEMUQtestProtocol and QEMUQTestMachine classes, which
offer a connection to QEMU's qtest protocol socket, and a qtest-enabled
subclass of QEMUMachine, respectively.
"""
# Copyright (C) 2015 Red Hat Inc.
#
# Authors:
# Fam Zheng <famz@redhat.com>
#
# This work is licensed under... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/python/qemu/machine/qtest.py |
#!/usr/bin/env python3
##
## Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the Licen... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/target/hexagon/gen_op_regs.py |
#!/usr/bin/env python3
##
## Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the Licen... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/target/hexagon/gen_helper_funcs.py |
#!/usr/bin/env python3
##
## Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the Licen... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/target/hexagon/gen_printinsn.py |
#!/usr/bin/env python3
##
## Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the Licen... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/target/hexagon/gen_opcodes_def.py |
#!/usr/bin/env python3
##
## Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the Licen... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/target/hexagon/hex_common.py |
#!/usr/bin/env python3
##
## Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the Licen... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/target/hexagon/dectree.py |
#!/usr/bin/env python3
##
## Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the Licen... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/target/hexagon/gen_helper_protos.py |
#!/usr/bin/env python3
##
## Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the Licen... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/target/hexagon/gen_shortcode.py |
#!/usr/bin/env python3
##
## Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the Licen... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/target/hexagon/gen_tcg_funcs.py |
#!/usr/bin/env python3
##
## Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the Licen... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/target/hexagon/gen_op_attribs.py |
#!/usr/bin/env python3
##
## Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the Licen... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/target/hexagon/gen_tcg_func_table.py |
from __future__ import print_function
#
# Test that signals and debugging mix well together on s390x.
#
# This is launched via tests/guest-debug/run-test.py
#
import gdb
import sys
failcount = 0
def report(cond, msg):
"""Report success/fail of test"""
if cond:
print("PASS: %s" % (msg))
else:
... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/tcg/s390x/gdbstub/test-signals-s390x.py |
from __future__ import print_function
#
# Test auxiliary vector is loaded via gdbstub
#
# This is launched via tests/guest-debug/run-test.py
#
import gdb
import sys
failcount = 0
def report(cond, msg):
"Report success/fail of test"
if cond:
print ("PASS: %s" % (msg))
else:
print ("FAIL: %... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/tcg/multiarch/gdbstub/test-qxfer-auxv-read.py |
from __future__ import print_function
#
# Test some of the softmmu debug features with the multiarch memory
# test. It is a port of the original vmlinux focused test case but
# using the "memory" test instead.
#
# This is launched via tests/guest-debug/run-test.py
#
import gdb
import sys
failcount = 0
def report(co... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/tcg/multiarch/gdbstub/memory.py |
from __future__ import print_function
#
# A very simple smoke test for debugging the SHA1 userspace test on
# each target.
#
# This is launched via tests/guest-debug/run-test.py
#
import gdb
import sys
initial_vlen = 0
failcount = 0
def report(cond, msg):
"Report success/fail of test"
if cond:
print(... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/tcg/multiarch/gdbstub/sha1.py |
from __future__ import print_function
#
# Test the SVE registers are visable and changeable via gdbstub
#
# This is launched via tests/guest-debug/run-test.py
#
import gdb
import sys
MAGIC = 0xDEADBEEF
failcount = 0
def report(cond, msg):
"Report success/fail of test"
if cond:
print ("PASS: %s" % (m... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/tcg/aarch64/gdbstub/test-sve.py |
from __future__ import print_function
#
# Test the SVE ZReg reports the right amount of data. It uses the
# sve-ioctl test and examines the register data each time the
# __sve_ld_done breakpoint is hit.
#
# This is launched via tests/guest-debug/run-test.py
#
import gdb
import sys
initial_vlen = 0
failcount = 0
def ... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/tcg/aarch64/gdbstub/test-sve-ioctl.py |
#!/usr/bin/env python3
#
# Docker controlling module
#
# Copyright (c) 2016 Red Hat Inc.
#
# Authors:
# Fam Zheng <famz@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2
# or (at your option) any later version. See the COPYING file in
# the top-level directory.
import os
import sys
impor... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/docker/docker.py |
#
# This script needs to be run on startup
# qemu -kernel ${KERNEL} -s -S
# and then:
# gdb ${KERNEL}.vmlinux -x ${QEMU_SRC}/tests/guest-debug/test-gdbstub.py
import gdb
failcount = 0
def report(cond, msg):
"Report success/fail of test"
if cond:
print ("PASS: %s" % (msg))
else:
print ("F... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/guest-debug/test-gdbstub.py |
#!/usr/bin/env python3
#
# Run a gdbstub test case
#
# Copyright (c) 2019 Linaro
#
# Author: Alex Bennée <alex.bennee@linaro.org>
#
# This work is licensed under the terms of the GNU GPL, version 2 or later.
# See the COPYING file in the top-level directory.
#
# SPDX-License-Identifier: GPL-2.0-or-later
import argpars... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/guest-debug/run-test.py |
#!/usr/bin/env python3
# NBD server - fault injection utility
#
# Configuration file syntax:
# [inject-error "disconnect-neg1"]
# event=neg1
# io=readwrite
# when=before
#
# Note that Python's ConfigParser squashes together all sections with the same
# name, so give each [inject-error] a unique name.
#
# inject... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/qemu-iotests/nbd-fault-injector.py |
# TestEnv class to manage test environment variables.
#
# Copyright (c) 2020-2021 Virtuozzo International GmbH
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, ... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/qemu-iotests/testenv.py |
#!/usr/bin/env python3
#
# Tool to manipulate QED image files
#
# Copyright (C) 2010 IBM, Corp.
#
# Authors:
# Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
#
# This work is licensed under the terms of the GNU GPL, version 2 or later.
# See the COPYING file in the top-level directory.
import sys
import struct
import ... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/qemu-iotests/qed.py |
# Common utilities and Python wrappers for qemu-iotests
#
# Copyright (C) 2012 IBM Corp.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) ... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/qemu-iotests/iotests.py |
# TestFinder class, define set of tests to run.
#
# Copyright (c) 2020-2021 Virtuozzo International GmbH
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/qemu-iotests/findtests.py |
# Library for manipulations with qcow2 image
#
# Copyright (c) 2020 Virtuozzo International GmbH.
# Copyright (C) 2012 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either vers... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/qemu-iotests/qcow2_format.py |
# Class for actually running tests.
#
# Copyright (c) 2020-2021 Virtuozzo International GmbH
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your opti... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/qemu-iotests/testrunner.py |
#!/usr/bin/env python3
#
# Manipulations with qcow2 image
#
# Copyright (C) 2012 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your op... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/qemu-iotests/qcow2.py |
#
# VM testing base class
#
# Copyright 2017-2019 Red Hat Inc.
#
# Authors:
# Fam Zheng <famz@redhat.com>
# Gerd Hoffmann <kraxel@redhat.com>
#
# This code is licensed under the GPL version 2 or later. See
# the COPYING file in the top-level directory.
#
import os
import re
import sys
import socket
import logging
i... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/vm/basevm.py |
#!/usr/bin/env python3
#
# Ubuntu VM testing library
#
# Copyright 2017 Red Hat Inc.
# Copyright 2020 Linaro
#
# Authors:
# Robert Foley <robert.foley@linaro.org>
# Originally based on ubuntu.i386 Fam Zheng <famz@redhat.com>
#
# This code is licensed under the GPL version 2 or later. See
# the COPYING file in the to... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/vm/ubuntuvm.py |
#!/usr/bin/env python3
#
# VM testing aarch64 library
#
# Copyright 2020 Linaro
#
# Authors:
# Robert Foley <robert.foley@linaro.org>
#
# This code is licensed under the GPL version 2 or later. See
# the COPYING file in the top-level directory.
#
import os
import sys
import subprocess
import basevm
from qemu.utils im... | nvtrust-main | infrastructure/kvm/qemu/qemu_source/tests/vm/aarch64vm.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.