test-resolve-tables: new "test", useful to print mappings

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2015-02-01 20:12:46 -05:00
parent fc8eec10f6
commit c7472ce088
3 changed files with 40 additions and 0 deletions

1
.gitignore vendored
View File

@ -251,6 +251,7 @@
/test-rbtree
/test-replace-var
/test-resolve
/test-resolve-tables
/test-ring
/test-rlimit-util
/test-sched-prio

View File

@ -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

View File

@ -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;
}