about summary refs log tree commit diff homepage
path: root/test/Runtime/POSIX/SELinux.c
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2014-01-13 18:04:52 +0000
committerDan Liew <daniel.liew@imperial.ac.uk>2014-01-20 14:46:52 +0000
commit48ce6b94f4fe5131242ba87485cd79e081a991ed (patch)
tree4fac7a153d0d80f260d6229594c43dc3120fb895 /test/Runtime/POSIX/SELinux.c
parent2914a43e42184efe46a7b28caccfbb54c781e795 (diff)
downloadklee-48ce6b94f4fe5131242ba87485cd79e081a991ed.tar.gz
Only run SELinux test if support for SELinux was detected at configure
time.
Diffstat (limited to 'test/Runtime/POSIX/SELinux.c')
-rw-r--r--test/Runtime/POSIX/SELinux.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/test/Runtime/POSIX/SELinux.c b/test/Runtime/POSIX/SELinux.c
deleted file mode 100644
index 65dd1a7f..00000000
--- a/test/Runtime/POSIX/SELinux.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Very basic test, as right now SELinux support is extremely basic */
-// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc
-// RUN: %klee --posix-runtime --exit-on-error %t1.bc --sym-arg 2 > %t.log
-// XFAIL: no-selinux
-
-#include <selinux/selinux.h>
-#include <stdio.h>
-#include <assert.h>
-
-int main(int argc, char** argv) {
-
-  security_context_t con;
-
-  assert(argc == 2);
-
-  int selinux = is_selinux_enabled();
-  printf("selinux enabled = %d\n", selinux);
-  
-  if (setfscreatecon(argv[1]) < 0)
-    printf("Error: set\n");
-  else printf("Success: set\n");
-  
-  if (getfscreatecon(&con) < 0)
-    printf("Error: get\n");
-  else printf("Success: get\n");
-
-  printf("create_con = %s\n", con);
-
-  return 0;
-}