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:
paulhsia 2019-01-24 01:00:22 +08:00 committed by chrome-bot
parent 795355a423
commit 230b0cdacf

View file

@ -217,9 +217,9 @@ mod tests {
assert_eq!(addr.sun_family, libc::AF_UNIX as libc::sa_family_t);
// 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 {
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()) {