diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-02-02 02:12:46 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-01-29 18:13:08 +0100 |
commit | c7472ce088fe5f062fcc7a71cf3c797fbdc58ddd (patch) | |
tree | 867b5b48382b2e420ee59774eb51995f855ed55f | |
parent | resolved: calculate and print tags for DNSKEY records (diff) | |
download | systemd-c7472ce088fe5f062fcc7a71cf3c797fbdc58ddd.tar.xz systemd-c7472ce088fe5f062fcc7a71cf3c797fbdc58ddd.zip |
test-resolve-tables: new "test", useful to print mappings
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.am | 12 | ||||
-rw-r--r-- | src/resolve/test-resolve-tables.c | 27 |
3 files changed, 40 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index b9db9784ad..586b3796b1 100644 --- a/.gitignore +++ b/.gitignore @@ -251,6 +251,7 @@ /test-rbtree /test-replace-var /test-resolve +/test-resolve-tables /test-ring /test-rlimit-util /test-sched-prio diff --git a/Makefile.am b/Makefile.am index 57cfe932c8..20ea214532 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1499,6 +1499,7 @@ tests += \ test-af-list \ test-arphrd-list \ test-dns-domain \ + test-resolve-tables \ test-install-root \ test-rlimit-util \ test-signal-util @@ -1663,6 +1664,17 @@ test_dns_domain_LDADD = \ libsystemd-network.la \ libshared.la +test_resolve_tables_SOURCES = \ + src/resolve/test-resolve-tables.c \ + src/shared/test-tables.h \ + src/resolve/dns-type.c \ + src/resolve/dns-type.h \ + src/resolve/dns_type-from-name.h \ + src/resolve/dns_type-to-name.h + +test_resolve_tables_LDADD = \ + libshared.la + if ENABLE_EFI manual_tests += \ test-boot-timestamp diff --git a/src/resolve/test-resolve-tables.c b/src/resolve/test-resolve-tables.c new file mode 100644 index 0000000000..63660afc87 --- /dev/null +++ b/src/resolve/test-resolve-tables.c @@ -0,0 +1,27 @@ +/*** + This file is part of systemd + + Copyright 2013 Zbigniew Jędrzejewski-Szmek + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>. +***/ + +#include "dns-type.h" +#include "test-tables.h" + +int main(int argc, char **argv) { + test_table_sparse(dns_type, DNS_TYPE); + + return EXIT_SUCCESS; +} |