You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/08/04 05:43:56 UTC

[nuttx-apps] branch master updated: ltp: follow linux on pthread_rwlock_unlock

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 89a1255dc ltp: follow linux on pthread_rwlock_unlock
89a1255dc is described below

commit 89a1255dc20a494aaa2df539b80c3ee23a77832c
Author: yanghuatao <ya...@xiaomi.com>
AuthorDate: Fri Aug 4 11:09:00 2023 +0800

    ltp: follow linux on pthread_rwlock_unlock
    
    Signed-off-by: Shoukui Zhang <zh...@xiaomi.com>
---
 testing/ltp/0001-Fix-static-struct-warning.patch   | 39 ----------------------
 .../0001-pthread_rwlock_unlock-follow-linux.patch  | 26 +++++++++++++++
 2 files changed, 26 insertions(+), 39 deletions(-)

diff --git a/testing/ltp/0001-Fix-static-struct-warning.patch b/testing/ltp/0001-Fix-static-struct-warning.patch
deleted file mode 100644
index db3e5913b..000000000
--- a/testing/ltp/0001-Fix-static-struct-warning.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From bfb99256e5e73e8d41f8d40bdeea70b2abb5de06 Mon Sep 17 00:00:00 2001
-From: Brennan Ashton <ba...@brennanashton.com>
-Date: Sat, 10 Apr 2021 15:15:29 -0700
-Subject: [PATCH 1/2] Fix static struct warning
-
----
- .../open_posix_testsuite/conformance/interfaces/mmap/5-1.c      | 2 +-
- testcases/open_posix_testsuite/stress/threads/sem_open/s-c1.c   | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/5-1.c
-index bcb330da6..ad7b6bb2d 100644
---- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/5-1.c
-+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/5-1.c
-@@ -34,7 +34,7 @@
- #include "posixtest.h"
- #include "tempfile.h"
- 
--static struct testcase {
-+struct testcase {
- 	int prot;
- 	int flags;
- };
-diff --git a/testcases/open_posix_testsuite/stress/threads/sem_open/s-c1.c b/testcases/open_posix_testsuite/stress/threads/sem_open/s-c1.c
-index 14ad4ea2c..2133b721a 100644
---- a/testcases/open_posix_testsuite/stress/threads/sem_open/s-c1.c
-+++ b/testcases/open_posix_testsuite/stress/threads/sem_open/s-c1.c
-@@ -399,7 +399,7 @@ int main(int argc, char *argv[])
-  * The function returns 0 when r1 is the best for all cases (latency is constant) and !0 otherwise.
-  */
- 
--static struct row {
-+struct row {
- 	long X;			/* the X values -- copied from function argument */
- 	long Y_o;		/* the Y values -- copied from function argument */
- 	long Y_c;		/* the Y values -- copied from function argument */
--- 
-2.30.2
-
diff --git a/testing/ltp/0001-pthread_rwlock_unlock-follow-linux.patch b/testing/ltp/0001-pthread_rwlock_unlock-follow-linux.patch
new file mode 100644
index 000000000..05d64a089
--- /dev/null
+++ b/testing/ltp/0001-pthread_rwlock_unlock-follow-linux.patch
@@ -0,0 +1,26 @@
+From 9c6825d070abc9b414c96beff2a46b5166da456d Mon Sep 17 00:00:00 2001
+From: Shoukui Zhang <zh...@xiaomi.com>
+Date: Tue, 9 May 2023 22:37:01 +0800
+Subject: [PATCH] pthread_rwlock_unlock: follow linux
+
+Signed-off-by: Shoukui Zhang <zh...@xiaomi.com>
+---
+ .../conformance/interfaces/pthread_rwlock_unlock/4-1.c          | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-1.c b/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-1.c
+index 2db9e4cc6..5d7c2c565 100644
+--- a/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-1.c
++++ b/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-1.c
+@@ -31,7 +31,7 @@ int main(void)
+ 	static pthread_rwlock_t rwlock;
+ 	int rc;
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__NuttX__)
+ 	printf("Unlocking uninitialized rwlock is undefined on Linux\n");
+ 	return PTS_UNSUPPORTED;
+ #endif
+--
+2.25.1
+