From: Eryu G. <eg...@re...> - 2012-01-05 14:58:51
|
In the user.* namespace, only regular files and directories can have extended attributes. Otherwise setxattr(2) should return -1 and set errno to EPERM. There are 7 test cases: 1. Set attribute to a regular file, setxattr(2) should succeed 2. Set attribute to a directory, setxattr(2) should succeed 3. Set attribute to a symlink which points to the regular file, setxattr(2) should return -1 and set errno to EEXIST 4. Set attribute to a FIFO, setxattr(2) should return -1 and set errno to EPERM 5. Set attribute to a char special file, setxattr(2) should return -1 and set errno to EPERM 6. Set attribute to a block special file, setxattr(2) should return -1 and set errno to EPERM 7. Set attribute to a UNIX domain socket, setxattr(2) should return -1 and set errno to EPERM Signed-off-by: Eryu Guan <eg...@re...> --- runtest/syscalls | 1 + testcases/kernel/syscalls/setxattr/setxattr02.c | 235 +++++++++++++++++++++++ 2 files changed, 236 insertions(+), 0 deletions(-) create mode 100644 testcases/kernel/syscalls/setxattr/setxattr02.c |