abis_test: Fix the test case and calculate the right offset
We parse the load_config, take the ptrdiff_t from start and load_config
and from the previous array as the alignment can differ on different ABIs.
This was found by Daniel when executing the tests on a 64 bit userspace.
diff --git a/openbsc/tests/abis/abis_test.c b/openbsc/tests/abis/abis_test.c
index 4942a1e..e7e78d2 100644
--- a/openbsc/tests/abis/abis_test.c
+++ b/openbsc/tests/abis/abis_test.c
@@ -129,11 +129,11 @@
abort();
}
- printf("Start: %u len: %zu\n", descr[0].start - dual_config, descr[0].len);
+ printf("Start: %u len: %zu\n", descr[0].start - load_config, descr[0].len);
printf("file_id: %s\n", osmo_hexdump(descr[0].file_id, descr[0].file_id_len));
printf("file_ver: %s\n", osmo_hexdump(descr[0].file_ver, descr[0].file_ver_len));
- printf("Start: %u len: %zu\n", descr[1].start - dual_config, descr[1].len);
+ printf("Start: %u len: %zu\n", descr[1].start - load_config, descr[1].len);
printf("file_id: %s\n", osmo_hexdump(descr[1].file_id, descr[1].file_id_len));
printf("file_ver: %s\n", osmo_hexdump(descr[1].file_ver, descr[1].file_ver_len));