Skip to content

Commit 320fdda

Browse files
committed
melib/gpgme: disable layout tests on non-x86_64 hosts
The generated bindgen layout tests make hard-coded assumptions about target specific sizes like pointers, let's disable them for now before we figure out a better long-term solution for gpgme compatibility. Signed-off-by: Manos Pitsidianakis <[email protected]>
1 parent d2559e4 commit 320fdda

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

melib/src/gpgme/bindings.rs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ pub struct _gpgme_sig_notation {
317317
pub flags: gpgme_sig_notation_flags_t,
318318
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>,
319319
}
320+
#[cfg(target_arch = "x86_64")]
320321
#[test]
321322
#[allow(deref_nullptr)]
322323
fn bindgen_test_layout__gpgme_sig_notation() {
@@ -459,6 +460,7 @@ pub struct _gpgme_engine_info {
459460
pub req_version: *const ::std::os::raw::c_char,
460461
pub home_dir: *mut ::std::os::raw::c_char,
461462
}
463+
#[cfg(target_arch = "x86_64")]
462464
#[test]
463465
#[allow(deref_nullptr)]
464466
fn bindgen_test_layout__gpgme_engine_info() {
@@ -547,6 +549,7 @@ pub struct _gpgme_tofu_info {
547549
pub encrlast: ::std::os::raw::c_ulong,
548550
pub description: *mut ::std::os::raw::c_char,
549551
}
552+
#[cfg(target_arch = "x86_64")]
550553
#[test]
551554
#[allow(deref_nullptr)]
552555
fn bindgen_test_layout__gpgme_tofu_info() {
@@ -715,6 +718,7 @@ pub struct _gpgme_subkey {
715718
pub curve: *mut ::std::os::raw::c_char,
716719
pub keygrip: *mut ::std::os::raw::c_char,
717720
}
721+
#[cfg(target_arch = "x86_64")]
718722
#[test]
719723
#[allow(deref_nullptr)]
720724
fn bindgen_test_layout__gpgme_subkey() {
@@ -1077,6 +1081,7 @@ pub struct _gpgme_key_sig {
10771081
pub notations: gpgme_sig_notation_t,
10781082
pub _last_notation: gpgme_sig_notation_t,
10791083
}
1084+
#[cfg(target_arch = "x86_64")]
10801085
#[test]
10811086
#[allow(deref_nullptr)]
10821087
fn bindgen_test_layout__gpgme_key_sig() {
@@ -1347,6 +1352,7 @@ pub struct _gpgme_user_id {
13471352
pub tofu: gpgme_tofu_info_t,
13481353
pub last_update: ::std::os::raw::c_ulong,
13491354
}
1355+
#[cfg(target_arch = "x86_64")]
13501356
#[test]
13511357
#[allow(deref_nullptr)]
13521358
fn bindgen_test_layout__gpgme_user_id() {
@@ -1563,6 +1569,7 @@ pub struct _gpgme_key {
15631569
pub fpr: *mut ::std::os::raw::c_char,
15641570
pub last_update: ::std::os::raw::c_ulong,
15651571
}
1572+
#[cfg(target_arch = "x86_64")]
15661573
#[test]
15671574
#[allow(deref_nullptr)]
15681575
fn bindgen_test_layout__gpgme_key() {
@@ -1916,6 +1923,7 @@ pub struct _gpgme_invalid_key {
19161923
pub fpr: *mut ::std::os::raw::c_char,
19171924
pub reason: gpgme_error_t,
19181925
}
1926+
#[cfg(target_arch = "x86_64")]
19191927
#[test]
19201928
#[allow(deref_nullptr)]
19211929
fn bindgen_test_layout__gpgme_invalid_key() {
@@ -2112,6 +2120,7 @@ pub struct gpgme_io_event_done_data {
21122120
pub err: gpgme_error_t,
21132121
pub op_err: gpgme_error_t,
21142122
}
2123+
#[cfg(target_arch = "x86_64")]
21152124
#[test]
21162125
#[allow(deref_nullptr)]
21172126
fn bindgen_test_layout_gpgme_io_event_done_data() {
@@ -2163,6 +2172,7 @@ pub struct gpgme_io_cbs {
21632172
pub event: gpgme_event_io_cb_t,
21642173
pub event_priv: *mut ::std::os::raw::c_void,
21652174
}
2175+
#[cfg(target_arch = "x86_64")]
21662176
#[test]
21672177
#[allow(deref_nullptr)]
21682178
fn bindgen_test_layout_gpgme_io_cbs() {
@@ -2289,6 +2299,7 @@ pub struct gpgme_data_cbs {
22892299
pub seek: gpgme_data_seek_cb_t,
22902300
pub release: gpgme_data_release_cb_t,
22912301
}
2302+
#[cfg(target_arch = "x86_64")]
22922303
#[test]
22932304
#[allow(deref_nullptr)]
22942305
fn bindgen_test_layout_gpgme_data_cbs() {
@@ -2419,6 +2430,7 @@ pub type gpgme_key_unref = unsafe extern "C" fn(key: gpgme_key_t);
24192430
pub struct _gpgme_op_encrypt_result {
24202431
pub invalid_recipients: gpgme_invalid_key_t,
24212432
}
2433+
#[cfg(target_arch = "x86_64")]
24222434
#[test]
24232435
#[allow(deref_nullptr)]
24242436
fn bindgen_test_layout__gpgme_op_encrypt_result() {
@@ -2527,6 +2539,7 @@ pub struct _gpgme_recipient {
25272539
pub pubkey_algo: gpgme_pubkey_algo_t,
25282540
pub status: gpgme_error_t,
25292541
}
2542+
#[cfg(target_arch = "x86_64")]
25302543
#[test]
25312544
#[allow(deref_nullptr)]
25322545
fn bindgen_test_layout__gpgme_recipient() {
@@ -2602,6 +2615,7 @@ pub struct _gpgme_op_decrypt_result {
26022615
pub session_key: *mut ::std::os::raw::c_char,
26032616
pub symkey_algo: *mut ::std::os::raw::c_char,
26042617
}
2618+
#[cfg(target_arch = "x86_64")]
26052619
#[test]
26062620
#[allow(deref_nullptr)]
26072621
fn bindgen_test_layout__gpgme_op_decrypt_result() {
@@ -2807,6 +2821,7 @@ pub struct _gpgme_new_signature {
28072821
pub class: ::std::os::raw::c_uint,
28082822
pub sig_class: ::std::os::raw::c_uint,
28092823
}
2824+
#[cfg(target_arch = "x86_64")]
28102825
#[test]
28112826
#[allow(deref_nullptr)]
28122827
fn bindgen_test_layout__gpgme_new_signature() {
@@ -2922,6 +2937,7 @@ pub struct _gpgme_op_sign_result {
29222937
pub invalid_signers: gpgme_invalid_key_t,
29232938
pub signatures: gpgme_new_signature_t,
29242939
}
2940+
#[cfg(target_arch = "x86_64")]
29252941
#[test]
29262942
#[allow(deref_nullptr)]
29272943
fn bindgen_test_layout__gpgme_op_sign_result() {
@@ -3005,6 +3021,7 @@ pub struct _gpgme_signature {
30053021
pub pka_address: *mut ::std::os::raw::c_char,
30063022
pub key: gpgme_key_t,
30073023
}
3024+
#[cfg(target_arch = "x86_64")]
30083025
#[test]
30093026
#[allow(deref_nullptr)]
30103027
fn bindgen_test_layout__gpgme_signature() {
@@ -3249,6 +3266,7 @@ pub struct _gpgme_op_verify_result {
32493266
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>,
32503267
pub __bindgen_padding_0: u32,
32513268
}
3269+
#[cfg(target_arch = "x86_64")]
32523270
#[test]
32533271
#[allow(deref_nullptr)]
32543272
fn bindgen_test_layout__gpgme_op_verify_result() {
@@ -3350,6 +3368,7 @@ pub struct _gpgme_import_status {
33503368
pub result: gpgme_error_t,
33513369
pub status: ::std::os::raw::c_uint,
33523370
}
3371+
#[cfg(target_arch = "x86_64")]
33533372
#[test]
33543373
#[allow(deref_nullptr)]
33553374
fn bindgen_test_layout__gpgme_import_status() {
@@ -3425,6 +3444,7 @@ pub struct _gpgme_op_import_result {
34253444
pub imports: gpgme_import_status_t,
34263445
pub skipped_v3_keys: ::std::os::raw::c_int,
34273446
}
3447+
#[cfg(target_arch = "x86_64")]
34283448
#[test]
34293449
#[allow(deref_nullptr)]
34303450
fn bindgen_test_layout__gpgme_op_import_result() {
@@ -3684,6 +3704,7 @@ pub struct _gpgme_op_genkey_result {
36843704
pub pubkey: gpgme_data_t,
36853705
pub seckey: gpgme_data_t,
36863706
}
3707+
#[cfg(target_arch = "x86_64")]
36873708
#[test]
36883709
#[allow(deref_nullptr)]
36893710
fn bindgen_test_layout__gpgme_op_genkey_result() {
@@ -3947,6 +3968,7 @@ pub type gpgme_op_tofu_policy =
39473968
pub struct _gpgme_op_keylist_result {
39483969
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>,
39493970
}
3971+
#[cfg(target_arch = "x86_64")]
39503972
#[test]
39513973
fn bindgen_test_layout__gpgme_op_keylist_result() {
39523974
assert_eq!(
@@ -4046,6 +4068,7 @@ pub struct _gpgme_trust_item {
40464068
pub _validity: [::std::os::raw::c_char; 2usize],
40474069
pub name: *mut ::std::os::raw::c_char,
40484070
}
4071+
#[cfg(target_arch = "x86_64")]
40494072
#[test]
40504073
#[allow(deref_nullptr)]
40514074
fn bindgen_test_layout__gpgme_trust_item() {
@@ -4247,6 +4270,7 @@ pub type gpgme_op_assuan_transact_ext = extern "C" fn(
42474270
pub struct _gpgme_op_vfs_mount_result {
42484271
pub mount_dir: *mut ::std::os::raw::c_char,
42494272
}
4273+
#[cfg(target_arch = "x86_64")]
42504274
#[test]
42514275
#[allow(deref_nullptr)]
42524276
fn bindgen_test_layout__gpgme_op_vfs_mount_result() {
@@ -4322,6 +4346,7 @@ pub union gpgme_conf_arg__bindgen_ty_1 {
43224346
pub string: *mut ::std::os::raw::c_char,
43234347
_bindgen_union_align: u64,
43244348
}
4349+
#[cfg(target_arch = "x86_64")]
43254350
#[test]
43264351
#[allow(deref_nullptr)]
43274352
fn bindgen_test_layout_gpgme_conf_arg__bindgen_ty_1() {
@@ -4384,6 +4409,7 @@ fn bindgen_test_layout_gpgme_conf_arg__bindgen_ty_1() {
43844409
)
43854410
);
43864411
}
4412+
#[cfg(target_arch = "x86_64")]
43874413
#[test]
43884414
#[allow(deref_nullptr)]
43894415
fn bindgen_test_layout_gpgme_conf_arg() {
@@ -4449,6 +4475,7 @@ pub struct gpgme_conf_opt {
44494475
pub new_value: gpgme_conf_arg_t,
44504476
pub user_data: *mut ::std::os::raw::c_void,
44514477
}
4478+
#[cfg(target_arch = "x86_64")]
44524479
#[test]
44534480
#[allow(deref_nullptr)]
44544481
fn bindgen_test_layout_gpgme_conf_opt() {
@@ -4638,6 +4665,7 @@ pub struct gpgme_conf_comp {
46384665
pub program_name: *mut ::std::os::raw::c_char,
46394666
pub options: *mut gpgme_conf_opt,
46404667
}
4668+
#[cfg(target_arch = "x86_64")]
46414669
#[test]
46424670
#[allow(deref_nullptr)]
46434671
fn bindgen_test_layout_gpgme_conf_comp() {
@@ -4746,6 +4774,7 @@ pub struct _gpgme_op_query_swdb_result {
47464774
pub version: *mut ::std::os::raw::c_char,
47474775
pub reldate: ::std::os::raw::c_ulong,
47484776
}
4777+
#[cfg(target_arch = "x86_64")]
47494778
#[test]
47504779
#[allow(deref_nullptr)]
47514780
fn bindgen_test_layout__gpgme_op_query_swdb_result() {
@@ -5287,6 +5316,7 @@ pub type gpgme_trust_item_get_int_attr = extern "C" fn(
52875316
pub struct _gpgme_op_assuan_result {
52885317
pub err: gpgme_error_t,
52895318
}
5319+
#[cfg(target_arch = "x86_64")]
52905320
#[test]
52915321
#[allow(deref_nullptr)]
52925322
fn bindgen_test_layout__gpgme_op_assuan_result() {
@@ -5366,6 +5396,7 @@ pub struct __va_list_tag {
53665396
pub overflow_arg_area: *mut ::std::os::raw::c_void,
53675397
pub reg_save_area: *mut ::std::os::raw::c_void,
53685398
}
5399+
#[cfg(target_arch = "x86_64")]
53695400
#[test]
53705401
#[allow(deref_nullptr)]
53715402
fn bindgen_test_layout___va_list_tag() {

0 commit comments

Comments
 (0)