Patches for POSIX test cases
Hi All,
These two patches are for POSIX test suite, and could anyone give some comments? Thanks.
And is there a irc channel for ltp/posix, I need some help about POSIX test on linux.
Thanks and Regards,
Kai
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization This white paper is intended to serve as a reference, checklist and point of discussion for anyone considering optimizing the pricing and packaging model of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 1/2 pthread_mutex_lock/3-1: make sure install signal hanldler first
Test case failed for linux in some platform. Make parent thread sleep for a while to make sure that signal handlers are installed before send signal USR1 and USR2.
--- .../interfaces/pthread_mutex_lock/3-1.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/3-1.c +3 -1
@@ -307,6 +307,8 @@ int main (int argc, char * argv[])if ((ret =pthread_create (&th_work,NULL , threaded,NULL ))) {UNRESOLVED (ret,"Worker thread creation failed" ); } +sleep (1 ); + arg1.thr = &th_work; arg2.thr = &th_work; arg1.sig =SIGUSR1 ;
@@ -359,4 +361,4 @@ int main (int argc, char * argv[])#endif #endif PASSED ; -} +}
Signature · 13 lines
1.7.5.4 ------------------------------------------------------------------------------ Cloud Services Checklist: Pricing and Packaging Optimization This white paper is intended to serve as a reference, checklist and point of discussion for anyone considering optimizing the pricing and packaging model of a cloud services business. Read Now! http://www.accelacomm.com/jaw/sfnl/114/51491232/ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [PATCH 1/2] pthread_mutex_lock/3-1: make sure install signal hanldler first
Quoted 30 lines · Kang Kai
Test case failed for linux in some platform. Make parent thread sleep for a while to make sure that signal handlers are installed before send signal USR1 and USR2.
Signed-off-by Kang Kai <[email protected]>---
.../interfaces/pthread_mutex_lock/3-1.c | 4 +++-1 files changed, 3 insertions(+), 1 deletions(-)testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/3-1.c +3
-2@@ -307,6 +307,8 @@ int main (int argc, char * argv[]) if ((ret = pthread_create(&th_work, NULL, threaded, NULL))) { UNRESOLVED(ret, "Worker thread creation failed"); } + sleep(1); + arg1.thr = &th_work; arg2.thr = &th_work; arg1.sig = SIGUSR1;@@ -359,4 +361,4 @@ int main (int argc, char * argv[]) #endif #endif PASSED; -} +} --
Quoted 1 line
1.7.5.4
It's better than status quo, but it's still kind of race prone (highly unlikely, but you never know). It seems like a pthread_mutex would make more sense in this case.
Thanks,
-Garrett
------------------------------------------------------------------------------
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 2/2 pthread_rwlock_unlock/4-2: remove local var 'rc'
In reply to Kang KaiLocal var 'rc' in function main hides the global one. In child thread it sets global var 'rc' with funtion return value. But in function main, test var 'rc' always succeeds because it tests local var 'rc'.
--- .../interfaces/pthread_rwlock_unlock/4-2.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-2.c +1 -2
@@ -54,7 +54,6 @@ static void* fn_unlk(void *arg)int main () {int cnt =0 ; -int rc =0 ;pthread_t un_thread;
@@ -125,4 +124,4 @@ int main()printf ("Test PASSED: Note*: Returned 0 instead of EPERM, but standard specified _may_ fail.\n" );return PTS_PASS ; -} +}
Signature · 13 lines
1.7.5.4 ------------------------------------------------------------------------------ Cloud Services Checklist: Pricing and Packaging Optimization This white paper is intended to serve as a reference, checklist and point of discussion for anyone considering optimizing the pricing and packaging model of a cloud services business. Read Now! http://www.accelacomm.com/jaw/sfnl/114/51491232/ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [PATCH 2/2] pthread_rwlock_unlock/4-2: remove local var 'rc'
Quoted 4 lines · Kang Kai
Local var 'rc' in function main hides the global one. In child thread it sets global var 'rc' with funtion return value. But in function main, test var 'rc' always succeeds because it tests local var 'rc'.
Good catch.
Quoted 18 lines
Signed-off-by Kang Kai <[email protected]>--- .../interfaces/pthread_rwlock_unlock/4-2.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-2.c +0
-1@@ -54,7 +54,6 @@ static void* fn_unlk(void *arg)int main () {int cnt =0 ; -int rc =0 ;pthread_t un_thread;
testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-2.c int main() · line 127
Quoted 6 lines
testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-2.c +1
-1@@ -125,4 +124,4 @@ int main()printf ("Test PASSED: Note*: Returned 0 instead of EPERM, but standard specified _may_ fail.\n" );return PTS_PASS ; -} +}
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization This white paper is intended to serve as a reference, checklist and point of discussion for anyone considering optimizing the pricing and packaging model of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [PATCH 2/2] pthread_rwlock_unlock/4-2: remove local var 'rc'
Quoted 29 lines · Wanlong Gao
Quoted 4 lines · Kang Kai
Local var 'rc' in function main hides the global one. In child thread it sets global var 'rc' with funtion return value. But in function main, test var 'rc' always succeeds because it tests local var 'rc'.
Good catch.
Reviewed-by Wanlong Gao <[email protected]>Quoted 17 lines
Signed-off-by Kang Kai <[email protected]>---
.../interfaces/pthread_rwlock_unlock/4-2.c | 3 +--1 files changed, 1 insertions(+), 2 deletions(-)testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-2.c +0
-1@@ -54,7 +54,6 @@ static void* fn_unlk(void *arg) int main() { int cnt = 0; - int rc = 0; pthread_t un_thread;
Quoted 7 lines
testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-2.c int main() · line 127
Quoted 7 lines
testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-2.c +1
-1@@ -125,4 +124,4 @@ int main() printf("Test PASSED: Note*: Returned 0 instead of EPERM, but standard specified _may_ fail.\n"); return PTS_PASS; -} +}
Will be committed soon (kind of interesting why -Wshadow didn't identify this issue...).
-Garrett
------------------------------------------------------------------------------
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [PATCH 2/2] pthread_rwlock_unlock/4-2: remove local var 'rc'
Quoted 32 lines · Garrett Cooper
Quoted 31 lines · Wanlong Gao
Quoted 4 lines · Kang Kai
Local var 'rc' in function main hides the global one. In child thread it sets global var 'rc' with funtion return value. But in function main, test var 'rc' always succeeds because it tests local var 'rc'.
Good catch.
Reviewed-by Wanlong Gao <[email protected]>Quoted 19 lines
Signed-off-by Kang Kai <[email protected]>--- .../interfaces/pthread_rwlock_unlock/4-2.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-2.c +0
-1@@ -54,7 +54,6 @@ static void* fn_unlk(void *arg)int main () {int cnt =0 ; -int rc =0 ;pthread_t un_thread;@@ -125,4 +124,4 @@ int main()
Quoted 8 lines
Quoted 5 lines
testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-2.c int main() · line 127
Quoted 5 lines
testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-2.c +1
-1printf ("Test PASSED: Note*: Returned 0 instead of EPERM, but standard specified _may_ fail.\n" );return PTS_PASS ; -} +}Will be committed soon (kind of interesting why -Wshadow didn't identify this issue...).
Yeah, odd, I didn't see warning by -Wshadow, either.
Quoted 2 lines
-Garrett
------------------------------------------------------------------------------
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 5 lines · Kang Kai
Hi All,
These two patches are for POSIX test suite, and could anyone give some comments? Thanks.
And is there a irc channel for ltp/posix, I need some help about POSIX test on linux.
It seems there isn't a irc. You can just send email to list.
Quoted 7 lines
Thanks and Regards,
Kai
Quoted 11 lines
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization This white paper is intended to serve as a reference, checklist and point of discussion for anyone considering optimizing the pricing and packaging model of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization This white paper is intended to serve as a reference, checklist and point of discussion for anyone considering optimizing the pricing and packaging model of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 9 lines · Wanlong Gao
Quoted 5 lines · Kang Kai
Hi All,
These two patches are for POSIX test suite, and could anyone give some comments? Thanks.
And is there a irc channel for ltp/posix, I need some help about POSIX test on linux.
It seems there isn't a irc. You can just send email to list.
OK, thanks.
Quoted 7 lines
Quoted 7 lines
Thanks and Regards,
Kai
Quoted 12 lines
Quoted 11 lines
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization This white paper is intended to serve as a reference, checklist and point of discussion for anyone considering optimizing the pricing and packaging model of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization This white paper is intended to serve as a reference, checklist and point of discussion for anyone considering optimizing the pricing and packaging model of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 10 lines · Wanlong Gao
Quoted 5 lines · Kang Kai
Hi All,
These two patches are for POSIX test suite, and could anyone give some comments? Thanks.
And is there a irc channel for ltp/posix, I need some help about POSIX test on linux.
It seems there isn't a irc. You can just send email to list.
There was an IRC chan for LTP, but I don't know how much/often people stick around there. Subrata was there for a while along with Mike F. and your's truly. I don't hang around IRC all that much -- esp. not EFNET.
-Garrett
------------------------------------------------------------------------------
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
Quoted 3 lines
These two patches are for POSIX test suite, and could anyone give some comments? Thanks.
And is there a irc channel for ltp/posix, I need some help about POSIX test on linux.
There is an LTP channel on freenode (And I'm usually there under nick metan at least during my working hours).
And just now I've been overhelmed by other tasks, so stay tuned I'll look at the patches soon enough.
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Cloud Services Checklist: Pricing and Packaging Optimization This white paper is intended to serve as a reference, checklist and point of discussion for anyone considering optimizing the pricing and packaging model of a cloud services business. Read Now! http://www.accelacomm.com/jaw/sfnl/114/51491232/ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list