Skip to contentSkip to conversation

syscalls/setxattr02: new testcase to test setxattr(2)

PATCH In review Eryu Guan 2 participants 3 messages Jan 6, 2012

lore
Share & tools
lore

Eryu Guan

author
#0 lore raw

PATCH v3 1/2 syscalls/setxattr02: new testcase to test setxattr(2)

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

---
v2 -> v3:
Use Macro instead of char array for test file names
v1 -> v2:
Remove unnecessary variables

 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
runtest/syscalls +1 -0
index 48caaae..8e36ec0 100644
@@ -1021,6 +1021,7 @@ setuid04 setuid04
 setuid04_16 setuid04_16
 
 setxattr01 setxattr01
+setxattr02 setxattr02
 
 shmat01 shmat01
 shmat02 shmat02
testcases/kernel/syscalls/setxattr/setxattr02.c new file +235 -0

235 lines not on this page · raw message

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

author
#1 lore raw

PATCH v3 2/2 syscalls/getxattr02: new testcase to test getxattr(2)

In the user.* namespace, only regular files and directories can have extended attributes. Otherwise getxattr(2) will return -1 and set errno to ENODATA.

There are 4 test cases:
1. Get attribute from a FIFO, setxattr(2) should return -1 and set errno to ENODATA
2. Get attribute from a char special file, setxattr(2) should return -1 and set errno to ENODATA
3. Get attribute from a block special file, setxattr(2) should return -1 and set errno to ENODATA
4. Get attribute from a UNIX domain socket, setxattr(2) should return -1 and set errno to ENODATA

---
v2 -> v3:
Use Macro instead of char array for test file names
v1 -> v2:
Remove unnecessary variables

 runtest/syscalls                                |    1 +
 testcases/kernel/syscalls/getxattr/getxattr02.c |  152 +++++++++++++++++++++++
 2 files changed, 153 insertions(+), 0 deletions(-)
 create mode 100644 testcases/kernel/syscalls/getxattr/getxattr02.c
runtest/syscalls +1 -0
index 8e36ec0..1442390 100644
@@ -421,6 +421,7 @@ getuid03 getuid03
 getuid03_16 getuid03_16
 
 getxattr01 getxattr01
+getxattr02 getxattr02
 
 #Needs tty device.
 #ioctl01 ioctl01 -D /dev/tty0
testcases/kernel/syscalls/getxattr/getxattr02.c new file +152 -0

152 lines not on this page · raw message

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw

Re: [LTP] [PATCH v3 2/2] syscalls/getxattr02: new testcase to test getxattr(2)

Hi!

Both commited, thanks.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list