All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ltp: syscalls: rt_sigwaitinfo01: Fix failure for MIPS arches
@ 2019-08-23  7:26 zhe.he
  2019-09-03  7:55 ` He Zhe
  0 siblings, 1 reply; 4+ messages in thread
From: zhe.he @ 2019-08-23  7:26 UTC (permalink / raw)
  To: openembedded-core

From: He Zhe <zhe.he@windriver.com>

Add a patch to fix the following failure.
rt_sigtimedwait01    1  TFAIL  :  .../sigwaitinfo01.c:58: test_empty_set
(.../sigwaitinfo01.c: 148): Unexpected failure:
TEST_ERRNO=EINVAL(22): Invalid argument

Signed-off-by: He Zhe <zhe.he@windriver.com>
---
 ..._sigwaitinfo01-Fix-failure-for-MIPS-arche.patch | 49 ++++++++++++++++++++++
 meta/recipes-extended/ltp/ltp_20190517.bb          |  1 +
 2 files changed, 50 insertions(+)
 create mode 100644 meta/recipes-extended/ltp/ltp/0001-syscalls-rt_sigwaitinfo01-Fix-failure-for-MIPS-arche.patch

diff --git a/meta/recipes-extended/ltp/ltp/0001-syscalls-rt_sigwaitinfo01-Fix-failure-for-MIPS-arche.patch b/meta/recipes-extended/ltp/ltp/0001-syscalls-rt_sigwaitinfo01-Fix-failure-for-MIPS-arche.patch
new file mode 100644
index 0000000..9a0df74
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-syscalls-rt_sigwaitinfo01-Fix-failure-for-MIPS-arche.patch
@@ -0,0 +1,49 @@
+From b4193bc3fdeb278abc54944b4773ffa45ee432af Mon Sep 17 00:00:00 2001
+From: He Zhe <zhe.he@windriver.com>
+Date: Fri, 23 Aug 2019 14:34:43 +0800
+Subject: [LTP] [PATCH] syscalls: rt_sigwaitinfo01: Fix failure for MIPS arches
+
+rt_sigtimedwait01 fails as follow on MIPS arches
+rt_sigtimedwait01    1  TFAIL  :  .../sigwaitinfo01.c:58: test_empty_set
+(.../sigwaitinfo01.c: 148): Unexpected failure:
+TEST_ERRNO=EINVAL(22): Invalid argument
+
+As this case purposely bypasses glibc, it should align with the size of kernel
+definition of sigset_t which is different from other arches.
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/include/uapi/asm/signal.h#n15
+
+This patch adds specific case for MIPS.
+
+Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2019-August/013313.html]
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
+index 5a32ce1..5c2fa99 100644
+--- a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
++++ b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
+@@ -128,9 +128,16 @@ static int my_sigtimedwait(const sigset_t * set, siginfo_t * info,
+ static int my_rt_sigtimedwait(const sigset_t * set, siginfo_t * info,
+ 			      struct timespec *timeout)
+ {
+-
+-	/* The last argument is (number_of_signals)/(bits_per_byte), which are 64 and 8, resp. */
+-	return ltp_syscall(__NR_rt_sigtimedwait, set, info, timeout, 8);
++	/* The last argument is (number_of_signals)/(bits_per_byte), which are 64 and 8, resp,
++	 * except for MIPS which are 128 and 8, resp.
++	 */
++	return ltp_syscall(__NR_rt_sigtimedwait, set, info, timeout,
++#ifdef __mips__
++		16
++#else
++		8
++#endif
++		);
+ }
+ #endif
+ 
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb b/meta/recipes-extended/ltp/ltp_20190517.bb
index b0e2f96..14c1219 100644
--- a/meta/recipes-extended/ltp/ltp_20190517.bb
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -45,6 +45,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
            file://0002-check-for-RES_USE_INET6-during-configure.patch \
            file://0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch \
            file://0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch \
+           file://0001-syscalls-rt_sigwaitinfo01-Fix-failure-for-MIPS-arche.patch \
            "
 
 S = "${WORKDIR}/git"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ltp: syscalls: rt_sigwaitinfo01: Fix failure for MIPS arches
  2019-08-23  7:26 [PATCH] ltp: syscalls: rt_sigwaitinfo01: Fix failure for MIPS arches zhe.he
@ 2019-09-03  7:55 ` He Zhe
  2019-09-03  9:16   ` Ross Burton
  0 siblings, 1 reply; 4+ messages in thread
From: He Zhe @ 2019-09-03  7:55 UTC (permalink / raw)
  To: openembedded-core

Kindly ping.

Zhe

On 8/23/19 3:26 PM, zhe.he@windriver.com wrote:
> From: He Zhe <zhe.he@windriver.com>
>
> Add a patch to fix the following failure.
> rt_sigtimedwait01    1  TFAIL  :  .../sigwaitinfo01.c:58: test_empty_set
> (.../sigwaitinfo01.c: 148): Unexpected failure:
> TEST_ERRNO=EINVAL(22): Invalid argument
>
> Signed-off-by: He Zhe <zhe.he@windriver.com>
> ---
>  ..._sigwaitinfo01-Fix-failure-for-MIPS-arche.patch | 49 ++++++++++++++++++++++
>  meta/recipes-extended/ltp/ltp_20190517.bb          |  1 +
>  2 files changed, 50 insertions(+)
>  create mode 100644 meta/recipes-extended/ltp/ltp/0001-syscalls-rt_sigwaitinfo01-Fix-failure-for-MIPS-arche.patch
>
> diff --git a/meta/recipes-extended/ltp/ltp/0001-syscalls-rt_sigwaitinfo01-Fix-failure-for-MIPS-arche.patch b/meta/recipes-extended/ltp/ltp/0001-syscalls-rt_sigwaitinfo01-Fix-failure-for-MIPS-arche.patch
> new file mode 100644
> index 0000000..9a0df74
> --- /dev/null
> +++ b/meta/recipes-extended/ltp/ltp/0001-syscalls-rt_sigwaitinfo01-Fix-failure-for-MIPS-arche.patch
> @@ -0,0 +1,49 @@
> +From b4193bc3fdeb278abc54944b4773ffa45ee432af Mon Sep 17 00:00:00 2001
> +From: He Zhe <zhe.he@windriver.com>
> +Date: Fri, 23 Aug 2019 14:34:43 +0800
> +Subject: [LTP] [PATCH] syscalls: rt_sigwaitinfo01: Fix failure for MIPS arches
> +
> +rt_sigtimedwait01 fails as follow on MIPS arches
> +rt_sigtimedwait01    1  TFAIL  :  .../sigwaitinfo01.c:58: test_empty_set
> +(.../sigwaitinfo01.c: 148): Unexpected failure:
> +TEST_ERRNO=EINVAL(22): Invalid argument
> +
> +As this case purposely bypasses glibc, it should align with the size of kernel
> +definition of sigset_t which is different from other arches.
> +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/include/uapi/asm/signal.h#n15
> +
> +This patch adds specific case for MIPS.
> +
> +Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2019-August/013313.html]
> +Signed-off-by: He Zhe <zhe.he@windriver.com>
> +---
> + testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c | 13 ++++++++++---
> + 1 file changed, 10 insertions(+), 3 deletions(-)
> +
> +diff --git a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
> +index 5a32ce1..5c2fa99 100644
> +--- a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
> ++++ b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
> +@@ -128,9 +128,16 @@ static int my_sigtimedwait(const sigset_t * set, siginfo_t * info,
> + static int my_rt_sigtimedwait(const sigset_t * set, siginfo_t * info,
> + 			      struct timespec *timeout)
> + {
> +-
> +-	/* The last argument is (number_of_signals)/(bits_per_byte), which are 64 and 8, resp. */
> +-	return ltp_syscall(__NR_rt_sigtimedwait, set, info, timeout, 8);
> ++	/* The last argument is (number_of_signals)/(bits_per_byte), which are 64 and 8, resp,
> ++	 * except for MIPS which are 128 and 8, resp.
> ++	 */
> ++	return ltp_syscall(__NR_rt_sigtimedwait, set, info, timeout,
> ++#ifdef __mips__
> ++		16
> ++#else
> ++		8
> ++#endif
> ++		);
> + }
> + #endif
> + 
> +-- 
> +2.7.4
> +
> diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb b/meta/recipes-extended/ltp/ltp_20190517.bb
> index b0e2f96..14c1219 100644
> --- a/meta/recipes-extended/ltp/ltp_20190517.bb
> +++ b/meta/recipes-extended/ltp/ltp_20190517.bb
> @@ -45,6 +45,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
>             file://0002-check-for-RES_USE_INET6-during-configure.patch \
>             file://0001-syscalls-tgkill03-wait-for-defunct-tid-to-get-detach.patch \
>             file://0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch \
> +           file://0001-syscalls-rt_sigwaitinfo01-Fix-failure-for-MIPS-arche.patch \
>             "
>  
>  S = "${WORKDIR}/git"



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ltp: syscalls: rt_sigwaitinfo01: Fix failure for MIPS arches
  2019-09-03  7:55 ` He Zhe
@ 2019-09-03  9:16   ` Ross Burton
  2019-09-03  9:27     ` He Zhe
  0 siblings, 1 reply; 4+ messages in thread
From: Ross Burton @ 2019-09-03  9:16 UTC (permalink / raw)
  To: He Zhe, openembedded-core

On 03/09/2019 08:55, He Zhe wrote:
> Kindly ping.

This doesn't apply to current master, can you please rebase?

Ross


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ltp: syscalls: rt_sigwaitinfo01: Fix failure for MIPS arches
  2019-09-03  9:16   ` Ross Burton
@ 2019-09-03  9:27     ` He Zhe
  0 siblings, 0 replies; 4+ messages in thread
From: He Zhe @ 2019-09-03  9:27 UTC (permalink / raw)
  To: Ross Burton, openembedded-core



On 9/3/19 5:16 PM, Ross Burton wrote:
> On 03/09/2019 08:55, He Zhe wrote:
>> Kindly ping.
>
> This doesn't apply to current master, can you please rebase?

Oops, v2 is sent.

Thanks,
Zhe

>
> Ross
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-03  9:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-23  7:26 [PATCH] ltp: syscalls: rt_sigwaitinfo01: Fix failure for MIPS arches zhe.he
2019-09-03  7:55 ` He Zhe
2019-09-03  9:16   ` Ross Burton
2019-09-03  9:27     ` He Zhe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.