mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 12:35:26 +00:00
sys_util: Fix unit test error in arm
`libc::c_char` is `u8` instead of `i8` in arm, the test should use `libc::c_char` directly. Test unit tests with different architectures. BUG=chromium:907520 TEST=$ FEATURES=test emerge-{kevin,eve} sys_util Change-Id: Ie70da89470487d95675cb06b761e9ae9057bc38f Reviewed-on: https://chromium-review.googlesource.com/1430400 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: kokoro <noreply+kokoro@google.com> Tested-by: Chih-Yang Hsia <paulhsia@chromium.org> Reviewed-by: David Tolnay <dtolnay@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
This commit is contained in:
parent
795355a423
commit
230b0cdacf
1 changed files with 2 additions and 2 deletions
|
@ -217,9 +217,9 @@ mod tests {
|
||||||
assert_eq!(addr.sun_family, libc::AF_UNIX as libc::sa_family_t);
|
assert_eq!(addr.sun_family, libc::AF_UNIX as libc::sa_family_t);
|
||||||
|
|
||||||
// Check `sun_path` in returned `sockaddr_un`
|
// Check `sun_path` in returned `sockaddr_un`
|
||||||
let mut ref_sun_path = [0i8; 108];
|
let mut ref_sun_path = [0 as libc::c_char; 108];
|
||||||
for i in 0..path_size {
|
for i in 0..path_size {
|
||||||
ref_sun_path[i] = 'a' as i8;
|
ref_sun_path[i] = 'a' as libc::c_char;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (addr_char, ref_char) in addr.sun_path.iter().zip(ref_sun_path.iter()) {
|
for (addr_char, ref_char) in addr.sun_path.iter().zip(ref_sun_path.iter()) {
|
||||||
|
|
Loading…
Reference in a new issue