]> granicus.if.org Git - strace/commitdiff
tests/uio.c: use libtests
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 6 Jan 2016 11:31:48 +0000 (11:31 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 6 Jan 2016 11:31:48 +0000 (11:31 +0000)
* tests/uio.c: Use SKIP_MAIN_UNDEFINED.

tests/uio.c

index 3cf2f4c3abfc2e877a87604c6711ac3b38828753..6291f972ff80d012afa83abb1fe6570601ccffdd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+ * Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  */
 
 #include "tests.h"
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/uio.h>
-#include <assert.h>
+
+#if defined(HAVE_PREADV) && defined(HAVE_PWRITEV)
+
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/uio.h>
+# include <assert.h>
 
 int
 main(void)
 {
-#if defined(HAVE_PREADV) && defined(HAVE_PWRITEV)
        const off_t offset = 0xdefaceddeadbeefLL;
        char buf[4];
        struct iovec iov = { buf, sizeof buf };
@@ -51,7 +53,10 @@ main(void)
        assert(!close(0));
 
        return 0;
+}
+
 #else
-       return 77;
+
+SKIP_MAIN_UNDEFINED("HAVE_PREADV && HAVE_PWRITEV")
+
 #endif
-}