mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Update ZTS to work on FreeBSD
Update the common ZTS scripts and individual test cases as needed in order to allow them to be run on FreeBSD. The high level goal is to provide compatibility wrappers whenever possible to minimize changes to individual test cases. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Signed-off-by: Ryan Moeller <ryan@ixsystems.com> Closes #9692
This commit is contained in:
committed by
Brian Behlendorf
parent
118fc3ef07
commit
7839c4b5e1
@@ -30,7 +30,9 @@
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#ifdef __linux__
|
||||
#include <sys/xattr.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@@ -176,11 +178,13 @@ crtfile(char *pname)
|
||||
exit(errno);
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
if (fsetxattr(fd, "user.xattr", pbuf, 1024, 0) < 0) {
|
||||
(void) fprintf(stderr, "fsetxattr(fd, \"xattr\", pbuf, "
|
||||
"1024, 0) failed.\n[%d]: %s.\n", errno, strerror(errno));
|
||||
exit(errno);
|
||||
}
|
||||
#endif
|
||||
|
||||
(void) close(fd);
|
||||
free(pbuf);
|
||||
|
||||
Reference in New Issue
Block a user