* 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.
umovestr
umovestr2
unix-pair-send-recv
+xattr
*.log
*.log.*
*.o
uio \
umovestr \
umovestr2 \
- unix-pair-send-recv
+ unix-pair-send-recv \
+ xattr
filter_unavailable_LDFLAGS = -pthread
mmap64_CFLAGS = $(AM_CFLAGS) -D_FILE_OFFSET_BITS=64
uid16.test \
uid32.test \
uio.test \
+ xattr.test \
count.test \
detach-sleeping.test \
detach-stopped.test \
umovestr.expected \
unix-yy-accept.awk \
unix-yy-connect.awk \
+ xattr.expected \
$(TESTS)
CLEANFILES = $(TESTS:=.tmp)
--- /dev/null
+#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
--- /dev/null
+removexattr\("\.", "strace\.test"\) += -1 .*
+setxattr\("\.", "strace\.test", "foo\\0bar", 8, XATTR_CREATE\) += -1 .*
--- /dev/null
+#!/bin/sh
+
+# Check *xattr syscalls decoding.
+
+. "${srcdir=.}/init.sh"
+
+run_prog
+run_strace -e removexattr,setxattr $args
+match_grep
+
+exit 0