aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHe Zhe <zhe.he@windriver.com>2019-08-19 21:56:34 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-21 15:29:02 +0100
commitadac6e9cda6a7306aac8eeee02f57c8158e2fc4c (patch)
treec59896bfa8ec15e4709d7bc94c621fbaccab2fc0
parentf5a8ce775c803fa406bda378eb174407d365d503 (diff)
downloadopenembedded-core-contrib-adac6e9cda6a7306aac8eeee02f57c8158e2fc4c.tar.gz
openembedded-core-contrib-adac6e9cda6a7306aac8eeee02f57c8158e2fc4c.tar.bz2
openembedded-core-contrib-adac6e9cda6a7306aac8eeee02f57c8158e2fc4c.zip
ltp: Fix ustat02 failure
Backport a patch to fix the following failure. ustat02.c:44: FAIL: ustat(2) failed to produce expected error; 14, errno: EFAULT: EINVAL (From OE-Core rev: e05f5e1d44293827260541e301ce25d15eb405af) Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch36
-rw-r--r--meta/recipes-extended/ltp/ltp_20190517.bb1
2 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch b/meta/recipes-extended/ltp/ltp/0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch
new file mode 100644
index 00000000000..c936b788fe1
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-ustat02-Fix-EFAULT-in-32bit-compatibility-mode.patch
@@ -0,0 +1,36 @@
+From 156776a3e29491b363fdc9811912e1298655d060 Mon Sep 17 00:00:00 2001
+From: Steven Price <steven.price@arm.com>
+Date: Fri, 19 Jul 2019 13:48:17 +0100
+Subject: [PATCH] ustat02: Fix EFAULT in 32bit compatibility mode
+
+The size of dev_t is larger than 32 bits which causes the dev argument
+to be passed incorrectly. On Arm this means that the EFAULT test case
+actually returns EINVAL because the device number isn't recognised.
+
+Signed-off-by: Steven Price <steven.price@arm.com>
+Acked-by: Li Wang <liwang@redhat.com>
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/156776a3e29491b363fdc9811912e1298655d060]
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ testcases/kernel/syscalls/ustat/ustat02.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/syscalls/ustat/ustat02.c b/testcases/kernel/syscalls/ustat/ustat02.c
+index 9bbe4f3..1a0e9e0 100644
+--- a/testcases/kernel/syscalls/ustat/ustat02.c
++++ b/testcases/kernel/syscalls/ustat/ustat02.c
+@@ -36,7 +36,7 @@ int TST_TOTAL = ARRAY_SIZE(tc);
+
+ void run(unsigned int test)
+ {
+- TEST(tst_syscall(__NR_ustat, *tc[test].dev, tc[test].buf));
++ TEST(tst_syscall(__NR_ustat, (unsigned int)*tc[test].dev, tc[test].buf));
+
+ if ((TST_RET == -1) && (TST_ERR == tc[test].exp_errno))
+ tst_res(TPASS | TTERRNO, "ustat(2) expected failure");
+--
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb b/meta/recipes-extended/ltp/ltp_20190517.bb
index f6c7de62dd2..b0e2f969c7a 100644
--- a/meta/recipes-extended/ltp/ltp_20190517.bb
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -44,6 +44,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0001-Add-configure-time-check-for-getdents-getdents64-API.patch \
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 \
"
S = "${WORKDIR}/git"