Skip to content

Commit 2d17143

Browse files
authored
Fix tests that don't work on aarch64 (#6630)
There's an ongoing effort to create an xcp-ng port for ARM servers, to help maintain compatibility in the toolstack, these changes make the tests pass on aarch64 and unblock adding CI testing on xs-opam. Before enabling the CI in xen-api, some packages need to be removed from xs-opam: xapi-project/xs-opam#737 I will open a PR enabling aarch64 runners on xen-api once the xs-opam tests are passing, on both repositories the new CI is set to experimental to avoid blocking any merges
2 parents 05e6317 + 9203724 commit 2d17143

File tree

13 files changed

+27
-360
lines changed

13 files changed

+27
-360
lines changed

ocaml/libs/log/test/log_test.t

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
1-
$ ./log_test.exe | sed -re 's/[0-9]+T[0-9:.]+Z//'
2-
[|error||0 |main|backtrace] Raised Invalid_argument("index out of bounds")
3-
[|error||0 |main|backtrace] 1/4 log_test.exe Raised at file ocaml/libs/log/test/log_test.ml, line 7
4-
[|error||0 |main|backtrace] 2/4 log_test.exe Called from file fun.ml, line 33
5-
[|error||0 |main|backtrace] 3/4 log_test.exe Called from file fun.ml, line 38
6-
[|error||0 |main|backtrace] 4/4 log_test.exe Called from file ocaml/libs/log/test/log_test.ml, line 18
7-
[|error||0 |main|backtrace]
8-
[| warn||0 |main|log_test.ml] Got exception: Invalid_argument("index out of bounds")
1+
The log_test executable produces a backtrace on purpose, on x86_64, and with
2+
the datetimes removed, it looks like this:
3+
$ ./log_test.exe | sed -re 's/[0-9]+T[0-9:.]+Z//'
4+
[|error||0 |main|backtrace] Raised Invalid_argument("index out of bounds")
5+
[|error||0 |main|backtrace] 1/4 log_test.exe Raised at file ocaml/libs/log/test/log_test.ml, line 7
6+
[|error||0 |main|backtrace] 2/4 log_test.exe Called from file fun.ml, line 33
7+
[|error||0 |main|backtrace] 3/4 log_test.exe Called from file fun.ml, line 38
8+
[|error||0 |main|backtrace] 4/4 log_test.exe Called from file ocaml/libs/log/test/log_test.ml, line 18
9+
[|error||0 |main|backtrace]
10+
[| warn||0 |main|log_test.ml] Got exception: Invalid_argument("index out of bounds")
911
12+
and on aarch64:
13+
[|error||0 |main|backtrace] Raised Invalid_argument("index out of bounds")
14+
[|error||0 |main|backtrace] 1/3 log_test.exe Raised at file ocaml/libs/log/test/log_test.ml, line 7
15+
[|error||0 |main|backtrace] 2/3 log_test.exe Called from file fun.ml, line 38
16+
[|error||0 |main|backtrace] 3/3 log_test.exe Called from file ocaml/libs/log/test/log_test.ml, line 18
17+
[|error||0 |main|backtrace]
18+
[| warn||0 |main|log_test.ml] Got exception: Invalid_argument("index out of bounds")
19+
20+
$ ./log_test.exe | grep "main|backtrace" -c | xargs -I _ sh -c "test 5 -eq _ || test 6 -eq _"
21+
$ ./log_test.exe | grep "log_test.exe" -c | xargs -I _ sh -c "test 3 -eq _ || test 4 -eq _"
22+
$ ./log_test.exe | grep "ocaml/libs/log/test/log_test.ml" -c
23+
2

ocaml/tests/dune

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
test_cluster_host test_cluster test_pusb test_network_sriov
88
test_client test_valid_ref_list suite_alcotest_server
99
test_vm_placement test_vm_helpers test_repository test_repository_helpers
10-
test_ref test_xapi_helpers test_vm_group test_host_driver_helpers
10+
test_ref test_xapi_helpers test_vm_group
1111
test_livepatch test_rpm test_updateinfo test_storage_smapiv1_wrapper test_storage_quicktest test_observer
1212
test_pool_periodic_update_sync test_pkg_mgr test_tar_ext test_pool_repository))
1313
(libraries
@@ -50,7 +50,6 @@
5050
xapi_xenopsd
5151
xapi_cli_server
5252
xapi_database
53-
xapi_host_driver_helpers
5453
xapi_internal
5554
xml-light2
5655
)
@@ -78,19 +77,18 @@
7877
)
7978
)
8079

81-
8280
(tests
8381
(names test_vm_helpers test_vm_placement test_network_sriov test_vdi_cbt test_bounded_psq test_auth_cache
8482
test_clustering test_pusb test_daemon_manager test_repository test_repository_helpers
8583
test_livepatch test_rpm test_updateinfo test_pool_periodic_update_sync test_pkg_mgr
86-
test_xapi_helpers test_tar_ext test_pool_repository test_host_driver_helpers)
84+
test_xapi_helpers test_tar_ext test_pool_repository)
8785
(package xapi)
8886
(modes exe)
8987
(modules test_vm_helpers test_vm_placement test_network_sriov test_vdi_cbt test_bounded_psq test_auth_cache
9088
test_event test_clustering test_cluster_host test_cluster test_pusb
9189
test_daemon_manager test_repository test_repository_helpers test_livepatch test_rpm
9290
test_updateinfo test_pool_periodic_update_sync test_pkg_mgr
93-
test_xapi_helpers test_tar_ext test_pool_repository test_host_driver_helpers)
91+
test_xapi_helpers test_tar_ext test_pool_repository)
9492
(libraries
9593
alcotest
9694
bos
@@ -121,13 +119,13 @@
121119
xapi-types
122120
xapi_cli_server
123121
xapi_database
124-
xapi_host_driver_helpers
125122
xapi_internal
126123
xml-light2
127124
yojson
128125
)
129126
(preprocess (per_module ((pps ppx_deriving_rpc) Test_cluster_host)))
130127
)
128+
131129
(test
132130
(name test_storage_smapiv1_wrapper)
133131
(modes exe)
@@ -171,27 +169,6 @@
171169
(action (run ./check-no-xenctrl %{x}))
172170
)
173171

174-
(rule
175-
(alias runtest)
176-
(package xapi)
177-
(targets
178-
.note.XenServer
179-
.note.Linux
180-
.note.gnu.build-id
181-
.note.XenServerTwo
182-
)
183-
(deps
184-
(:asm
185-
test_data/xenserver.s
186-
test_data/xenserver_two_notes.s
187-
test_data/linux.s
188-
test_data/buildid.s
189-
)
190-
(:script test_data/gen_notes.sh)
191-
)
192-
(action (bash "%{script} %{asm}"))
193-
)
194-
195172
(env (_ (env-vars (XAPI_TEST 1))))
196173

197174
; disassemble, but without sources

ocaml/tests/test_data/buildid.s

Lines changed: 0 additions & 9 deletions
This file was deleted.

ocaml/tests/test_data/gen_notes.sh

Lines changed: 0 additions & 22 deletions
This file was deleted.

ocaml/tests/test_data/linux.s

Lines changed: 0 additions & 9 deletions
This file was deleted.

ocaml/tests/test_data/xenserver.s

Lines changed: 0 additions & 9 deletions
This file was deleted.

ocaml/tests/test_data/xenserver_two_notes.s

Lines changed: 0 additions & 20 deletions
This file was deleted.

ocaml/tests/test_host_driver_helpers.ml

Lines changed: 0 additions & 89 deletions
This file was deleted.

ocaml/tests/test_host_driver_helpers.mli

Whitespace-only changes.

ocaml/util/dune

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,3 @@
1616
)
1717
(wrapped false)
1818
)
19-
20-
(library
21-
(name xapi_host_driver_helpers)
22-
(modules xapi_host_driver_helpers)
23-
(libraries yojson angstrom xapi-stdext-unix)
24-
(wrapped false)
25-
)

0 commit comments

Comments
 (0)