Destroy mutex an mutex_attr object at end of test
PATCH 1/1 Destroy mutex an mutex_attr object at end of test
Destroy mutex an mutex_attr object at end of test.
--- .../interfaces/pthread_mutex_getprioceiling/3-1.c | 2 ++ .../interfaces/pthread_mutex_getprioceiling/3-2.c | 3 +++ .../interfaces/pthread_mutex_getprioceiling/3-3.c | 3 +++ 3 files changed, 8 insertions(+), 0 deletions(-)
testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-1.c +2 -0
@@ -62,6 +62,8 @@ main(void) } elseprintf ("pthread_mutex_getprioceiling passed unexpectedly\n" ); + (void )pthread_mutex_destroy (&mutex); +return (error ==EINVAL ?PTS_PASS :PTS_FAIL );#else printf ("pthread_mutex_getprioceiling not supported" );
testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-2.c +3 -0
@@ -75,6 +75,9 @@ main(void) } elseprintf ("pthread_mutex_getprioceiling passed unexpectedly\n" ); + (void )pthread_mutexattr_destroy (&mutex_attr); + (void )pthread_mutex_destroy (&mutex); +return (error ==EINVAL ?PTS_PASS :PTS_FAIL );#else printf ("pthread_mutex_getprioceiling not supported" );
testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c +3 -0
@@ -76,6 +76,9 @@ main(void) } elseprintf ("pthread_mutex_getprioceiling passed unexpectedly\n" ); + (void )pthread_mutexattr_destroy (&mutex_attr); + (void )pthread_mutex_destroy (&mutex); +return (error ==EINVAL ?PTS_PASS :PTS_UNRESOLVED );#else printf ("pthread_mutex_getprioceiling not supported" );
Signature · 14 lines
1.7.0.4 ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
Quoted 15 lines
Destroy mutex an
mutex_attrobject at end of test.Signed-off-by Bian Naimeng <[email protected]>--- .../interfaces/pthread_mutex_getprioceiling/3-1.c | 2 ++ .../interfaces/pthread_mutex_getprioceiling/3-2.c | 3 +++ .../interfaces/pthread_mutex_getprioceiling/3-3.c | 3 +++ 3 files changed, 8 insertions(+), 0 deletions(-)testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-1.c +0
-0
testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-1.c main(void) · line 66
Quoted 5 lines
testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-1.c +2
-0@@ -62,6 +62,8 @@ main(void) }else printf ("pthread_mutex_getprioceiling passed unexpectedly\n" ); + (void )pthread_mutex_destroy (&mutex); +
Please never use useless cast like this.
Quoted 8 lines
testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-1.c +0
-0return (error ==EINVAL ?PTS_PASS :PTS_FAIL );#else printf ("pthread_mutex_getprioceiling not supported" );testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-2.c +0
-0
testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-2.c main(void) · line 80
Quoted 6 lines
testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-2.c +3
-0@@ -75,6 +75,9 @@ main(void) }else printf ("pthread_mutex_getprioceiling passed unexpectedly\n" ); + (void )pthread_mutexattr_destroy (&mutex_attr); + (void )pthread_mutex_destroy (&mutex); +
And here.
Quoted 8 lines
testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-2.c +0
-0return (error ==EINVAL ?PTS_PASS :PTS_FAIL );#else printf ("pthread_mutex_getprioceiling not supported" );testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c +0
-0
testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c main(void) · line 81
Quoted 6 lines
testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c +3
-0@@ -76,6 +76,9 @@ main(void) }else printf ("pthread_mutex_getprioceiling passed unexpectedly\n" ); + (void )pthread_mutexattr_destroy (&mutex_attr); + (void )pthread_mutex_destroy (&mutex); +
And here.
Quoted 5 lines
testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c +0
-0return (error ==EINVAL ?PTS_PASS :PTS_UNRESOLVED );#else printf ("pthread_mutex_getprioceiling not supported" );Signature · 1 line
1.7.0.4
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 23 lines
Quoted 18 lines
Quoted 18 lines
Destroy mutex an
mutex_attrobject at end of test.Signed-off-by Bian Naimeng <[email protected]>---
.../interfaces/pthread_mutex_getprioceiling/3-1.c | 2 ++ .../interfaces/pthread_mutex_getprioceiling/3-2.c | 3 +++ .../interfaces/pthread_mutex_getprioceiling/3-3.c | 3 +++ 3 files changed, 8 insertions(+), 0 deletions(-)testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-1.c +0
-0@@ -62,6 +62,8 @@ main(void) } else printf("pthread_mutex_getprioceiling passed unexpectedly\n");Quoted 4 lines
testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-1.c main(void) · line 66
Quoted 2 lines
testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-1.c +2
-0+ (void) pthread_mutex_destroy(&mutex); +Please never use useless cast like this.
Quoted 9 lines
Bian was following my example. I've gotten into the habit of doing this on calls like this because later versions of glibc start whining about blind calls to libcalls / syscalls (take open, write, etc for instance) where the developer doesn't check the return code. I did this to shut up that whining (because the return code isn't important for the overall intent of this testcase), and because I wanted to be explicit about the fact that the return code is ignored for human readers.
Okay.
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list