ASSERT_EQ(ceph_fchown(cmount, fd, 65534, 65534), 0);
ASSERT_EQ(0, ceph_conf_set(cmount, "client_permissions", "1"));
+ // "nobody" will be ignored on Windows
+ #ifndef _WIN32
ASSERT_EQ(ceph_open(cmount, test_file, O_RDWR, 0), -EACCES);
+ #endif
ASSERT_EQ(0, ceph_conf_set(cmount, "client_permissions", "0"));
size_t acl_buf_size = acl_ea_size(5);
#include <stdlib.h>
#include <semaphore.h>
#include <time.h>
+
+#ifndef _WIN32
#include <sys/mman.h>
+#endif
#ifdef __linux__
#include <limits.h>
exit(EXIT_SUCCESS);
}
+#ifndef _WIN32
// Disabled because of fork() issues (http://tracker.ceph.com/issues/16556)
TEST(LibCephFS, DISABLED_InterProcessLocking) {
PROCESS_SLOW_MS();
ASSERT_EQ(0, ceph_unlink(cmount, c_file));
CLEANUP_CEPH();
}
+#endif
+#ifndef _WIN32
// Disabled because of fork() issues (http://tracker.ceph.com/issues/16556)
TEST(LibCephFS, DISABLED_ThreesomeInterProcessLocking) {
PROCESS_SLOW_MS();
ASSERT_EQ(0, ceph_unlink(cmount, c_file));
CLEANUP_CEPH();
}
+#endif
#include <stdlib.h>
#include <semaphore.h>
#include <time.h>
+
+#ifndef _WIN32
#include <sys/mman.h>
+#endif
#ifdef __linux__
#include <limits.h>
}
// Disabled because of fork() issues (http://tracker.ceph.com/issues/16556)
+#ifndef _WIN32
TEST(LibCephFS, DISABLED_InterProcessRecordLocking) {
PROCESS_SLOW_MS();
// Process synchronization
ASSERT_EQ(0, ceph_ll_unlink(cmount, root, c_file, perms));
CLEANUP_CEPH();
}
+#endif
+#ifndef _WIN32
// Disabled because of fork() issues (http://tracker.ceph.com/issues/16556)
TEST(LibCephFS, DISABLED_ThreesomeInterProcessRecordLocking) {
PROCESS_SLOW_MS();
ASSERT_EQ(0, ceph_ll_unlink(cmount, root, c_file, perms));
CLEANUP_CEPH();
}
+#endif
#include <dirent.h>
#include <sys/uio.h>
#include <sys/time.h>
+
+#ifndef _WIN32
#include <sys/resource.h>
+#endif
#include "common/Clock.h"
sprintf(xattrv, "testxattr%c", i);
ASSERT_TRUE(!strncmp(xattrv, gxattrv, alen));
- n = index(p, '\0');
+ n = strchr(p, '\0');
n++;
len -= (n - p);
p = n;
ceph_close(cmount, fd);
+ // "nobody" will be ignored on Windows
+ #ifndef _WIN32
fd = ceph_open(cmount, test_file, O_RDWR, 0);
ASSERT_EQ(fd, -EACCES);
+ #endif
ceph_shutdown(cmount);
}
ceph_shutdown(cmount);
}
+// no rlimits on Windows
+#ifndef _WIN32
static void shutdown_racer_func()
{
const int niter = 32;
*/
// ASSERT_EQ(setrlimit(RLIMIT_NOFILE, &rold), 0);
}
+#endif
static void get_current_time_utimbuf(struct utimbuf *utb)
{
ASSERT_LT(0, alen);
ASSERT_LT(alen, xbuflen);
gxattrv[alen] = '\0';
- char *s = strchrnul(gxattrv, '.');
+ char *s = strchr(gxattrv, '.');
+ ASSERT_NE(0, s);
ASSERT_LT(s, gxattrv + alen);
ASSERT_EQ('.', *s);
*s = '\0';
ASSERT_LT(0, alen);
ASSERT_LT(alen, xbuflen);
gxattrv2[alen] = '\0';
- s = strchrnul(gxattrv2, '.');
+ s = strchr(gxattrv2, '.');
+ ASSERT_NE(0, s);
ASSERT_LT(s, gxattrv2 + alen);
ASSERT_EQ('.', *s);
*s = '\0';
ASSERT_EQ(ceph_conf_set(cmount, "client_permissions", "1"), 0);
ceph_close(cmount, fd);
+ // "nobody" will be ignored on Windows
+ #ifndef _WIN32
fd = ceph_open(cmount, file_path, O_RDWR, 0);
ASSERT_EQ(fd, -EACCES);
+ #endif
ASSERT_EQ(ceph_conf_set(cmount, "client_permissions", "0"), 0);
ASSERT_EQ(0, ceph_unlink(cmount, file_path));
ASSERT_EQ(ceph_chownat(cmount, CEPHFS_AT_FDCWD, rel_file_path, 65534, 65534, 0), 0);
ASSERT_EQ(ceph_conf_set(cmount, "client_permissions", "1"), 0);
+ // "nobody" will be ignored on Windows
+ #ifndef _WIN32
fd = ceph_open(cmount, file_path, O_RDWR, 0);
ASSERT_EQ(fd, -EACCES);
+ #endif
ASSERT_EQ(ceph_conf_set(cmount, "client_permissions", "0"), 0);
ASSERT_EQ(0, ceph_unlink(cmount, file_path));