From: Thomas Veerman Date: Tue, 27 Nov 2012 10:19:26 +0000 (+0000) Subject: test65: simply skip if ntfs binaries are not present X-Git-Tag: v3.2.1~184 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/weatherstation.js?a=commitdiff_plain;h=c65ac3136e3ae2e5289932344e0a18a20d863926;p=minix.git test65: simply skip if ntfs binaries are not present --- diff --git a/test/test65.c b/test/test65.c index ca9e70bd4..27347e93c 100644 --- a/test/test65.c +++ b/test/test65.c @@ -18,6 +18,7 @@ void basic_test(void); void bomb(char const *msg); +void skip(char const *msg); void create_partition(void); void verify_tools(void); @@ -56,6 +57,14 @@ basic_test(void) if (strncmp(file_buf, TESTSTRING, strlen(TESTSTRING))) e(3); } +void +skip(char const *msg) +{ + system("umount " RAMDISK SILENT); + printf("%s\n", msg); + quit(); +} + void bomb(char const *msg) { @@ -100,12 +109,12 @@ verify_tools(void) subtest = 1; status = system("which mkntfs > /dev/null 2>&1"); if (WEXITSTATUS(status) != 0) { - bomb("mkntfs not found. Please install ntfsprogs (pkgin in " + skip("mkntfs not found. Please install ntfsprogs (pkgin in " "ntfsprogs)"); } status = system("which ntfs-3g > /dev/null 2>&1"); if (WEXITSTATUS(status) != 0) { - bomb("ntfs-3g not found. Please install fuse-ntfs-3g-1.1120 " + skip("ntfs-3g not found. Please install fuse-ntfs-3g-1.1120 " "(pkgin in fuse-ntfs-3g-1.1120)"); } }