FreeBSD Bugzilla – Attachment 161182 Details for
Bug 203201
on zfs extattr behaviour broken after unlink
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
test case
xattr.c (text/plain), 895 bytes, created by
justin
on 2015-09-19 09:07:30 UTC
(
hide
)
Description:
test case
Filename:
MIME Type:
Creator:
justin
Created:
2015-09-19 09:07:30 UTC
Size:
895 bytes
patch
obsolete
>#include <fcntl.h> >#include <stdio.h> >#include <unistd.h> >#include <errno.h> >#include <sys/types.h> >#include <sys/extattr.h> > >int main() { > int fd; > ssize_t n; > > unlink("testfile"); > fd = open("testfile", O_CREAT | O_TRUNC | O_WRONLY, 0600); > if (fd == -1) { > perror("open"); > return 1; > } > if (unlink("testfile") == -1) { > perror("unlink"); > return 1; > } > n = extattr_get_fd(fd, EXTATTR_NAMESPACE_USER, "myattr", NULL, 0); > if (n != -1) { > fprintf(stderr, "expect to get -1 as no attr set\n"); > return 1; > } > if (errno == EOPNOTSUPP) { > fprintf(stderr, "extended attributes not supported, this test will not work\n"); > return 0; > } > if (errno == ENOENT) { > fprintf(stderr, "INCORRECT! the file does exist\n"); > return 1; > } > if (errno != ENOATTR) { > fprintf(stderr, "INCORRECT! incorrect error\n"); > return 1; > } > > fprintf(stderr, "CORRECT! there is no attribute\n"); > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 203201
: 161182 |
161183
|
161184