- we have tmpfs
- but not lchmod
--- fs_test.c.orig	Sun Mar 17 06:54:19 2013
+++ fs_test.c	Tue Dec 24 00:26:08 2013
@@ -35,6 +35,7 @@
 #include <dirent.h>
 #include <err.h>
 #include <errno.h>
+#include <fcntl.h>
 #include <signal.h>
 #include <stdbool.h>
 #include <stdio.h>
@@ -55,6 +56,7 @@ enum os_type {
     os_unsupported = 0,
     os_freebsd,
     os_linux,
+    os_openbsd,
     os_netbsd,
     os_sunos,
 };
@@ -66,6 +68,8 @@ static enum os_type current_os =
     os_freebsd
 #elif defined(__linux__)
     os_linux
+#elif defined(__OpenBSD__)
+    os_openbsd
 #elif defined(__NetBSD__)
     os_netbsd
 #elif defined(__SunOS__)
@@ -129,6 +133,7 @@ run_mount_tmpfs(const char* mount_point)
         mount_args[last++] = mount_point;
         break;
 
+    case os_openbsd:
     case os_netbsd:
         mount_args[last++] = "mount";
         mount_args[last++] = "-ttmpfs";
@@ -197,7 +202,8 @@ static bool
 lchmod_fails(void)
 {
     ATF_REQUIRE(mkdir("test", 0755) != -1);
-    return lchmod("test", 0700) == -1 && chmod("test", 0700) != -1;
+    return fchmodat(AT_FDCWD, "test", 0700, AT_SYMLINK_NOFOLLOW) != -1 &&
+	    chmod("test", 0700) != -1;
 }
 
 
