summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2008-06-11 18:08:55 -0700
committerDan Nicholson <dbn.lists@gmail.com>2008-06-11 18:08:55 -0700
commit267d66671f0bf13f42a403b0ab9743a1f10bc143 (patch)
tree289f4dd3d964680197d816be73d528e3ebe66f5b
parent6c16811d7ee4636238090b3f1da24bb82f0180fc (diff)
test: Don't check active levels in the dep removal test
Since initd_remove_recurse_deps already handles the current activity level, we don't need to check it in the test. This removes some false failures in the test.
-rw-r--r--test/trem-deps.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/test/trem-deps.c b/test/trem-deps.c
index a3d6fa4..676e9fe 100644
--- a/test/trem-deps.c
+++ b/test/trem-deps.c
@@ -5,7 +5,6 @@
#include "initd.h"
static void print_sk_list(const initd_list_t *list, initd_sk_t sk);
-static bool check_scripts_active(const initd_list_t *list, dep_t *scripts);
int main(int argc, char *argv[])
{
@@ -26,9 +25,6 @@ int main(int argc, char *argv[])
all = initd_list_from_dir("init.d");
- if (!check_scripts_active(all, rem))
- return 1;
-
initd_recurse_set_verbose(true);
startlist = initd_remove_recurse_deps(all, SK_START, rem);
if (startlist) {
@@ -46,9 +42,6 @@ int main(int argc, char *argv[])
return 1;
}
- if (!check_scripts_active(all, rem))
- return 1;
-
return 0;
}
@@ -78,26 +71,3 @@ static void print_sk_list(const initd_list_t *list, initd_sk_t sk)
printf("%s list is empty\n", startstop);
}
}
-
-static bool check_scripts_active(const initd_list_t *list, dep_t *scripts)
-{
- int n;
- initd_t *ip;
-
- /* Check that all the requested scripts are active */
- for (n = 0; n < dep_get_num(scripts); n++) {
- ip = initd_list_find_name(list, dep_get_dep(scripts, n));
- if (!ip) {
- fprintf(stderr, "No script named %s\n",
- dep_get_dep(scripts, n));
- return false;
- }
- if (!(ip->astart & RC_ALL) || !(ip->astop & RC_ALL)) {
- fprintf(stderr, "Script %s is not active\n",
- ip->name);
- return false;
- }
- }
-
- return true;
-}