[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 2523a7: tests/unit/test-smp-parse: Restore Ma
From: |
Richard Henderson |
Subject: |
[Qemu-commits] [qemu/qemu] 2523a7: tests/unit/test-smp-parse: Restore MachineClass fi... |
Date: |
Tue, 16 Nov 2021 03:56:20 -0800 |
Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: 2523a7956519cc13c92b9214d188cd2489d4df2e
https://github.com/qemu/qemu/commit/2523a7956519cc13c92b9214d188cd2489d4df2e
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2021-11-15 (Mon, 15 Nov 2021)
Changed paths:
M tests/unit/test-smp-parse.c
Log Message:
-----------
tests/unit/test-smp-parse: Restore MachineClass fields after modifying
There is a single MachineClass object, registered with
type_register_static(&smp_machine_info). Since the same
object is used multiple times (an MachineState object
is instantiated in both test_generic and test_with_dies),
we should restore its internal state after modifying for
the test purpose.
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Yanan Wang <wangyanan55@huawei.com>
Tested-by: Yanan Wang <wangyanan55@huawei.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211115145900.2531865-2-philmd@redhat.com>
Commit: c3440eff4c0b6ec7adf391620393cb9755eab8d9
https://github.com/qemu/qemu/commit/c3440eff4c0b6ec7adf391620393cb9755eab8d9
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2021-11-15 (Mon, 15 Nov 2021)
Changed paths:
M tests/unit/test-smp-parse.c
Log Message:
-----------
tests/unit/test-smp-parse: QOM'ify smp_machine_class_init()
smp_machine_class_init() is the actual TypeInfo::class_init().
Declare it as such in smp_machine_info, and avoid to call it
manually in each test. Move smp_machine_info definition just
before we register the type to avoid a forward declaration.
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Yanan Wang <wangyanan55@huawei.com>
Tested-by: Yanan Wang <wangyanan55@huawei.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211115145900.2531865-3-philmd@redhat.com>
Commit: 7b6d1bc9629f3dd45647ec3418e0606a92dddd48
https://github.com/qemu/qemu/commit/7b6d1bc9629f3dd45647ec3418e0606a92dddd48
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2021-11-15 (Mon, 15 Nov 2021)
Changed paths:
M tests/unit/test-smp-parse.c
Log Message:
-----------
tests/unit/test-smp-parse: Explicit MachineClass name
If the MachineClass::name pointer is not explicitly set, it is NULL.
Per the C standard, passing a NULL pointer to printf "%s" format is
undefined. Some implementations display it as 'NULL', other as 'null'.
Since we are comparing the formatted output, we need a stable value.
The easiest is to explicit a machine name string.
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Yanan Wang <wangyanan55@huawei.com>
Tested-by: Yanan Wang <wangyanan55@huawei.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211115145900.2531865-4-philmd@redhat.com>
Commit: 9f0f846465d4c52ce9857787e947dffb64367fae
https://github.com/qemu/qemu/commit/9f0f846465d4c52ce9857787e947dffb64367fae
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2021-11-16 (Tue, 16 Nov 2021)
Changed paths:
M tests/unit/test-smp-parse.c
Log Message:
-----------
Merge tag 'machine-core-20211115' of https://github.com/philmd/qemu into
staging
Machine core patches
- Rework SMP parsing unit test to work on WinGW:
https://github.com/qemu/qemu/runs/4078386652
This fixes:
Test smp_parse failed!
Expected error report: Invalid SMP CPUs 1. The min CPUs supported by
machine '(null)' is 2
Output error report: Invalid SMP CPUs 1. The min CPUs supported by
machine '(NULL)' is 2
# gpg: Signature made Mon 15 Nov 2021 11:46:36 PM CET
# gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>"
[full]
* tag 'machine-core-20211115' of https://github.com/philmd/qemu:
tests/unit/test-smp-parse: Explicit MachineClass name
tests/unit/test-smp-parse: QOM'ify smp_machine_class_init()
tests/unit/test-smp-parse: Restore MachineClass fields after modifying
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Compare: https://github.com/qemu/qemu/compare/3e595538b833...9f0f846465d4
- [Qemu-commits] [qemu/qemu] 2523a7: tests/unit/test-smp-parse: Restore MachineClass fi...,
Richard Henderson <=