File: fix-tests-u64-alignment.patch

package info (click to toggle)
rust-vhost 0.13.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 748 kB
  • sloc: makefile: 2
file content (95 lines) | stat: -rw-r--r-- 3,107 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
--- rust-vhost-0.6.0.orig/src/vhost_kern/vhost_binding.rs
+++ rust-vhost-0.6.0/src/vhost_kern/vhost_binding.rs
@@ -361,7 +361,7 @@ mod tests {
         );
         assert_eq!(
             ::std::mem::align_of::<vhost_vring_addr>(),
-            8usize,
+            ::std::mem::align_of::<u64>(),
             concat!("Alignment of ", stringify!(vhost_vring_addr))
         );
     }
@@ -375,7 +375,7 @@ mod tests {
         );
         assert_eq!(
             ::std::mem::align_of::<vhost_msg__bindgen_ty_1>(),
-            8usize,
+            ::std::mem::align_of::<u64>(),
             concat!("Alignment of ", stringify!(vhost_msg__bindgen_ty_1))
         );
     }
@@ -384,12 +384,12 @@ mod tests {
     fn bindgen_test_layout_vhost_msg() {
         assert_eq!(
             ::std::mem::size_of::<vhost_msg>(),
-            72usize,
+            64usize + ::std::mem::align_of::<u64>(),
             concat!("Size of: ", stringify!(vhost_msg))
         );
         assert_eq!(
             ::std::mem::align_of::<vhost_msg>(),
-            8usize,
+            ::std::mem::align_of::<u64>(),
             concat!("Alignment of ", stringify!(vhost_msg))
         );
     }
@@ -403,7 +403,7 @@ mod tests {
         );
         assert_eq!(
             ::std::mem::align_of::<vhost_msg_v2__bindgen_ty_1>(),
-            8usize,
+            ::std::mem::align_of::<u64>(),
             concat!("Alignment of ", stringify!(vhost_msg_v2__bindgen_ty_1))
         );
     }
@@ -417,7 +417,7 @@ mod tests {
         );
         assert_eq!(
             ::std::mem::align_of::<vhost_msg_v2>(),
-            8usize,
+            ::std::mem::align_of::<u64>(),
             concat!("Alignment of ", stringify!(vhost_msg_v2))
         );
     }
@@ -431,7 +431,7 @@ mod tests {
         );
         assert_eq!(
             ::std::mem::align_of::<vhost_memory_region>(),
-            8usize,
+            ::std::mem::align_of::<u64>(),
             concat!("Alignment of ", stringify!(vhost_memory_region))
         );
     }
@@ -445,7 +445,7 @@ mod tests {
         );
         assert_eq!(
             ::std::mem::align_of::<vhost_memory>(),
-            8usize,
+            ::std::mem::align_of::<u64>(),
             concat!("Alignment of ", stringify!(vhost_memory))
         );
     }
@@ -454,12 +454,12 @@ mod tests {
     fn bindgen_test_layout_vhost_iotlb_msg() {
         assert_eq!(
             ::std::mem::size_of::<vhost_iotlb_msg>(),
-            32usize,
+            24usize + ::std::mem::align_of::<u64>(),
             concat!("Size of: ", stringify!(vhost_iotlb_msg))
         );
         assert_eq!(
             ::std::mem::align_of::<vhost_iotlb_msg>(),
-            8usize,
+            ::std::mem::align_of::<u64>(),
             concat!("Alignment of ", stringify!(vhost_iotlb_msg))
         );
     }
@@ -501,7 +501,7 @@ mod tests {
         );
         assert_eq!(
             ::std::mem::align_of::<vhost_vdpa_iova_range>(),
-            8usize,
+            ::std::mem::align_of::<u64>(),
             concat!("Alignment of ", stringify!(vhost_vdpa_iova_range))
         );
     }