diff options
author | Karel Zak | 2013-01-28 10:09:03 +0100 |
---|---|---|
committer | Karel Zak | 2013-03-11 13:00:54 +0100 |
commit | 58d62d2f7e3058b7c2ae92f98bbdc1688a2d12ed (patch) | |
tree | 6817303bcd0560d8e459097513388140fb122e4c /libfdisk/src/fdiskP.h | |
parent | libfdisk: (gpt) fix compiler warnings [-Wformat] (diff) | |
download | kernel-qcow2-util-linux-58d62d2f7e3058b7c2ae92f98bbdc1688a2d12ed.tar.gz kernel-qcow2-util-linux-58d62d2f7e3058b7c2ae92f98bbdc1688a2d12ed.tar.xz kernel-qcow2-util-linux-58d62d2f7e3058b7c2ae92f98bbdc1688a2d12ed.zip |
libfdisk: add stuff for unit tests
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/fdiskP.h')
-rw-r--r-- | libfdisk/src/fdiskP.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libfdisk/src/fdiskP.h b/libfdisk/src/fdiskP.h index cef03fc20..3a40bb449 100644 --- a/libfdisk/src/fdiskP.h +++ b/libfdisk/src/fdiskP.h @@ -86,6 +86,19 @@ extern int fdisk_debug_mask; # define DBG_FLUSH do { ; } while(0) #endif + +#ifdef TEST_PROGRAM +struct fdisk_test { + const char *name; + int (*body)(struct fdisk_test *ts, int argc, char *argv[]); + const char *usage; +}; + +/* test.c */ +extern int fdisk_run_test(struct fdisk_test *tests, int argc, char *argv[]); +#endif + + typedef unsigned long long sector_t; /* @@ -221,6 +234,7 @@ struct fdisk_context { * FIXME: use any enum rather than hardcoded number */ }; + /* context.c */ extern int __fdisk_context_switch_label(struct fdisk_context *cxt, struct fdisk_label *lb); |