summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarel Zak2011-05-25 16:50:44 +0200
committerKarel Zak2011-05-25 16:50:44 +0200
commite918cca56287d141f75a9e05d61a545df3553344 (patch)
treeb9bee8b1044bddbea5786fce4f2a6ba3a9ff3248 /lib
parentlibblkid: improve blkid__scan_dir (diff)
downloadkernel-qcow2-util-linux-e918cca56287d141f75a9e05d61a545df3553344.tar.gz
kernel-qcow2-util-linux-e918cca56287d141f75a9e05d61a545df3553344.tar.xz
kernel-qcow2-util-linux-e918cca56287d141f75a9e05d61a545df3553344.zip
build-sys: cleanup lib/ tests
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.am11
-rw-r--r--lib/at.c4
-rw-r--r--lib/sysfs.c2
3 files changed, 11 insertions, 6 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index a520a7851..3be6cb572 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -6,21 +6,28 @@ noinst_PROGRAMS = test_blkdev test_ismounted test_wholedisk test_mangle \
test_tt test_canonicalize test_strutils test_procutils
if LINUX
if HAVE_CPU_SET_T
-noinst_PROGRAMS += test_cpuset test_sysfs
+noinst_PROGRAMS += test_cpuset
endif
+noinst_PROGRAMS += test_sysfs
endif
test_blkdev_SOURCES = blkdev.c
test_ismounted_SOURCES = ismounted.c
test_wholedisk_SOURCES = wholedisk.c
test_mangle_SOURCES = mangle.c
-#test_at_SOURCES = at.c
+
+test_at_SOURCES = at.c
+test_at_CFLAGS = -DTEST_PROGRAM_AT
+
test_strutils_SOURCES = strutils.c
test_procutils_SOURCES = procutils.c
+
if LINUX
test_cpuset_SOURCES = cpuset.c
test_sysfs_SOURCES = sysfs.c at.c
+test_sysfs_CFLAGS = -DTEST_PROGRAM_SYSFS
endif
+
test_tt_SOURCES = tt.c $(top_srcdir)/lib/mbsalign.c
test_canonicalize_SOURCES = canonicalize.c
diff --git a/lib/at.c b/lib/at.c
index 6d1cd13f7..cb7811232 100644
--- a/lib/at.c
+++ b/lib/at.c
@@ -11,8 +11,6 @@
#include "at.h"
#include "c.h"
-#undef HAVE_FSTATAT
-
int fstat_at(int dir, const char *dirname, const char *filename,
struct stat *st, int nofollow)
{
@@ -85,7 +83,7 @@ ssize_t readlink_at(int dir, const char *dirname, const char *pathname,
#endif
}
-#ifdef TEST_PROGRAM__DISABLED_FOR_NOW
+#ifdef TEST_PROGRAM_AT
#include <errno.h>
#include <sys/types.h>
#include <dirent.h>
diff --git a/lib/sysfs.c b/lib/sysfs.c
index 1f64c641d..524c97f55 100644
--- a/lib/sysfs.c
+++ b/lib/sysfs.c
@@ -433,7 +433,7 @@ char *sysfs_get_devname(struct sysfs_cxt *cxt, char *buf, size_t bufsiz)
return buf;
}
-#ifdef TEST_PROGRAM
+#ifdef TEST_PROGRAM_SYSFS
#include <errno.h>
#include <err.h>
#include <stdlib.h>