Dmitry V. Levin
b60b2a5aa3
* tests/xattr.c: New file. * tests/xattr.expected: Likewise. * tests/xattr.test: New test. * tests/Makefile.am (check_PROGRAMS): Add xattr. (TESTS): Add xattr.test. (EXTRA_DIST): Add xattr.expected. * tests/.gitignore: Add xattr.
28 lines
336 B
C
28 lines
336 B
C
#ifdef HAVE_CONFIG_H
|
|
# include "config.h"
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_XATTR_H
|
|
# include <sys/xattr.h>
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
#define NAME "strace.test"
|
|
#define VALUE "foo\0bar"
|
|
if (!removexattr(".", NAME) ||
|
|
!setxattr(".", NAME, VALUE, sizeof(VALUE), XATTR_CREATE))
|
|
return 77;
|
|
return 0;
|
|
}
|
|
|
|
#else
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
return 77;
|
|
}
|
|
|
|
#endif
|