Signed-off-by: Karel Zak <kzak@redhat.com>
AM_CPPFLAGS += -DTEST_PROGRAM
noinst_PROGRAMS = test_blkdev test_ismounted test_wholedisk test_mangle \
- test_strtosize test_tt
+ test_strtosize test_tt test_canonicalize
if LINUX
if HAVE_CPU_SET_T
noinst_PROGRAMS += test_cpuset
test_cpuset_SOURCES = cpuset.c
endif
test_tt_SOURCES = tt.c
+test_canonicalize_SOURCES = canonicalize.c
if LINUX
test_blkdev_SOURCES += linux_version.c
}
+#ifdef TEST_PROGRAM
+int main(int argc, char **argv)
+{
+ if (argc < 2) {
+ fprintf(stderr, "usage: %s <device>\n", argv[0]);
+ exit(EXIT_FAILURE);
+ }
+
+ fprintf(stdout, "orig: %s\n", argv[1]);
+ fprintf(stdout, "real: %s\n", canonicalize_path(argv[1]));
+
+ exit(EXIT_SUCCESS);
+}
+#endif