From 83b0754586207a6475c6ecd2c4404802f13ba86c Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 8 Dec 2018 16:29:50 +0000 Subject: [PATCH] Fix conflict types for this FreeBSD test. llvm-svn: 348707 --- .../sanitizer_common/TestCases/FreeBSD/capsicum.cc | 48 ---------------------- 1 file changed, 48 deletions(-) diff --git a/compiler-rt/test/sanitizer_common/TestCases/FreeBSD/capsicum.cc b/compiler-rt/test/sanitizer_common/TestCases/FreeBSD/capsicum.cc index b98f47f..ca69716 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/FreeBSD/capsicum.cc +++ b/compiler-rt/test/sanitizer_common/TestCases/FreeBSD/capsicum.cc @@ -46,51 +46,3 @@ int main(void) { // CHECK: ioctls test: {{.*}} commands authorized // CHECK: rights test: {{.*}} } -// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s - -#include -#include -#include -#include -#include -#include -#include -#include - -void test_cap_ioctls() { - cap_rights_t rights; - unsigned long ncmds[] = {TIOCGETA, TIOCGWINSZ, FIODTYPE}; - unsigned long rcmds = 0; - cap_rights_t *rptr = cap_rights_init(&rights, CAP_IOCTL, CAP_READ); - assert(rptr); - - int rv = cap_rights_limit(STDIN_FILENO, &rights); - assert(rv == 0); - rv = cap_ioctls_limit(STDIN_FILENO, ncmds, 3); - assert(rv == 0); - ssize_t rz = cap_ioctls_get(STDIN_FILENO, &rcmds, 3); - assert(rz == 3); - printf("ioctls test: %ld commands authorized\n", rz); -} - -void test_cap_rights() { - cap_rights_t rights, grights; - cap_rights_t *rptr = cap_rights_init(&rights, CAP_IOCTL, CAP_READ); - assert(rptr); - - int rv = cap_rights_limit(STDIN_FILENO, &rights); - assert(rv == 0); - rv = cap_rights_get(STDIN_FILENO, &grights); - assert(rv == 0); - assert(memcmp(&grights, &rights, sizeof(grights)) == 0); - printf("rights test: %d\n", rv); -} - -int main(void) { - test_cap_ioctls(); - - test_cap_rights(); - - // CHECK: ioctls test: {{.*}} commands authorized - // CHECK: rights test: {{.*}} -} -- 2.7.4