syscalls/open11: new open(2) test case
PATCH 1/1 syscalls/open11: new open(2) test case
In addition to existing open(2) tests, add more basic tests and make sure open(2) works and handles error conditions correctly.
There are 29 test cases:
1. Open regular file O_RDONLY
2. Open regular file O_WRONLY
3. Open regular file O_RDWR
4. Open regular file O_RDWR | O_SYNC
5. Open regular file O_RDWR | O_TRUNC
6. Open dir O_RDONLY
7. Open dir O_RDWR, expect EISDIR
8. Open regular file O_DIRECTORY, expect ENOTDIR
9. Open hard link file O_RDONLY
10. Open hard link file O_WRONLY
11. Open hard link file O_RDWR
12. Open sym link file O_RDONLY
13. Open sym link file O_WRONLY
14. Open sym link file O_RDWR
15. Open sym link dir O_RDONLY
16. Open sym link dir O_WRONLY, expect EISDIR
17. Open sym link dir O_RDWR, expect EISDIR
18. Open device special file O_RDONLY
19. Open device special file O_WRONLY
20. Open device special file O_RDWR
21. Open device special file O_RDWR
22. Open non-existing regular file in existing dir
23. Open link file O_RDONLY | O_CREAT
24. Open symlink file O_RDONLY | O_CREAT
25. Open regular file O_RDONLY | O_CREAT
26. Open symlink dir O_RDONLY | O_CREAT, expect EISDIR
27. Open dir O_RDONLY | O_CREAT, expect EISDIR
28. Open regular file O_RDONLY | O_TRUNC, behaviour is undefined but should not oops or hang
29. Open regular file(non-empty) O_RDONLY | O_TRUNC, behaviour is undefined but should not oops or hang
--- runtest/ltplite | 1 + runtest/stress.part3 | 1 + runtest/syscalls | 1 + testcases/kernel/syscalls/open/open11.c | 432 ++++++++++++++++++++++++++++++++ 4 files changed, 435 insertions(+) create mode 100644 testcases/kernel/syscalls/open/open11.c
runtest/ltplite +1 -0
@@ -539,6 +539,7 @@ open07 open07 open08 open08 open09 open09 open10 open10 +open11 open11 mincore01 mincore01 #mincore02 mincore02 currently hangs and does not exit correctly
runtest/stress.part3 +1 -0
@@ -461,6 +461,7 @@ open07 open07 open08 open08 open09 open09 open10 open10 +open11 open11 pathconf01 pathconf01
runtest/syscalls +1 -0
@@ -680,6 +680,7 @@ open07 open07 open08 open08 open09 open09 open10 open10 +open11 open11 #openat test cases openat01 openat01
testcases/kernel/syscalls/open/open11.c new file +432 -0
432 lines not on this page · raw message
Signature · 12 lines
1.8.0.2 ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_jan _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 11 lines · Eryu Guan
testcases/kernel/syscalls/open/open11.c new file +11
-0+ {/* open device special file O_WRONLY */ + .desc = "Open device special file O_WRONLY", + .path = T_DEV, + .flags = O_WRONLY, + .mode = 0644, + .err = 0, + }, + {/* open device special file O_RDWR */ + .desc = "Open device special file O_RDWR", + .path = T_DEV, + .flags = O_RDWR,
testcases/kernel/syscalls/open/open11.c line 264
Quoted 10 lines
testcases/kernel/syscalls/open/open11.c new file +10
-0+ .mode = 0644, + .err = 0, + }, + {/* open device special file O_RDWR */ + .desc = "Open device special file O_RDWR", + .path = T_DEV, + .flags = O_RDWR, + .mode = 0644, + .err = 0, + },
Why should this test twice?
Thanks,
Wanlong Gao
testcases/kernel/syscalls/open/open11.c line 274
Quoted 10 lines
testcases/kernel/syscalls/open/open11.c new file +10
-0+/* +* Test open(2) non-existing file +*/ + {/* open non-existing regular file in existing dir */ + .desc = "Open non-existing regular file in existing dir", + .path = T_DIR"/"T_NEW_REG, + .flags = O_RDWR | O_CREAT, + .mode = 0644, + .err = 0, + },
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH v2 1/1 syscalls/open11: new open(2) test case
In addition to existing open(2) tests, add more basic tests and make sure open(2) works and handles error conditions correctly.
There are 28 test cases:
1. Open regular file O_RDONLY
2. Open regular file O_WRONLY
3. Open regular file O_RDWR
4. Open regular file O_RDWR | O_SYNC
5. Open regular file O_RDWR | O_TRUNC
6. Open dir O_RDONLY
7. Open dir O_RDWR, expect EISDIR
8. Open regular file O_DIRECTORY, expect ENOTDIR
9. Open hard link file O_RDONLY
10. Open hard link file O_WRONLY
11. Open hard link file O_RDWR
12. Open sym link file O_RDONLY
13. Open sym link file O_WRONLY
14. Open sym link file O_RDWR
15. Open sym link dir O_RDONLY
16. Open sym link dir O_WRONLY, expect EISDIR
17. Open sym link dir O_RDWR, expect EISDIR
18. Open device special file O_RDONLY
19. Open device special file O_WRONLY
20. Open device special file O_RDWR
21. Open non-existing regular file in existing dir
22. Open link file O_RDONLY | O_CREAT
23. Open symlink file O_RDONLY | O_CREAT
24. Open regular file O_RDONLY | O_CREAT
25. Open symlink dir O_RDONLY | O_CREAT, expect EISDIR
26. Open dir O_RDONLY | O_CREAT, expect EISDIR
27. Open regular file O_RDONLY | O_TRUNC, behaviour is undefined but should not oops or hang
28. Open regular file(non-empty) O_RDONLY | O_TRUNC, behaviour is undefined but should not oops or hang
---
v2:
Remove duplicated open device special test
runtest/ltplite | 1 + runtest/stress.part3 | 1 + runtest/syscalls | 1 + testcases/kernel/syscalls/open/open11.c | 424 ++++++++++++++++++++++++++++++++ 4 files changed, 427 insertions(+) create mode 100644 testcases/kernel/syscalls/open/open11.c
runtest/ltplite +1 -0
@@ -539,6 +539,7 @@ open07 open07 open08 open08 open09 open09 open10 open10 +open11 open11 mincore01 mincore01 #mincore02 mincore02 currently hangs and does not exit correctly
runtest/stress.part3 +1 -0
@@ -461,6 +461,7 @@ open07 open07 open08 open08 open09 open09 open10 open10 +open11 open11 pathconf01 pathconf01
runtest/syscalls +1 -0
@@ -680,6 +680,7 @@ open07 open07 open08 open08 open09 open09 open10 open10 +open11 open11 #openat test cases openat01 openat01
testcases/kernel/syscalls/open/open11.c new file +424 -0
424 lines not on this page · raw message
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 36 lines · Eryu Guan
In addition to existing open(2) tests, add more basic tests and make sure open(2) works and handles error conditions correctly.
There are 28 test cases:
1. Open regular fileO_RDONLY
2. Open regular fileO_WRONLY
3. Open regular fileO_RDWR
4. Open regular fileO_RDWR|O_SYNC
5. Open regular fileO_RDWR|O_TRUNC
6. Open dirO_RDONLY
7. Open dirO_RDWR, expect EISDIR
8. Open regular fileO_DIRECTORY, expect ENOTDIR
9. Open hard link fileO_RDONLY
10. Open hard link fileO_WRONLY
11. Open hard link fileO_RDWR
12. Open sym link fileO_RDONLY
13. Open sym link fileO_WRONLY
14. Open sym link fileO_RDWR
15. Open sym link dirO_RDONLY
16. Open sym link dirO_WRONLY, expect EISDIR
17. Open sym link dirO_RDWR, expect EISDIR
18. Open device special fileO_RDONLY
19. Open device special fileO_WRONLY
20. Open device special fileO_RDWR
21. Open non-existing regular file in existing dir
22. Open link fileO_RDONLY|O_CREAT
23. Open symlink fileO_RDONLY|O_CREAT
24. Open regular fileO_RDONLY|O_CREAT
25. Open symlink dirO_RDONLY|O_CREAT, expect EISDIR
26. Open dirO_RDONLY|O_CREAT, expect EISDIR
27. Open regular fileO_RDONLY|O_TRUNC, behaviour is undefined but should not oops or hang
28. Open regular file(non-empty)O_RDONLY|O_TRUNC, behaviour is undefined but should not oops or hang
Quoted 1 line
Signed-off-by Eryu Guan <[email protected]>
Thank you.
Quoted 21 lines
---
v2:
Remove duplicated open device special testruntest/ltplite | 1 + runtest/stress.part3 | 1 + runtest/syscalls | 1 + testcases/kernel/syscalls/open/open11.c | 424 ++++++++++++++++++++++++++++++++ 4 files changed, 427 insertions(+) create mode 100644 testcases/kernel/syscalls/open/open11.c------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
Quoted 5 lines
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 41 lines · Eryu Guan
In addition to existing open(2) tests, add more basic tests and make sure open(2) works and handles error conditions correctly.
There are 28 test cases:
1. Open regular fileO_RDONLY
2. Open regular fileO_WRONLY
3. Open regular fileO_RDWR
4. Open regular fileO_RDWR|O_SYNC
5. Open regular fileO_RDWR|O_TRUNC
6. Open dirO_RDONLY
7. Open dirO_RDWR, expect EISDIR
8. Open regular fileO_DIRECTORY, expect ENOTDIR
9. Open hard link fileO_RDONLY
10. Open hard link fileO_WRONLY
11. Open hard link fileO_RDWR
12. Open sym link fileO_RDONLY
13. Open sym link fileO_WRONLY
14. Open sym link fileO_RDWR
15. Open sym link dirO_RDONLY
16. Open sym link dirO_WRONLY, expect EISDIR
17. Open sym link dirO_RDWR, expect EISDIR
18. Open device special fileO_RDONLY
19. Open device special fileO_WRONLY
20. Open device special fileO_RDWR
21. Open non-existing regular file in existing dir
22. Open link fileO_RDONLY|O_CREAT
23. Open symlink fileO_RDONLY|O_CREAT
24. Open regular fileO_RDONLY|O_CREAT
25. Open symlink dirO_RDONLY|O_CREAT, expect EISDIR
26. Open dirO_RDONLY|O_CREAT, expect EISDIR
27. Open regular fileO_RDONLY|O_TRUNC, behaviour is undefined but should not oops or hang
28. Open regular file(non-empty)O_RDONLY|O_TRUNC, behaviour is undefined but should not oops or hangSigned-off-by Eryu Guan <[email protected]>---
v2:
Remove duplicated open device special test
Quoted 6 lines
runtest/ltplite | 1 + runtest/stress.part3 | 1 + runtest/syscalls | 1 + testcases/kernel/syscalls/open/open11.c | 424 ++++++++++++++++++++++++++++++++ 4 files changed, 427 insertions(+)create mode 100644
testcases/kernel/syscalls/open/open11.c
Looks good to me.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Wanlong Gao
AppliedQuoted 35 lines · Eryu Guan
In addition to existing open(2) tests, add more basic tests and make sure open(2) works and handles error conditions correctly.
There are 28 test cases:
1. Open regular fileO_RDONLY
2. Open regular fileO_WRONLY
3. Open regular fileO_RDWR
4. Open regular fileO_RDWR|O_SYNC
5. Open regular fileO_RDWR|O_TRUNC
6. Open dirO_RDONLY
7. Open dirO_RDWR, expect EISDIR
8. Open regular fileO_DIRECTORY, expect ENOTDIR
9. Open hard link fileO_RDONLY
10. Open hard link fileO_WRONLY
11. Open hard link fileO_RDWR
12. Open sym link fileO_RDONLY
13. Open sym link fileO_WRONLY
14. Open sym link fileO_RDWR
15. Open sym link dirO_RDONLY
16. Open sym link dirO_WRONLY, expect EISDIR
17. Open sym link dirO_RDWR, expect EISDIR
18. Open device special fileO_RDONLY
19. Open device special fileO_WRONLY
20. Open device special fileO_RDWR
21. Open non-existing regular file in existing dir
22. Open link fileO_RDONLY|O_CREAT
23. Open symlink fileO_RDONLY|O_CREAT
24. Open regular fileO_RDONLY|O_CREAT
25. Open symlink dirO_RDONLY|O_CREAT, expect EISDIR
26. Open dirO_RDONLY|O_CREAT, expect EISDIR
27. Open regular fileO_RDONLY|O_TRUNC, behaviour is undefined but should not oops or hang
28. Open regular file(non-empty)O_RDONLY|O_TRUNC, behaviour is undefined but should not oops or hang
Quoted 1 line
Signed-off-by Eryu Guan <[email protected]>
Applied, thank you.
Wanlong Gao
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list