Commit 4ba00c8
committed
tests: work around malformed serial XML
The serial elements in fakelibvirt's XMLDesc() are malformed. They are
only enough to pass existing unit tests, but are not future-proof, and
would not work with something like migration._update_serial_xml(). In
addition, two of them (type=file and type=pty) are not actually used by
anything.
This patch removes the unused types and starts checking the
CONF.serial_console.enabled flag before including any serial XML in
the fake domain. This allows tests that don't set
serial_console_enabled (like the subsequent NUMA LM func test) to not
have to deal with the broken serial XML, while tests that relied on it
in the past now just set serial_console_enabled = True.
Change-Id: Ie74fcd689a627c178f80ec60df2dfef40576f1821 parent ee05cd8 commit 4ba00c8
File tree
2 files changed
+12
-12
lines changed- nova/tests/unit/virt
- libvirt
2 files changed
+12
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
1066 | 1068 | | |
1067 | 1069 | | |
1068 | 1070 | | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
1069 | 1077 | | |
1070 | 1078 | | |
1071 | 1079 | | |
| |||
1093 | 1101 | | |
1094 | 1102 | | |
1095 | 1103 | | |
1096 | | - | |
1097 | | - | |
1098 | | - | |
1099 | | - | |
1100 | | - | |
1101 | | - | |
1102 | | - | |
1103 | | - | |
1104 | | - | |
1105 | | - | |
1106 | | - | |
| 1104 | + | |
1107 | 1105 | | |
1108 | 1106 | | |
1109 | 1107 | | |
| |||
1132 | 1130 | | |
1133 | 1131 | | |
1134 | 1132 | | |
1135 | | - | |
| 1133 | + | |
| 1134 | + | |
1136 | 1135 | | |
1137 | 1136 | | |
1138 | 1137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
| 575 | + | |
575 | 576 | | |
576 | 577 | | |
577 | 578 | | |
| |||
0 commit comments