From a0c73c2ddb8436ad67dde2e9174bbe79edf67753 Mon Sep 17 00:00:00 2001 From: yanghuatao Date: Thu, 3 Aug 2023 15:23:35 +0800 Subject: [PATCH] ltp/makefile: nuttx on github download ltp code failed fix Fix github download ltp code error: Cloning into 'ltp'... *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: unable to auto-detect email address (got 'root@33ba2a4a6fc5.(none)') Signed-off-by: yanghuatao --- ...se-ifdef-instead-of-if-for-__linux__.patch | 6 ++--- testing/ltp/Makefile | 22 ++++++++++++------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/testing/ltp/0002-Use-ifdef-instead-of-if-for-__linux__.patch b/testing/ltp/0002-Use-ifdef-instead-of-if-for-__linux__.patch index 2cc59cf6ed..47e0920320 100644 --- a/testing/ltp/0002-Use-ifdef-instead-of-if-for-__linux__.patch +++ b/testing/ltp/0002-Use-ifdef-instead-of-if-for-__linux__.patch @@ -7,10 +7,10 @@ Subject: [PATCH 2/2] Use #ifdef instead of #if for __linux__ .../conformance/interfaces/sem_timedwait/3-1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c +diff --git a/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c b/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c index fb6f2e6cb..739fe86a5 100644 ---- a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c -+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c +--- a/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c ++++ b/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c @@ -15,7 +15,7 @@ #include #include diff --git a/testing/ltp/Makefile b/testing/ltp/Makefile index 071e66c514..4c8ad3f137 100644 --- a/testing/ltp/Makefile +++ b/testing/ltp/Makefile @@ -20,10 +20,12 @@ include $(APPDIR)/Make.defs -LTP_UNPACK = ltp -LTP_URL = https://github.com/linux-test-project/ltp.git +LTPS_VERSION = 20230516 +LTP_DOWNLOAD_URL = https://github.com/linux-test-project/ltp/archive/refs/tags/ +LTP_UNPACK = ltp +LTP_URL = https://github.com/linux-test-project/ltp.git -TESTDIR = $(LTP_UNPACK)/testcases/open_posix_testsuite +TESTDIR = $(LTP_UNPACK)/testcases/open_posix_testsuite ifneq ($(wildcard $(TESTDIR)),) ifeq ($(CONFIG_FS_AIO),) @@ -179,11 +181,15 @@ CFLAGS += -Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable # Should be removed if possible in the future CFLAGS += -Wno-incompatible-pointer-types -Wno-overflow -Wno-int-to-pointer-cast -$(LTP_UNPACK): - $(Q) echo "git clone $(LTP_URL)" - $(Q) git clone $(LTP_URL) - $(Q) git -C $(LTP_UNPACK) am < 0001-Fix-static-struct-warning.patch - $(Q) git -C $(LTP_UNPACK) am < 0002-Use-ifdef-instead-of-if-for-__linux__.patch +ltp-$(LTPS_VERSION).zip: + $(call DOWNLOAD,$(LTP_DOWNLOAD_URL),$(LTPS_VERSION).zip, ltp.zip) + +$(LTP_UNPACK): ltp-$(LTPS_VERSION).zip + $(Q) echo "dowload $(LTP_DOWNLOAD_URL)$(LTPS_VERSION).zip" + $(Q) unzip -o ltp.zip + $(Q) mv ltp-$(LTPS_VERSION) $(LTP_UNPACK) + $(Q) patch -p1 < 0001-pthread_rwlock_unlock-follow-linux.patch + $(Q) patch -p1 < 0002-Use-ifdef-instead-of-if-for-__linux__.patch # Download and unpack tarball if no git repo found ifeq ($(wildcard $(LTP_UNPACK)/.git),)