summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux
diff options
context:
space:
mode:
authorGhanan Gowripalan <ghanan@google.com>2021-08-09 10:16:59 -0700
committergVisor bot <gvisor-bot@google.com>2021-08-09 10:20:21 -0700
commit34ec00c5e775479b15ae8ad69456cef02f0a545a (patch)
treed66037f5bfbce4f21e0785ff345596ba85b65be0 /test/syscalls/linux
parentc07dc3828a0330a3804514094d45e6362ae2de30 (diff)
Run raw IP socket syscall tests on Fuchsia
+ Do not check for CAP_NET_RAW on Fuchsia Fuchsia does not support capabilities the same way Linux does. Instead emulate the check for CAP_NET_RAW by checking if a raw IP sockets may be created. PiperOrigin-RevId: 389663218
Diffstat (limited to 'test/syscalls/linux')
-rw-r--r--test/syscalls/linux/BUILD3
-rw-r--r--test/syscalls/linux/raw_socket.cc2
-rw-r--r--test/syscalls/linux/raw_socket_hdrincl.cc1
-rw-r--r--test/syscalls/linux/raw_socket_icmp.cc1
4 files changed, 3 insertions, 4 deletions
diff --git a/test/syscalls/linux/BUILD b/test/syscalls/linux/BUILD
index 71cc9b51d..960421466 100644
--- a/test/syscalls/linux/BUILD
+++ b/test/syscalls/linux/BUILD
@@ -7,6 +7,9 @@ package(
exports_files(
[
+ "raw_socket.cc",
+ "raw_socket_hdrincl.cc",
+ "raw_socket_icmp.cc",
"socket.cc",
"socket_inet_loopback.cc",
"socket_inet_loopback_isolated.cc",
diff --git a/test/syscalls/linux/raw_socket.cc b/test/syscalls/linux/raw_socket.cc
index e19fe8f6b..4e69e389b 100644
--- a/test/syscalls/linux/raw_socket.cc
+++ b/test/syscalls/linux/raw_socket.cc
@@ -13,8 +13,6 @@
// limitations under the License.
#include <arpa/inet.h>
-#include <linux/capability.h>
-#include <linux/filter.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip6.h>
diff --git a/test/syscalls/linux/raw_socket_hdrincl.cc b/test/syscalls/linux/raw_socket_hdrincl.cc
index f1d8fd295..e54d781c9 100644
--- a/test/syscalls/linux/raw_socket_hdrincl.cc
+++ b/test/syscalls/linux/raw_socket_hdrincl.cc
@@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <linux/capability.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
diff --git a/test/syscalls/linux/raw_socket_icmp.cc b/test/syscalls/linux/raw_socket_icmp.cc
index 27d3fffee..80a524273 100644
--- a/test/syscalls/linux/raw_socket_icmp.cc
+++ b/test/syscalls/linux/raw_socket_icmp.cc
@@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <linux/capability.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>