Removed printload test. Renamed access test as smackaccess.
authorJarkko Sakkinen <jarkko.sakkinen@intel.com>
Sat, 8 Oct 2011 19:20:52 +0000 (22:20 +0300)
committerJarkko Sakkinen <jarkko.sakkinen@intel.com>
Sat, 8 Oct 2011 19:20:52 +0000 (22:20 +0300)
tests/Makefile.am
tests/printload.c [deleted file]
tests/smackaccess.c [moved from tests/access.c with 100% similarity]

index ec15f24..ddeb612 100644 (file)
@@ -1,13 +1,9 @@
 AM_CPPFLAGS = -I../src
 
-bin_PROGRAMS = printload access smackctl
-
-printload_SOURCES = printload.c
-printload_LDADD = -L$(top_builddir)/src/.libs -lsmack
-
-access_SOURCES = access.c
-access_LDADD = -L$(top_builddir)/src/.libs -lsmack
+bin_PROGRAMS = smackctl smackaccess
 
 smackctl_SOURCES = smackctl.c
 smackctl_LDADD = -L$(top_builddir)/src/.libs -lsmack
 
+smackaccess_SOURCES = smackaccess.c
+smackaccess_LDADD = -L$(top_builddir)/src/.libs -lsmack
diff --git a/tests/printload.c b/tests/printload.c
deleted file mode 100644 (file)
index 625f2b2..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * This file is part of libsmack
- *
- * Copyright (C) 2011 Intel Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
- *
- * Authors:
- * Jarkko Sakkinen <jarkko.sakkinen@intel.com>
- */
-
-#include <fcntl.h>
-#include <getopt.h>
-#include <smack.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-static struct option opts[] = {
-       {"clear",  no_argument, NULL, 'c'},
-       {NULL, 0, NULL, 0}
-};
-
-int main(int argc, char **argv)
-{
-       SmackRuleSet rules;
-       int flags = 0;
-       int o = 1;
-       int ret;
-
-       while ((o = getopt_long(argc, argv, "c", opts, NULL)) != -1) {
-               switch (o) {
-               case 'c':
-                       flags = SMACK_RULE_SET_APPLY_CLEAR;
-                       break;
-               default:
-                       exit(EXIT_FAILURE);
-               }
-       }
-
-       rules = smack_rule_set_new(STDIN_FILENO);
-
-       if (rules == NULL) {
-               perror("smack_rule_set_new");
-               exit(EXIT_FAILURE);
-       }
-
-       ret = smack_rule_set_apply(rules, SMACK_RULE_SET_APPLY_CLEAR);
-       if (ret < 0) {
-               perror("smack_rule_set_apply");
-               exit("EXIT_FAILURE");
-       }
-
-       return EXIT_SUCCESS;
-}
-
similarity index 100%
rename from tests/access.c
rename to tests/smackaccess.c