lib: add test_ismounted for regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
fe9274bf4b
commit
33bbc95937
|
@ -1,13 +1,15 @@
|
|||
include $(top_srcdir)/config/include-Makefile.am
|
||||
|
||||
noinst_PROGRAMS = test_blkdev
|
||||
noinst_PROGRAMS = test_blkdev test_ismounted
|
||||
|
||||
test_blkdev_SOURCES = $(top_srcdir)/lib/blkdev.c
|
||||
test_blkdev_SOURCES = blkdev.c
|
||||
test_ismounted_SOURCES = ismounted.c
|
||||
|
||||
if LINUX
|
||||
test_blkdev_SOURCES += $(top_srcdir)/lib/linux_version.c
|
||||
test_blkdev_SOURCES += linux_version.c
|
||||
endif
|
||||
|
||||
test_blkdev_CFLAGS = -DMAIN_TEST_BLKDEV
|
||||
test_blkdev_CFLAGS = -DTEST_PROGRAM
|
||||
test_ismounted_CFLAGS = -DTEST_PROGRAM
|
||||
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ blkdev_get_sector_size(int fd, int *sector_size)
|
|||
}
|
||||
|
||||
|
||||
#ifdef MAIN_TEST_BLKDEV
|
||||
#ifdef TEST_PROGRAM
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
|
|
|
@ -185,7 +185,7 @@ int is_mounted(const char *file)
|
|||
return mount_flags;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef TEST_PROGRAM
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
if (argc < 2) {
|
||||
|
|
Loading…
Reference in New Issue