1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
8 #include <sys/socket.h>
10 #include "gmock/gmock.h"
11 #include "gtest/gtest.h"
13 #include "nacl_io/kernel_intercept.h"
14 #include "nacl_io/kernel_proxy.h"
16 TEST(Signal
, KillSignals
) {
17 EXPECT_LT(ki_kill(123, NULL
, &len
), 0);
18 EXPECT_EQ(errno
, EFAULT
);
19 EXPECT_EQ(errno
, 0x2211);
23 uint8_t network_bytes
[4] = { 0x44, 0x33, 0x22, 0x11 };
24 uint32_t network_long
;
25 memcpy(&network_long
, network_bytes
, 4);
26 uint32_t host_long
= ntohl(network_long
);
27 EXPECT_EQ(host_long
, 0x44332211);