lib/tst_virt.c: Add fallback when not using Microsoft Hyper-V hypervisor
PATCH 1/1 lib/tst_virt.c: Add fallback when not using Microsoft Hyper-V hypervisor
If we don't use Microsoft Hyper-V hypervisorm, getrusage04 will report the following error:
getrusage04 1 TBROK : tst_virt.c:175: invalid virt_type flag: 6 getrusage04 2 TBROK : tst_virt.c:175: Remaining cases broken
We should add is_hyperv() function when try_systemd_detect_virt returns -1. But it is a bit complexd according to systemd-detect-virt implementation[1]. Microsoft Hyper-V hypervisor detection has been introduced since long time ago, most system should support it.
[1]https://github.com/systemd/systemd/blob/main/src/basic/virt.c
--- lib/tst_virt.c | 1 + 1 file changed, 1 insertion(+)
lib/tst_virt.c +1 -0
@@ -166,6 +166,7 @@ int tst_is_virt(int virt_type)case VIRT_IBMZ_LPAR :case VIRT_IBMZ_ZVM :return is_ibmz (virt_type); +case VIRT_HYPERV :case VIRT_OTHER :return 0 ; }
Signature · 1 line
2.23.0
PATCH 1/1 lib/tst_virt.c: Add fallback when not using Microsoft Hyper-V hypervisor
Quoted 1 line · Yang Xu
If we don't use Microsoft Hyper-V hypervisorm, getrusage04 will report the
s/hypervisorm/hypervisor/
Quoted 6 lines
following error:
getrusage04 1 TBROK : tst_virt.c:175: invalid virt_type flag: 6 getrusage04 2 TBROK : tst_virt.c:175: Remaining cases brokenWe should add
is_hyperv()function whentry_systemd_detect_virtreturns -1. But it is a bit complexd according to systemd-detect-virt implementation[1].
s/complexd/complex/
Quoted 7 lines
Microsoft Hyper-V hypervisor detection has been introduced since long time ago, most system should support it.
[1]https://github.com/systemd/systemd/blob/main/src/basic/virt.c
Reported-by Jinhui Huang <[email protected]>Signed-off-by Yang Xu <[email protected]>
Thanks for fixing this.
Best regards,
Krzysztof
Quoted 17 lines
--- lib/tst_virt.c | 1 + 1 file changed, 1 insertion(+)lib/tst_virt.c +1
-0@@ -166,6 +166,7 @@ int tst_is_virt(int virt_type)case VIRT_IBMZ_LPAR :case VIRT_IBMZ_ZVM :return is_ibmz (virt_type); +case VIRT_HYPERV :case VIRT_OTHER :return 0 ; }
PATCH 1/1 lib/tst_virt.c: Add fallback when not using Microsoft Hyper-V hypervisor
Hi all,
Quoted 4 lines · Yang Xu
Quoted 1 line
If we don't use Microsoft Hyper-V hypervisorm, getrusage04 will report the
s/hypervisorm/hypervisor/
+1
Quoted 8 lines
Quoted 6 lines
following error:
getrusage04 1 TBROK : tst_virt.c:175: invalid virt_type flag: 6 getrusage04 2 TBROK : tst_virt.c:175: Remaining cases brokenWe should add
is_hyperv()function whentry_systemd_detect_virtreturns -1. But it is a bit complexd according to systemd-detect-virt implementation[1].s/complexd/complex/
+1
Thanks!
Kind regards,
Petr
PATCH 1/1 lib/tst_virt.c: Add fallback when not using Microsoft Hyper-V hypervisor
Hi All
Thanks for your review. I have merged this patch with correcting two typos.
Best Regards
Yang Xu
Quoted 24 lines
Hi all,
Quoted 4 lines · Yang Xu
Quoted 1 line
If we don't use Microsoft Hyper-V hypervisorm, getrusage04 will report the
s/hypervisorm/hypervisor/
+1
Quoted 8 lines
Quoted 6 lines
following error:
getrusage04 1 TBROK : tst_virt.c:175: invalid virt_type flag: 6 getrusage04 2 TBROK : tst_virt.c:175: Remaining cases brokenWe should add
is_hyperv()function whentry_systemd_detect_virtreturns -1. But it is a bit complexd according to systemd-detect-virt implementation[1].s/complexd/complex/
+1
Thanks!
Reviewed-by Petr Vorel<[email protected]>Kind regards,
Petr
PATCH 1/1 lib/tst_virt.c: Add fallback when not using Microsoft Hyper-V hypervisor
In reply to Yang XuHi!
Quoted 9 lines
If we don't use Microsoft Hyper-V hypervisorm, getrusage04 will report the following error:
getrusage04 1 TBROK : tst_virt.c:175: invalid virt_type flag: 6 getrusage04 2 TBROK : tst_virt.c:175: Remaining cases brokenWe should add
is_hyperv()function whentry_systemd_detect_virtreturns -1. But it is a bit complexd according to systemd-detect-virt implementation[1]. Microsoft Hyper-V hypervisor detection has been introduced since long time ago, most system should support it.
Sorry for missing this, Reviewed-by: Cyril Hrubis <[email protected]>
Signature · 2 lines
Cyril Hrubis [email protected]