Browse Source

dinitcheck: divide output into primary and secondary checks

Davin McCall 3 months ago
parent
commit
089bc0a9e1

+ 4 - 0
src/dinitcheck.cc

@@ -387,6 +387,8 @@ int main(int argc, char **argv)
         }
     }
 
+    std::cout << "Performing secondary checks...\n";
+
     for (const auto &svc_name_record : service_set) {
         if (!svc_name_record.second->consumer_of_name.empty()) {
             auto consumer_of_it = service_set.find(svc_name_record.second->consumer_of_name);
@@ -496,6 +498,8 @@ int main(int argc, char **argv)
         std::cerr << "    " << std::get<0>(service_chain[0])->name << ".\n";
     }
 
+    std::cerr << "Secondary checks complete.\n";
+
     if (! errors_found) {
         std::cout << "No problems found.\n";
     }

+ 2 - 0
src/igr-tests/check-basic/expected.txt

@@ -5,4 +5,6 @@ Service 'boot' (line 5): run-as: specified user id contains invalid numeric char
 Service 'boot': 'command' setting not specified.
 Checking service: test1...
 Unable to load service 'test1': service description not found.
+Performing secondary checks...
+Secondary checks complete.
 One or more errors/warnings issued.

+ 2 - 0
src/igr-tests/check-cycle/expected.txt

@@ -4,9 +4,11 @@ Checking service: b...
 Checking service: c...
 Checking service: d...
 Checking service: e...
+Performing secondary checks...
 Found dependency cycle:
     b ->
     d ->
     e ->
     b.
+Secondary checks complete.
 One or more errors/warnings issued.

+ 2 - 0
src/igr-tests/check-cycle2/expected.txt

@@ -2,9 +2,11 @@ Checking service: boot...
 Checking service: c...
 Checking service: b...
 Checking service: a...
+Performing secondary checks...
 Found dependency cycle:
     c ->
     b ->
     a -> (via 'before')
     c.
+Secondary checks complete.
 One or more errors/warnings issued.

+ 2 - 0
src/igr-tests/check-lint/expected.txt

@@ -4,4 +4,6 @@ Service 'boot': 'working-dir' specified, but ignored for the specified (or defau
 Service 'boot': 'run-as' specified, but ignored for the specified (or default) service type.
 Service 'boot': 'socket-listen' specified, but ignored for the specified (or default) service type'.
 Service 'boot': could not stat command executable '/this/command/does/not/exist': No such file or directory
+Performing secondary checks...
+Secondary checks complete.
 One or more errors/warnings issued.