diff options
Diffstat (limited to 'meta-oe/recipes-test')
41 files changed, 764 insertions, 374 deletions
diff --git a/meta-oe/recipes-test/bats/bats_1.1.0.bb b/meta-oe/recipes-test/bats/bats_1.1.0.bb deleted file mode 100644 index a8179744ae..0000000000 --- a/meta-oe/recipes-test/bats/bats_1.1.0.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "Bash Automated Testing System" -DESCRIPTION = "Bats is a TAP-compliant testing framework for Bash. It \ -provides a simple way to verify that the UNIX programs you write behave as expected." -AUTHOR = "Sam Stephenson & bats-core organization" -HOMEPAGE = "https://github.com/bats-core/bats-core" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.md;md5=2970203aedf9e829edb96a137a4fe81b" - -SRC_URI = "git://github.com/bats-core/bats-core.git \ - " -# v1.1.0 -SRCREV = "c706d1470dd1376687776bbe985ac22d09780327" - -S = "${WORKDIR}/git" - -do_install() { - # Just a bunch of bash scripts to install - ${S}/install.sh ${D}${prefix} -} - -RDEPENDS_bats = "bash" diff --git a/meta-oe/recipes-test/bats/bats_1.11.0.bb b/meta-oe/recipes-test/bats/bats_1.11.0.bb new file mode 100644 index 0000000000..f0615f7b79 --- /dev/null +++ b/meta-oe/recipes-test/bats/bats_1.11.0.bb @@ -0,0 +1,34 @@ +SUMMARY = "Bash Automated Testing System" +DESCRIPTION = "Bats is a TAP-compliant testing framework for Bash. It \ +provides a simple way to verify that the UNIX programs you write behave as expected." +HOMEPAGE = "https://github.com/bats-core/bats-core" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=2970203aedf9e829edb96a137a4fe81b" + +SRC_URI = "\ + git://github.com/bats-core/bats-core.git;branch=master;protocol=https \ + " + +# v1.10.0 +SRCREV = "7531b575bb81487553553aecb654c41b237ae96c" + +S = "${WORKDIR}/git" + +# Numerous scripts assume ${baselib} == lib, which is not true. +# +do_configure:prepend() { + for f in ${S}/libexec/bats-core/* ${S}/lib/bats-core/* ; do + sed -i 's:\$BATS_ROOT/lib/:\$BATS_ROOT/${baselib}/:g' $f + done +} + +do_install() { + # Just a bunch of bash scripts to install + ${S}/install.sh ${D}${prefix} ${baselib} +} + +RDEPENDS:${PN} = "bash" +FILES:${PN} += "${libdir}/bats-core/*" + +PACKAGECONFIG ??= "pretty" +PACKAGECONFIG[pretty] = ",,,ncurses" diff --git a/meta-oe/recipes-test/catch2/catch2_2.9.2.bb b/meta-oe/recipes-test/catch2/catch2_3.7.0.bb index 57fc935f77..2d571a9cfc 100644 --- a/meta-oe/recipes-test/catch2/catch2_2.9.2.bb +++ b/meta-oe/recipes-test/catch2/catch2_3.7.0.bb @@ -1,22 +1,21 @@ DESCRIPTION = "A modern, C++-native, header-only, test framework for unit-tests, \ TDD and BDD - using C++11, C++14, C++17 and later." -AUTHOR = "Phil Nash, Martin Horenovsky and others" HOMEPAGE = "https://github.com/catchorg/Catch2" LICENSE = "BSL-1.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e4224ccaecb14d942c71d31bef20d78c" -SRC_URI = "git://github.com/catchorg/Catch2.git" -SRCREV = "2c869e17e4803d30b3d5ca5b0d76387b9db97fa5" +SRC_URI = "git://github.com/catchorg/Catch2.git;branch=devel;protocol=https" +SRCREV = "31588bb4f56b638dd5afc28d3ebff9b9dcefb88d" S = "${WORKDIR}/git" inherit cmake python3native -do_install_append() { +do_install:append() { rm ${D}${datadir}/Catch2/lldbinit rm ${D}${datadir}/Catch2/gdbinit rmdir ${D}${datadir}/Catch2/ } # Header-only library -RDEPENDS_${PN}-dev = "" -RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" +RDEPENDS:${PN}-dev = "" +RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" diff --git a/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb b/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb deleted file mode 100644 index 5aee5ef931..0000000000 --- a/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb +++ /dev/null @@ -1,39 +0,0 @@ -DESCRIPTION = "cmocka is an elegant unit testing framework for C with support for mock \ -objects. It only requires the standard C library, works on a range of computing \ -platforms (including embedded) and with different compilers." -HOMEPAGE = "https://cmocka.org/" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRCREV = "56eb3a183fc222120f86d0c54fd033992c30135e" -SRC_URI = "git://git.cryptomilk.org/projects/cmocka.git \ - file://run-ptest \ - file://cmocka-uintptr_t.patch \ - " - -S = "${WORKDIR}/git" - -inherit cmake ptest - -EXTRA_OECMAKE = "${@bb.utils.contains('PTEST_ENABLED', '1', '-DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=ON', '', d)}" - -do_install_append () { - install -d ${D}${datadir}/${BPN}/example - install -d ${D}${datadir}/${BPN}/example/mock/chef_wrap - install -d ${D}${datadir}/${BPN}/example/mock/uptime - - install -m 0755 ${B}/example/*_test ${D}/${datadir}/${BPN}/example - install -m 0755 ${B}/example/mock/chef_wrap/waiter_test_wrap ${D}/${datadir}/${BPN}/example/mock/chef_wrap - install -m 0755 ${B}/example/mock/uptime/uptime ${D}/${datadir}/${BPN}/example/mock/uptime - install -m 0755 ${B}/example/mock/uptime/test_uptime ${D}/${datadir}/${BPN}/example/mock/uptime -} - -do_install_ptest () { - install -d ${D}${PTEST_PATH}/tests - install -m 0755 ${B}/tests/test_* ${D}${PTEST_PATH}/tests -} - -PACKAGE_BEFORE_PN += "${PN}-examples" - -FILES_${PN}-examples = "${datadir}/${BPN}/example" diff --git a/meta-oe/recipes-test/cmocka/cmocka_1.1.7.bb b/meta-oe/recipes-test/cmocka/cmocka_1.1.7.bb new file mode 100644 index 0000000000..6c94e9e275 --- /dev/null +++ b/meta-oe/recipes-test/cmocka/cmocka_1.1.7.bb @@ -0,0 +1,43 @@ +DESCRIPTION = "cmocka is an elegant unit testing framework for C with support for mock \ +objects. It only requires the standard C library, works on a range of computing \ +platforms (including embedded) and with different compilers." +HOMEPAGE = "https://cmocka.org/" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRCREV = "a01cc69ee9536f90e57c61a198f2d1944d3d4313" +PV .= "+git" +SRC_URI = "git://git.cryptomilk.org/projects/cmocka.git;protocol=https;branch=stable-1.1 \ + file://0001-include-Check-for-previous-declaration-of-uintptr_t.patch \ + file://run-ptest \ + " + +S = "${WORKDIR}/git" + +inherit cmake ptest + +EXTRA_OECMAKE += "${@bb.utils.contains('PTEST_ENABLED', '1', '-DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=ON', '', d)}" +# Use -Wl,wrap linker flag, which does not work with LTO +LTO = "" + +do_install:append () { + install -d ${D}${libdir}/${BPN}/example + install -d ${D}${libdir}/${BPN}/example/mock/chef_wrap + install -d ${D}${libdir}/${BPN}/example/mock/uptime + + install -m 0755 ${B}/example/*_test ${D}/${libdir}/${BPN}/example + install -m 0755 ${B}/example/mock/chef_wrap/waiter_test_wrap ${D}/${libdir}/${BPN}/example/mock/chef_wrap + install -m 0755 ${B}/example/mock/uptime/uptime ${D}/${libdir}/${BPN}/example/mock/uptime + install -m 0755 ${B}/example/mock/uptime/test_uptime ${D}/${libdir}/${BPN}/example/mock/uptime + install -m 0644 ${B}/example/mock/uptime/libproc_uptime.so ${D}/${libdir}/${BPN}/example/mock/libproc_uptime.so +} + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + install -m 0755 ${B}/tests/test_* ${D}${PTEST_PATH}/tests +} + +PACKAGE_BEFORE_PN += "${PN}-examples" + +FILES:${PN}-examples = "${libdir}/${BPN}/example" diff --git a/meta-oe/recipes-test/cmocka/files/0001-include-Check-for-previous-declaration-of-uintptr_t.patch b/meta-oe/recipes-test/cmocka/files/0001-include-Check-for-previous-declaration-of-uintptr_t.patch new file mode 100644 index 0000000000..65d30ea993 --- /dev/null +++ b/meta-oe/recipes-test/cmocka/files/0001-include-Check-for-previous-declaration-of-uintptr_t.patch @@ -0,0 +1,43 @@ +From a54e035f802e79e3292d8ad39a14bd7c060eb7b1 Mon Sep 17 00:00:00 2001 +From: Breno Leitao <breno.leitao@gmail.com> +Date: Tue, 21 Mar 2023 21:58:28 -0700 +Subject: [PATCH] include: Check for previous declaration of uintptr_t + +Adding a extra check before declaring uintptr_t. Currently musl uses +macro __DEFINED_uintptr_t once it defines uintptr_t type. Checking +this macro before defining it, and, defining it when uintptr_t is +defined. + +Taken from Alpine + +Upstream-Status: Pending +Signed-off-by: Breno Leitao <breno.leitao@gmail.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + include/cmocka.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/include/cmocka.h b/include/cmocka.h +index a21d965..f540793 100644 +--- a/include/cmocka.h ++++ b/include/cmocka.h +@@ -121,7 +121,7 @@ typedef uintmax_t LargestIntegralType; + ((LargestIntegralType)(value)) + + /* Smallest integral type capable of holding a pointer. */ +-#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED) && !defined(HAVE_UINTPTR_T) ++#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED) && !defined(HAVE_UINTPTR_T) && !defined(__DEFINED_uintptr_t) + # if defined(_WIN32) + /* WIN32 is an ILP32 platform */ + typedef unsigned int uintptr_t; +@@ -147,6 +147,7 @@ typedef uintmax_t LargestIntegralType; + + # define _UINTPTR_T + # define _UINTPTR_T_DEFINED ++# define __DEFINED_uintptr_t + #endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */ + + /* Perform an unsigned cast to uintptr_t. */ +-- +2.40.0 + diff --git a/meta-oe/recipes-test/cmocka/files/cmocka-uintptr_t.patch b/meta-oe/recipes-test/cmocka/files/cmocka-uintptr_t.patch deleted file mode 100644 index 8d3b73b631..0000000000 --- a/meta-oe/recipes-test/cmocka/files/cmocka-uintptr_t.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 5bd7b5d04435bd593349825973ce32290f5f604d Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Wed, 25 Jul 2018 09:55:25 +0800 -Subject: [PATCH] samba: cmocka.h: fix musl libc conflicting types error - -Fix build on qemumips64(el) - -taken from: -[PATCH] libldb: fix musl libc conflicting types error - -/third_party/cmocka/cmocka.h:126:28: error: conflicting types for 'uintptr_t' - typedef unsigned int uintptr_t; - ^~~~~~~~~ -use __DEFINED_uintptr_t in alltypes.h to check if uintptr already defined - -Upstream-Status: Pending - -Signed-off-by: Changqing Li <changqing.li@windriver.com> -Signed-off-by: Andrea Adami <andrea.adami@gmail.com> - -Taken from [PATCH] samba: cmocka.h: fix musl libc conflicting types error -https://git.openembedded.org/meta-openembedded/commit/meta-networking/recipes-connectivity/samba?id=b758150d30a5fbdc47c465d0e9dca3a7e6d71f3c - -Signed-off-by: Armin Kuster <akuster808@gmail.com> - -This fix is not in cmocka, so pending pending?? - - -Index: git/include/cmocka.h -=================================================================== ---- git.orig/include/cmocka.h -+++ git/include/cmocka.h -@@ -116,7 +116,7 @@ typedef uintmax_t LargestIntegralType; - ((LargestIntegralType)(value)) - - /* Smallest integral type capable of holding a pointer. */ --#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED) -+#if !defined(__DEFINED_uintptr_t) - # if defined(_WIN32) - /* WIN32 is an ILP32 platform */ - typedef unsigned int uintptr_t; -@@ -140,9 +140,8 @@ typedef uintmax_t LargestIntegralType; - # endif /* __WORDSIZE */ - # endif /* _WIN32 */ - --# define _UINTPTR_T --# define _UINTPTR_T_DEFINED --#endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */ -+# define __DEFINED_uintptr_t -+#endif /* !defined(__DEFINED_uintptr_t) */ - - /* Perform an unsigned cast to uintptr_t. */ - #define cast_to_pointer_integral_type(value) \ diff --git a/meta-oe/recipes-test/cppunit/cppunit_1.15.1.bb b/meta-oe/recipes-test/cppunit/cppunit_1.15.1.bb index 92db31e1ea..be81125652 100644 --- a/meta-oe/recipes-test/cppunit/cppunit_1.15.1.bb +++ b/meta-oe/recipes-test/cppunit/cppunit_1.15.1.bb @@ -1,6 +1,6 @@ DESCRIPTION = "CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML for automatic testing and GUI based for supervised tests. " HOMEPAGE = "http://www.freedesktop.org/wiki/Software/cppunit" -LICENSE = "LGPL-2.1" +LICENSE = "LGPL-2.1-only" SECTION = "libs" LIC_FILES_CHKSUM = "file://COPYING;md5=b0e9ef921ff780eb328bdcaeebec3269" @@ -12,3 +12,5 @@ SRC_URI[md5sum] = "9dc669e6145cadd9674873e24943e6dd" SRC_URI[sha256sum] = "89c5c6665337f56fd2db36bc3805a5619709d51fb136e51937072f63fcc717a7" inherit autotools + +BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-test/cpputest/cpputest_4.0.bb b/meta-oe/recipes-test/cpputest/cpputest_4.0.bb new file mode 100644 index 0000000000..5536cf07b6 --- /dev/null +++ b/meta-oe/recipes-test/cpputest/cpputest_4.0.bb @@ -0,0 +1,25 @@ +SUMMARY = "CppUTest unit testing and mocking framework for C/C++" +HOMEPAGE = "http://cpputest.github.io/" +SECTION = "devel" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=ce5d5f1fe02bcd1343ced64a06fd4177" + +SRC_URI = "git://github.com/cpputest/cpputest.git;protocol=https;branch=master" +SRCREV = "67d2dfd41e13f09ff218aa08e2d35f1c32f032a1" + +S = "${WORKDIR}/git" + +inherit cmake + +EXTRA_OECMAKE = "-DLONGLONG=ON \ + -DC++11=ON \ + -DTESTS=OFF \ + " + +DEV_PKG_DEPENDENCY = "" + +FILES:${PN}-dev += "${libdir}/CppUTest/cmake/*" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[extensions] = "-DEXTENSIONS=ON,-DEXTENSIONS=OFF" diff --git a/meta-oe/recipes-test/cukinia/cukinia_0.5.1.bb b/meta-oe/recipes-test/cukinia/cukinia_0.7.0.bb index 34dd8c8686..e3424d019e 100644 --- a/meta-oe/recipes-test/cukinia/cukinia_0.5.1.bb +++ b/meta-oe/recipes-test/cukinia/cukinia_0.7.0.bb @@ -1,18 +1,19 @@ -SUMMARY = "Linux firmware validation framework" +SUMMARY = "Linux firmware validation framework" DESCRIPTION = "Cukinia is designed to help Linux-based embedded firmware \ -developers run simple system-level validation tests on their firmware." +developers run simple system-level validation tests on their firmware." HOMEPAGE = "https://github.com/savoirfairelinux/cukinia" -LICENSE = "GPLv3 & Apache-2.0" +LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ - file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI = "git://github.com/savoirfairelinux/cukinia.git;protocol=https;branch=master" -SRCREV = "ea934c5393ad99c37bec3c621a364122720cce02" +SRCREV = "be56f653743cc0e68bef81ef35df7c50ff8919c4" S = "${WORKDIR}/git" +RRECOMMENDS:${PN} = "libgpiod-tools" + do_install () { install -d ${D}${sbindir} install -m 0755 ${S}/cukinia ${D}${sbindir} diff --git a/meta-oe/recipes-test/cunit/cunit_2.1-3.bb b/meta-oe/recipes-test/cunit/cunit_2.1-3.bb index c877d3bf1c..252ef60def 100644 --- a/meta-oe/recipes-test/cunit/cunit_2.1-3.bb +++ b/meta-oe/recipes-test/cunit/cunit_2.1-3.bb @@ -1,6 +1,6 @@ DESCRIPTION = "CUnit is a C framework for unit testing. Test output supports comandline and GUI results reporting" HOMEPAGE = "http://cunit.sourceforge.net" -LICENSE = "LGPL-2.0" +LICENSE = "LGPL-2.0-only" SECTION = "libs" LIC_FILES_CHKSUM = "file://COPYING;md5=7734aa853b85d6f935466f081490ddbb" @@ -15,7 +15,7 @@ SRC_URI[sha256sum] = "f5b29137f845bb08b77ec60584fdb728b4e58f1023e6f249a464efa49a UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/cunit/files/releases" -inherit autotools-brokensep remove-libtool ptest +inherit autotools-brokensep ptest EXTRA_OECONF = "--enable-memtrace --enable-automated --enable-basic --enable-console" @@ -31,7 +31,7 @@ do_install_ptest() { install -m 0755 ${S}${TESTBIN} ${D}${PTEST_PATH}/tests/ } -FILES_${PN}-dev += "${datadir}/CUnit" -FILES_${PN}-doc += "${docdir}" +FILES:${PN}-dev += "${datadir}/CUnit" +FILES:${PN}-doc += "${docdir}" BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-test/cxxtest/cxxtest_4.4.bb b/meta-oe/recipes-test/cxxtest/cxxtest_4.4.bb index 252eea3665..8c8fb60985 100644 --- a/meta-oe/recipes-test/cxxtest/cxxtest_4.4.bb +++ b/meta-oe/recipes-test/cxxtest/cxxtest_4.4.bb @@ -1,22 +1,25 @@ DESCRIPTION = "CxxTest is a unit testing framework for C++ that is similar in spirit to JUnit, CppUnit, and xUnit." HOMEPAGE = "http://cxxtest.com/" SECTION = "devel" -LICENSE = "LGPL-2.0" -LIC_FILES_CHKSUM = "file://${WORKDIR}/cxxtest-${PV}/COPYING;md5=e6a600fd5e1d9cbde2d983680233ad02" +LICENSE = "LGPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=e6a600fd5e1d9cbde2d983680233ad02" -SRC_URI = "http://downloads.sourceforge.net/project/cxxtest/cxxtest/${PV}/cxxtest-${PV}.tar.gz" +SRC_URI = "http://downloads.sourceforge.net/project/cxxtest/cxxtest/${PV}/${BP}.tar.gz" SRC_URI[md5sum] = "c3cc3355e2ac64e34c215f28e44cfcec" SRC_URI[sha256sum] = "1c154fef91c65dbf1cd4519af7ade70a61d85a923b6e0c0b007dc7f4895cf7d8" -S = "${WORKDIR}/cxxtest-${PV}/python" +UPSTREAM_CHECK_URI = "https://sourceforge.net/p/cxxtest/activity/" -inherit distutils3 +inherit setuptools3 -do_install_append() { +SETUPTOOLS_SETUP_PATH = "${S}/python" + +do_install:append() { install -d ${D}${includedir} - cp -a ../cxxtest ${D}${includedir} + cp -a ${S}/cxxtest/ ${D}${includedir} + # Fix the interpretter as otherwise this points to the build host python sed '1c\ -#!/usr/bin/env python' -i ${D}${bindir}/cxxtestgen +#!/usr/bin/env python3' -i ${D}${bindir}/cxxtestgen } BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-test/evtest/evtest/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-oe/recipes-test/evtest/evtest/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch index 706322d565..595b0296ea 100644 --- a/meta-oe/recipes-test/evtest/evtest/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch +++ b/meta-oe/recipes-test/evtest/evtest/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch @@ -1,4 +1,4 @@ -From fa57c78c33d26084f85f1a6b4c29378631dc9395 Mon Sep 17 00:00:00 2001 +From 490f5b6cd788692d989f07180a5714c76872911e Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 30 Nov 2019 11:58:58 -0800 Subject: [PATCH] Fix build on 32bit arches with 64bit time_t @@ -10,17 +10,18 @@ input.h [1] Upstream-Status: Submitted [https://gitlab.freedesktop.org/libevdev/evtest/merge_requests/6] Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- - evtest.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) + evtest.c | 5 +++++ + 1 file changed, 5 insertions(+) diff --git a/evtest.c b/evtest.c -index 548c203..93063cd 100644 +index ba7a161..8fc2e5a 100644 --- a/evtest.c +++ b/evtest.c -@@ -61,6 +61,11 @@ - #include <sys/types.h> - #include <unistd.h> +@@ -63,6 +63,11 @@ + #define input_event_usec time.tv_usec + #endif +#ifndef input_event_sec +#define input_event_sec time.tv_sec @@ -30,12 +31,3 @@ index 548c203..93063cd 100644 #define BITS_PER_LONG (sizeof(long) * 8) #define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1) #define OFF(x) ((x)%BITS_PER_LONG) -@@ -1140,7 +1145,7 @@ static int print_events(int fd) - type = ev[i].type; - code = ev[i].code; - -- printf("Event: time %ld.%06ld, ", ev[i].time.tv_sec, ev[i].time.tv_usec); -+ printf("Event: time %ld.%06ld, ", ev[i].input_event_sec, ev[i].input_event_sec); - - if (type == EV_SYN) { - if (code == SYN_MT_REPORT) diff --git a/meta-oe/recipes-test/evtest/evtest/add_missing_limits_h_include.patch b/meta-oe/recipes-test/evtest/evtest/add_missing_limits_h_include.patch deleted file mode 100644 index b2bf94fd56..0000000000 --- a/meta-oe/recipes-test/evtest/evtest/add_missing_limits_h_include.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 5eb4ab1c139ea38ebe6bb4acba08b09ee7d77d3c Mon Sep 17 00:00:00 2001 -From: Baruch Siach <baruch@tkos.co.il> -Date: Sun, 18 Aug 2019 10:01:06 +0300 -Subject: Add missing limits.h include -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fixes build with musl libc that does not include limits.h indirectly via -other headers. - -evtest.c: In function ‘scan_devices’: -evtest.c:886:14: error: ‘PATH_MAX’ undeclared (first use in this function); did you mean INT8_MAX’? - char fname[PATH_MAX]; - ^~~~~~~~ - -Signed-off-by: Baruch Siach <baruch@tkos.co.il> -Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> ---- - evtest.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/evtest.c b/evtest.c -index 37d4f85..548c203 100644 ---- a/evtest.c -+++ b/evtest.c -@@ -56,6 +56,7 @@ - #include <getopt.h> - #include <ctype.h> - #include <signal.h> -+#include <limits.h> - #include <sys/time.h> - #include <sys/types.h> - #include <unistd.h> --- -cgit v1.1 - diff --git a/meta-oe/recipes-test/evtest/evtest_1.34.bb b/meta-oe/recipes-test/evtest/evtest_1.35.bb index a3a23c8951..52f684ce5f 100644 --- a/meta-oe/recipes-test/evtest/evtest_1.34.bb +++ b/meta-oe/recipes-test/evtest/evtest_1.35.bb @@ -1,15 +1,13 @@ SUMMARY = "Simple tool for input event debugging" HOMEPAGE = "http://people.freedesktop.org/~whot/evtest/" -AUTHOR = "Vojtech Pavlik <vojtech@suse.cz>" SECTION = "console/utils" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" DEPENDS = "libxml2" -SRCREV = "16e5104127a620686bdddc4a9ad62881134d6c69" -SRC_URI = "git://gitlab.freedesktop.org/libevdev/evtest.git;protocol=https \ - file://add_missing_limits_h_include.patch \ +SRCREV = "da347a8f88d2e5729dd12d61ee9743f902065b55" +SRC_URI = "git://gitlab.freedesktop.org/libevdev/evtest.git;protocol=https;branch=master \ file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \ " diff --git a/meta-oe/recipes-test/fbtest/fb-test_git.bb b/meta-oe/recipes-test/fbtest/fb-test_1.1.0.bb index 6a9d4b2787..b19bba0156 100644 --- a/meta-oe/recipes-test/fbtest/fb-test_git.bb +++ b/meta-oe/recipes-test/fbtest/fb-test_1.1.0.bb @@ -1,12 +1,13 @@ SUMMARY = "Test suite for Linux framebuffer" -PV = "1.1.0" - -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" SRCREV = "063ec650960c2d79ac51f5c5f026cb05343a33e2" -SRC_URI = "git://github.com/prpplague/fb-test-app.git" +SRC_URI = "git://github.com//ponty/fb-test-app.git;branch=master;protocol=https" + +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" S = "${WORKDIR}/git" diff --git a/meta-oe/recipes-test/fwts/fwts/0001-Add-correct-printf-qualifier-for-off_t.patch b/meta-oe/recipes-test/fwts/fwts/0001-Add-correct-printf-qualifier-for-off_t.patch index c2d679aabc..41eaa239d1 100644 --- a/meta-oe/recipes-test/fwts/fwts/0001-Add-correct-printf-qualifier-for-off_t.patch +++ b/meta-oe/recipes-test/fwts/fwts/0001-Add-correct-printf-qualifier-for-off_t.patch @@ -1,16 +1,17 @@ -From 613e5cfe7751068062cc92f83870e436669fc0a8 Mon Sep 17 00:00:00 2001 +From ee787b53d734cd952c170c9303d213d3dd18a86f Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Thu, 8 Jun 2017 16:49:50 -0700 -Subject: [PATCH] Add correct printf qualifier for off_t +Subject: [PATCH 1/6] Add correct printf qualifier for off_t Signed-off-by: Khem Raj <raj.khem@gmail.com> - --- - src/bios/ebda_region/ebda_region.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) +Upstream-Status: Pending + + src/bios/ebda_region/ebda_region.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bios/ebda_region/ebda_region.c b/src/bios/ebda_region/ebda_region.c -index 16c39357..ad6d635c 100644 +index b70ced10..947a24bd 100644 --- a/src/bios/ebda_region/ebda_region.c +++ b/src/bios/ebda_region/ebda_region.c @@ -83,9 +83,9 @@ static int ebda_test1(fwts_framework *fw) @@ -25,14 +26,19 @@ index 16c39357..ad6d635c 100644 (entry->end_address - entry->start_address) / 1024, memory_map_name, entry->start_address, -@@ -93,8 +93,8 @@ static int ebda_test1(fwts_framework *fw) +@@ -93,9 +93,9 @@ static int ebda_test1(fwts_framework *fw) } else fwts_failed(fw, LOG_LEVEL_MEDIUM, "EBDAMappedNotReserved", - "EBDA region mapped at 0x%lx but not reserved in the %s table.", - ebda_addr, memory_map_name); +- + "EBDA region mapped at 0x%jdx but not reserved in the %s table.", + (intmax_t)ebda_addr, memory_map_name); - ++ return FWTS_OK; } + +-- +2.25.1 + diff --git a/meta-oe/recipes-test/fwts/fwts/0001-Include-poll.h-instead-of-deprecated-sys-poll.h.patch b/meta-oe/recipes-test/fwts/fwts/0001-Include-poll.h-instead-of-deprecated-sys-poll.h.patch deleted file mode 100644 index 4baefe4a4c..0000000000 --- a/meta-oe/recipes-test/fwts/fwts/0001-Include-poll.h-instead-of-deprecated-sys-poll.h.patch +++ /dev/null @@ -1,46 +0,0 @@ -From ed988c27efde5355c3ba9d0de8a14a4a40f798cc Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 6 Jun 2017 07:25:09 -0700 -Subject: [PATCH] Include poll.h instead of deprecated sys/poll.h - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - src/lib/src/fwts_ipmi.c | 3 ++- - src/lib/src/fwts_pipeio.c | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/lib/src/fwts_ipmi.c b/src/lib/src/fwts_ipmi.c -index a4c8a511..e298969e 100644 ---- a/src/lib/src/fwts_ipmi.c -+++ b/src/lib/src/fwts_ipmi.c -@@ -18,10 +18,11 @@ - * - */ - -+#include <poll.h> -+ - #include <sys/types.h> - #include <sys/stat.h> - #include <fcntl.h> --#include <sys/poll.h> - #include <sys/ioctl.h> - #include <linux/ipmi.h> - -diff --git a/src/lib/src/fwts_pipeio.c b/src/lib/src/fwts_pipeio.c -index 3b3cfaff..289564d1 100644 ---- a/src/lib/src/fwts_pipeio.c -+++ b/src/lib/src/fwts_pipeio.c -@@ -30,9 +30,9 @@ - #include <stdlib.h> - #include <string.h> - #include <paths.h> -+#include <poll.h> - - #include <sys/param.h> --#include <sys/poll.h> - #include <sys/types.h> - #include <sys/wait.h> - #include <errno.h> diff --git a/meta-oe/recipes-test/fwts/fwts/0001-Makefile.am-Add-missing-link-with-zlib.patch b/meta-oe/recipes-test/fwts/fwts/0001-Makefile.am-Add-missing-link-with-zlib.patch new file mode 100644 index 0000000000..358f7c424d --- /dev/null +++ b/meta-oe/recipes-test/fwts/fwts/0001-Makefile.am-Add-missing-link-with-zlib.patch @@ -0,0 +1,43 @@ +From dd97e711b13af6f770db27abec316d5c9271c777 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 12 Jun 2023 10:25:55 -0700 +Subject: [PATCH] Makefile.am: Add missing link with zlib + +It uses functions e.g. gzopen/gzclone/gzgets which are provided by zlib +therefore add it to linker flags. + +Fixes +| aarch64-yoe-linux-ld.lld: error: undefined reference due to --no-allow-shlib-undefined: gzgets +| >>> referenced by ../src/lib/src/.libs/libfwts.so +| +| aarch64-yoe-linux-ld.lld: error: undefined reference due to --no-allow-shlib-undefined: gzopen +| >>> referenced by ../src/lib/src/.libs/libfwts.so +| +| aarch64-yoe-linux-ld.lld: error: undefined reference due to --no-allow-shlib-undefined: gzclose +| >>> referenced by ../src/lib/src/.libs/libfwts.so +| clang-16: error: linker command failed with exit code 1 (use -v to see invocation) +| make[3]: *** [Makefile:2301: fwts] Error 1 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/lib/src/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am +index 76c48d4..45eea88 100644 +--- a/src/lib/src/Makefile.am ++++ b/src/lib/src/Makefile.am +@@ -30,7 +30,7 @@ pkglib_LTLIBRARIES = libfwts.la + libfwts_la_LDFLAGS = -version-info 1:0:0 + + libfwts_la_LIBADD = \ +- -lm -lpthread -lbsd \ ++ -lm -lpthread -lbsd -lz \ + @GIO_LIBS@ \ + @GLIB_LIBS@ + +-- +2.41.0 + diff --git a/meta-oe/recipes-test/fwts/fwts/0001-libfwtsiasl-Disable-parallel-builds-of-lex-bison-fil.patch b/meta-oe/recipes-test/fwts/fwts/0001-libfwtsiasl-Disable-parallel-builds-of-lex-bison-fil.patch new file mode 100644 index 0000000000..90bee3e722 --- /dev/null +++ b/meta-oe/recipes-test/fwts/fwts/0001-libfwtsiasl-Disable-parallel-builds-of-lex-bison-fil.patch @@ -0,0 +1,68 @@ +From 6135a318dd48787f1b6e1296c755d67575f44dc1 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 1 Dec 2022 15:18:55 -0800 +Subject: [PATCH] libfwtsiasl: Disable parallel builds of lex/bison files + +Since they are using mv cmds they maybe conflicting with each other in +highly parallelized build resulting in errors like + +| mv dtcompilerparser.tab.c dtcompilerparser.c +| mv dtcompilerparser.tab.c dtcompilerparser.c +| cp dtcompilerparser.tab.h dtcompilerparser.y.h +| mv dtcompilerparser.tab.c dtcompilerparser.c +| mv: cannot stat 'dtcompilerparser.tab.c': No such file or directory +| make[3]: *** [Makefile:4196: dtcompilerparser.c] Error 1 +| make[3]: *** Waiting for unfinished jobs.... +| mv: cannot stat 'dtcompilerparser.tab.c': No such file or directory +| make[3]: *** [Makefile:4194: dtcompilerparser.y.h] Error 1 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/libfwtsiasl/Makefile.am | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/src/libfwtsiasl/Makefile.am ++++ b/src/libfwtsiasl/Makefile.am +@@ -58,32 +58,24 @@ aslcompiler.y: $(ASL_PARSER) + aslcompilerlex.c: $(ASL_LEXER) + ${LEX} ${AM_LFLAGS} -PAslCompiler -o$@ $(top_srcdir)/src/acpica/source/compiler/aslcompiler.l + +-.NOTPARALLEL: aslcompiler.c ++.NOTPARALLEL: aslcompiler.c aslcompiler.y.h + aslcompiler.c aslcompiler.y.h: aslcompiler.y +- ${YACC} ${AM_YFLAGS} -d -baslcompiler -pAslCompiler $^ +- mv aslcompiler.tab.c aslcompiler.c +- cp aslcompiler.tab.h aslcompiler.y.h ++ ${YACC} ${AM_YFLAGS} -d -baslcompiler -pAslCompiler --header=aslcompiler.y.h --output=aslcompiler.c $^ + +-.NOTPARALLEL: dtcompilerparserlex.c ++.NOTPARALLEL: dtcompilerparserlex.c dtcompilerparser.c dtcompilerparser.y.h + dtcompilerparserlex.c dtcompilerparser.c dtcompilerparser.y.h: $(top_srcdir)/src/acpica/source/compiler/dtcompilerparser.l $(top_srcdir)/src/acpica/source/compiler/dtcompilerparser.y + ${LEX} ${AM_LFLAGS} -PDtCompilerParser -odtcompilerparserlex.c $< +- ${YACC} ${AM_YFLAGS} -bdtcompilerparser -pDtCompilerParser $(top_srcdir)/src/acpica/source/compiler/dtcompilerparser.y +- mv dtcompilerparser.tab.c dtcompilerparser.c +- cp dtcompilerparser.tab.h dtcompilerparser.y.h ++ ${YACC} ${AM_YFLAGS} -bdtcompilerparser -pDtCompilerParser --header=dtcompilerparser.y.h --output=dtcompilerparser.c $(top_srcdir)/src/acpica/source/compiler/dtcompilerparser.y + +-.NOTPARALLEL: dtparserlex.c ++.NOTPARALLEL: dtparserlex.c dtparser.c dtparser.y.h + dtparserlex.c dtparser.c dtparser.y.h: $(top_srcdir)/src/acpica/source/compiler/dtparser.l $(top_srcdir)/src/acpica/source/compiler/dtparser.y + ${LEX} ${AM_LFLAGS} -PDtParser -odtparserlex.c $< +- ${YACC} ${AM_YFLAGS} -bdtparser -pDtParser $(top_srcdir)/src/acpica/source/compiler/dtparser.y +- mv dtparser.tab.c dtparser.c +- cp dtparser.tab.h dtparser.y.h ++ ${YACC} ${AM_YFLAGS} -bdtparser -pDtParser --header=dtparser.y.h --output=dtparser.c $(top_srcdir)/src/acpica/source/compiler/dtparser.y + +-.NOTPARALLEL: prparserlex.c ++.NOTPARALLEL: prparserlex.c prparser.c prparser.y.h + prparserlex.c prparser.c prparser.y.h: $(top_srcdir)/src/acpica/source/compiler/prparser.l $(top_srcdir)/src/acpica/source/compiler/prparser.y + ${LEX} ${AM_LFLAGS} -PPrParser -oprparserlex.c $< +- ${YACC} ${AM_YFLAGS} -bprparser -pPrParser $(top_srcdir)/src/acpica/source/compiler/prparser.y +- mv prparser.tab.c prparser.c +- cp prparser.tab.h prparser.y.h ++ ${YACC} ${AM_YFLAGS} -bprparser -pPrParser --header=prparser.y.h --output=prparser.c $(top_srcdir)/src/acpica/source/compiler/prparser.y + + pkglib_LTLIBRARIES = libfwtsiasl.la + diff --git a/meta-oe/recipes-test/fwts/fwts/0001-Remove-Werror-from-build.patch b/meta-oe/recipes-test/fwts/fwts/0003-Remove-Werror-from-build.patch index 93a42213bb..610113e6fe 100644 --- a/meta-oe/recipes-test/fwts/fwts/0001-Remove-Werror-from-build.patch +++ b/meta-oe/recipes-test/fwts/fwts/0003-Remove-Werror-from-build.patch @@ -1,10 +1,9 @@ -From 475979cf5c1af978f4e8409666365ec75b3320ea Mon Sep 17 00:00:00 2001 +From 7317aba872f2bcf052a7db9fa3c7a7ce3c55dc6b Mon Sep 17 00:00:00 2001 From: Benjamin Berg <bberg@redhat.com> Date: Mon, 21 Aug 2017 10:34:40 +0200 -Subject: [PATCH] Remove -Werror from build +Subject: [PATCH 3/6] Remove -Werror from build Upstream-Status: Pending - --- src/Makefile.am | 2 +- src/lib/src/Makefile.am | 2 +- @@ -13,10 +12,10 @@ Upstream-Status: Pending --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -14,7 +14,7 @@ AM_CPPFLAGS = \ - `pkg-config --silence-errors --cflags json` \ - `pkg-config --silence-errors --cflags json-c` \ - -pthread `pkg-config --cflags glib-2.0 gio-2.0` \ +@@ -13,7 +13,7 @@ AM_CPPFLAGS = \ + -I$(top_srcdir)/efi_runtime \ + -I$(top_srcdir)/smccc_test \ + -pthread \ - -Wall -Werror -Wextra \ + -Wall -Wextra \ -Wno-address-of-packed-member \ @@ -24,12 +23,12 @@ Upstream-Status: Pending -Wno-long-long -Wredundant-decls -Wshadow \ --- a/src/lib/src/Makefile.am +++ b/src/lib/src/Makefile.am -@@ -25,7 +25,7 @@ AM_CPPFLAGS = \ - `pkg-config --silence-errors --cflags json-c` \ - `pkg-config --cflags glib-2.0 gio-2.0` \ +@@ -22,7 +22,7 @@ AM_CPPFLAGS = \ + -I$(top_srcdir)/src/acpica/source/include \ + -I$(top_srcdir)/src/acpica/source/compiler \ -DDATAROOTDIR=\"$(datarootdir)\" \ - -Wall -Werror -Wextra \ -+ -Wall -Wextra \ ++ -Wall -Wextra \ -Wno-address-of-packed-member pkglib_LTLIBRARIES = libfwts.la @@ -39,8 +38,8 @@ Upstream-Status: Pending # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # --AM_CPPFLAGS = -Wall -Werror -Wextra -DDATAROOTDIR=\"$(datarootdir)\" \ -+AM_CPPFLAGS = -Wall -Wextra -DDATAROOTDIR=\"$(datarootdir)\" \ - `pkg-config --silence-errors --cflags json` \ - `pkg-config --silence-errors --cflags json-c` +-AM_CPPFLAGS = -Wall -Werror -Wextra -DDATAROOTDIR=\"$(datarootdir)\" \ ++AM_CPPFLAGS = -Wall -Wextra -DDATAROOTDIR=\"$(datarootdir)\" \ + -I$(srcdir)/../lib/include + bin_PROGRAMS = kernelscan diff --git a/meta-oe/recipes-test/fwts/fwts/0002-Define-__SWORD_TYPE-if-not-defined-by-libc.patch b/meta-oe/recipes-test/fwts/fwts/0004-Define-__SWORD_TYPE-if-not-defined-by-libc.patch index b45e46a3d9..0c78e730e4 100644 --- a/meta-oe/recipes-test/fwts/fwts/0002-Define-__SWORD_TYPE-if-not-defined-by-libc.patch +++ b/meta-oe/recipes-test/fwts/fwts/0004-Define-__SWORD_TYPE-if-not-defined-by-libc.patch @@ -1,7 +1,7 @@ -From 1112e51d240a206bdcf253878ef1f4963b92da8a Mon Sep 17 00:00:00 2001 +From 9456f2f779d3ed4a134d55571d8bec78ad3b28c1 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Tue, 6 Jun 2017 07:37:20 -0700 -Subject: [PATCH] Define __SWORD_TYPE if not defined by libc +Subject: [PATCH 4/6] Define __SWORD_TYPE if not defined by libc __SWORD_TYPE is internal to glibc, therefore check and define it if needed e.g. on musl @@ -9,16 +9,13 @@ check and define it if needed e.g. on musl Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> - --- src/lib/src/fwts_uefi.c | 4 ++++ 1 file changed, 4 insertions(+) -diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c -index 544145fa..460b0b77 100644 --- a/src/lib/src/fwts_uefi.c +++ b/src/lib/src/fwts_uefi.c -@@ -59,6 +59,10 @@ typedef struct { +@@ -63,6 +63,10 @@ typedef struct { #define UEFI_IFACE_SYSFS (2) /* sysfs */ #define UEFI_IFACE_EFIVARS (3) /* efivar fs */ diff --git a/meta-oe/recipes-test/fwts/fwts/0003-Undefine-PAGE_SIZE.patch b/meta-oe/recipes-test/fwts/fwts/0005-Undefine-PAGE_SIZE.patch index 1d8c620efa..df768d1e9d 100644 --- a/meta-oe/recipes-test/fwts/fwts/0003-Undefine-PAGE_SIZE.patch +++ b/meta-oe/recipes-test/fwts/fwts/0005-Undefine-PAGE_SIZE.patch @@ -1,7 +1,7 @@ -From 244e9551ab9bbc1dfa91d19cd472ef254a94ae41 Mon Sep 17 00:00:00 2001 +From 53b9f97fb7faed043134f2ab738347b20379d32f Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Tue, 6 Jun 2017 07:39:28 -0700 -Subject: [PATCH] Undefine PAGE_SIZE +Subject: [PATCH 5/6] Undefine PAGE_SIZE musl defines PAGE_SIZE and build complains of multiple definitions @@ -9,16 +9,13 @@ of multiple definitions Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> - --- src/lib/src/fwts_acpi_tables.c | 1 + 1 file changed, 1 insertion(+) -diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c -index bdd224aa..58e982a6 100644 --- a/src/lib/src/fwts_acpi_tables.c +++ b/src/lib/src/fwts_acpi_tables.c -@@ -42,6 +42,7 @@ +@@ -40,6 +40,7 @@ #define BIOS_START (0x000e0000) /* Start of BIOS memory */ #define BIOS_END (0x000fffff) /* End of BIOS memory */ #define BIOS_LENGTH (BIOS_END - BIOS_START) /* Length of BIOS memory */ diff --git a/meta-oe/recipes-test/fwts/fwts/0003-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch b/meta-oe/recipes-test/fwts/fwts/0006-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch index bebbfa4ad1..b723b87c7a 100644 --- a/meta-oe/recipes-test/fwts/fwts/0003-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch +++ b/meta-oe/recipes-test/fwts/fwts/0006-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch @@ -1,25 +1,24 @@ -From 1848b8f8b9be500046ca5d632789a068d6151815 Mon Sep 17 00:00:00 2001 +From f723458eb649a9ad1d5d0e3dd6e801b284680fa7 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Thu, 8 Jun 2017 16:50:59 -0700 -Subject: [PATCH] use intptr_t to fix pointer-to-int-cast issues +Subject: [PATCH 6/6] use intptr_t to fix pointer-to-int-cast issues uintptr_t is guaranteed to be wide enough that converting a void* to uintptr_t and back again will yield the original pointer value Signed-off-by: Khem Raj <raj.khem@gmail.com> - --- +Upstream-Status: Pending + src/lib/src/fwts_acpi_tables.c | 4 ++-- src/lib/src/fwts_mmap.c | 2 +- - src/lib/src/fwts_smbios.c | 4 ++-- - 3 files changed, 5 insertions(+), 5 deletions(-) + src/lib/src/fwts_smbios.c | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) -diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c -index 58e982a6..6522032f 100644 --- a/src/lib/src/fwts_acpi_tables.c +++ b/src/lib/src/fwts_acpi_tables.c -@@ -156,7 +156,7 @@ static fwts_acpi_table_rsdp *fwts_acpi_get_rsdp(fwts_framework *fw, void *addr, +@@ -171,7 +171,7 @@ static fwts_acpi_table_rsdp *fwts_acpi_g return NULL; } @@ -28,7 +27,7 @@ index 58e982a6..6522032f 100644 return NULL; if (fwts_safe_memcpy(rsdp, mem, sizeof(fwts_acpi_table_rsdp)) != FWTS_OK) { -@@ -455,7 +455,7 @@ static int fwts_acpi_load_tables_from_firmware(fwts_framework *fw) +@@ -484,7 +484,7 @@ static int fwts_acpi_load_tables_from_fi if ((rsdp = fwts_acpi_get_rsdp(fw, rsdp_addr, &rsdp_len)) == NULL) return FWTS_ERROR; @@ -37,11 +36,9 @@ index 58e982a6..6522032f 100644 /* Load any tables from XSDT if it's valid */ if (rsdp->xsdt_address) { -diff --git a/src/lib/src/fwts_mmap.c b/src/lib/src/fwts_mmap.c -index e28abf87..2180b2cc 100644 --- a/src/lib/src/fwts_mmap.c +++ b/src/lib/src/fwts_mmap.c -@@ -81,7 +81,7 @@ int fwts_munmap(void *mem, const size_t size) +@@ -82,7 +82,7 @@ int fwts_munmap(void *mem, const size_t off_t offset; page_size = fwts_page_size(); @@ -50,25 +47,14 @@ index e28abf87..2180b2cc 100644 if (munmap((void *)((uint8_t *)mem - offset), size + offset) < 0) return FWTS_ERROR; -diff --git a/src/lib/src/fwts_smbios.c b/src/lib/src/fwts_smbios.c -index e5b3c774..c8134926 100644 --- a/src/lib/src/fwts_smbios.c +++ b/src/lib/src/fwts_smbios.c -@@ -55,7 +55,7 @@ static void *fwts_smbios_find_entry_uefi(fwts_framework *fw, fwts_smbios_entry * +@@ -78,7 +78,7 @@ static void *fwts_smbios_find_entry_uefi + if ((addr = fwts_scan_efi_systab(smbios)) != NULL) { fwts_smbios_entry *mapped_entry; - const size_t size = sizeof(fwts_smbios_entry); - if ((mapped_entry = fwts_mmap((off_t)addr, size)) != FWTS_MAP_FAILED) { + if ((mapped_entry = fwts_mmap((uintptr_t)addr, size)) != FWTS_MAP_FAILED) { if (fwts_safe_memcpy(entry, mapped_entry, size) == FWTS_OK) { (void)fwts_munmap(mapped_entry, size); *type = FWTS_SMBIOS; -@@ -91,7 +91,7 @@ static void *fwts_smbios30_find_entry_uefi(fwts_framework *fw, fwts_smbios30_ent - fwts_smbios30_entry *mapped_entry; - const size_t size = sizeof(fwts_smbios30_entry); - -- if ((mapped_entry = fwts_mmap((off_t)addr, size)) != FWTS_MAP_FAILED) { -+ if ((mapped_entry = fwts_mmap((uintptr_t)addr, size)) != FWTS_MAP_FAILED) { - if (fwts_safe_memread(mapped_entry, size) == FWTS_OK) { - *entry = *mapped_entry; - (void)fwts_munmap(mapped_entry, size); diff --git a/meta-oe/recipes-test/fwts/fwts_20.07.00.bb b/meta-oe/recipes-test/fwts/fwts_20.07.00.bb deleted file mode 100644 index 28565eb8ca..0000000000 --- a/meta-oe/recipes-test/fwts/fwts_20.07.00.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "Firmware testsuite" -DESCRIPTION = "The tool fwts comprises of over fifty tests that are designed to exercise and test different aspects of a machine's firmware. Many of these tests need super user access to read BIOS data and ACPI tables, so the tool requires running with super user privileges (e.g. with sudo)." -HOMEPAGE = "https://wiki.ubuntu.com/Kernel/Reference/fwts" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=16;md5=31da590f3e9f3bd34dcdb9e4db568519" - -SRC_URI = "http://fwts.ubuntu.com/release/fwts-V${PV}.tar.gz;subdir=${BP} \ - file://0001-Include-poll.h-instead-of-deprecated-sys-poll.h.patch \ - file://0002-Define-__SWORD_TYPE-if-not-defined-by-libc.patch \ - file://0003-Undefine-PAGE_SIZE.patch \ - file://0001-Add-correct-printf-qualifier-for-off_t.patch \ - file://0003-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch \ - file://0001-Remove-Werror-from-build.patch \ - " -SRC_URI[sha256sum] = "4a8e0211b388efbcfcb6530297e9a924d0afa2d6db58e9db2f031129eda6d66f" - -COMPATIBLE_HOST = "(i.86|x86_64|aarch64|powerpc64).*-linux" - -DEPENDS = "libpcre json-c glib-2.0 dtc bison-native libbsd" -DEPENDS_append_libc-musl = " libexecinfo" - -inherit autotools-brokensep bash-completion pkgconfig - -CFLAGS += "-I${STAGING_INCDIR}/json-c -Wno-error=unknown-pragmas" -LDFLAGS_append_libc-musl = " -lexecinfo" - -FILES_${PN} += "${libdir}/fwts/lib*${SOLIBS}" -FILES_${PN}-dev += "${libdir}/fwts/lib*${SOLIBSDEV} ${libdir}/fwts/lib*.la" -FILES_${PN}-staticdev += "${libdir}/fwts/lib*a" -FILES_${PN}-dbg += "${libdir}/fwts/.debug" - diff --git a/meta-oe/recipes-test/fwts/fwts_22.11.00.bb b/meta-oe/recipes-test/fwts/fwts_22.11.00.bb new file mode 100644 index 0000000000..2448082620 --- /dev/null +++ b/meta-oe/recipes-test/fwts/fwts_22.11.00.bb @@ -0,0 +1,36 @@ +SUMMARY = "Firmware testsuite" +DESCRIPTION = "The tool fwts comprises of over fifty tests that are designed to exercise and test different aspects of a machine's firmware. Many of these tests need super user access to read BIOS data and ACPI tables, so the tool requires running with super user privileges (e.g. with sudo)." +HOMEPAGE = "https://wiki.ubuntu.com/Kernel/Reference/fwts" + +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=16;md5=31da590f3e9f3bd34dcdb9e4db568519" + +SRC_URI = "http://fwts.ubuntu.com/release/fwts-V${PV}.tar.gz;subdir=${BP} \ + file://0001-Add-correct-printf-qualifier-for-off_t.patch \ + file://0003-Remove-Werror-from-build.patch \ + file://0004-Define-__SWORD_TYPE-if-not-defined-by-libc.patch \ + file://0005-Undefine-PAGE_SIZE.patch \ + file://0006-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch \ + file://0001-libfwtsiasl-Disable-parallel-builds-of-lex-bison-fil.patch \ + file://0001-Makefile.am-Add-missing-link-with-zlib.patch \ + " +SRC_URI[sha256sum] = "4af4e1e0f1ae9313297af722d744ba47a81c81bc5bdeab3f4f40837a39e4b808" + +COMPATIBLE_HOST = "(i.86|x86_64|aarch64|powerpc64).*-linux" + +DEPENDS = "libpcre glib-2.0 dtc bison-native flex-native libbsd" +DEPENDS:append:libc-musl = " libexecinfo" + +inherit autotools bash-completion pkgconfig + +LDFLAGS:append:libc-musl = " -lexecinfo" + +# We end up linker barfing with undefined symbols on ppc64 but not on other arches +# surprisingly +ASNEEDED:powerpc64le = "" + +FILES:${PN} += "${libdir}/fwts/lib*${SOLIBS}" +FILES:${PN}-dev += "${libdir}/fwts/lib*${SOLIBSDEV} ${libdir}/fwts/lib*.la" +FILES:${PN}-staticdev += "${libdir}/fwts/lib*a" + +RDEPENDS:${PN} += "dtc" diff --git a/meta-oe/recipes-test/googletest/googletest_1.15.2.bb b/meta-oe/recipes-test/googletest/googletest_1.15.2.bb new file mode 100644 index 0000000000..bc479268ba --- /dev/null +++ b/meta-oe/recipes-test/googletest/googletest_1.15.2.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "Google's framework for writing C++ tests" +HOMEPAGE = "https://github.com/google/googletest" +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=cbbd27594afd089daa160d3a16dd515a" + +PROVIDES += "gmock gtest" + +S = "${WORKDIR}/git" +SRCREV = "b514bdc898e2951020cbdca1304b75f5950d1f59" +SRC_URI = "git://github.com/google/googletest.git;branch=v1.15.x;protocol=https" + +inherit cmake pkgconfig + +# allow for shared libraries, but do not default to them +# +PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,," + +CXXFLAGS:append = " -fPIC" + +ALLOW_EMPTY:${PN} = "1" +ALLOW_EMPTY:${PN}-dbg = "1" + +# -staticdev will not be implicitly put into an SDK, so we add an rdepend +# if we are not building shared libraries +# +RDEPENDS:${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG","shared","","${PN}-staticdev",d)}" + +BBCLASSEXTEND = "native nativesdk" + +do_configure:prepend() { + # explicitly use python3 + # the scripts are already python3 compatible since https://github.com/google/googletest/commit/d404af0d987a9c38cafce82a7e26ec8468c88361 and other fixes like this + # but since this oe-core change http://git.openembedded.org/openembedded-core/commit/?id=5f8f16b17f66966ae91aeabc23e97de5ecd17447 + # there isn't python in HOSTTOOLS so "env python" fails + sed -i 's@^#!/usr/bin/env python$@#!/usr/bin/env python3@g' ${S}/googlemock/test/*py ${S}/googletest/test/*py +} diff --git a/meta-oe/recipes-test/googletest/googletest_git.bb b/meta-oe/recipes-test/googletest/googletest_git.bb deleted file mode 100644 index 354e7de337..0000000000 --- a/meta-oe/recipes-test/googletest/googletest_git.bb +++ /dev/null @@ -1,31 +0,0 @@ -DESCRIPTION = "Google's framework for writing C++ tests" -HOMEPAGE = "https://github.com/google/googletest" -SECTION = "libs" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://googlemock/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \ - file://googletest/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a" - -PV = "1.10.0" - -PROVIDES += "gmock gtest" - -S = "${WORKDIR}/git" -SRCREV = "703bd9caab50b139428cea1aaff9974ebee5742e" -SRC_URI = "git://github.com/google/googletest.git" - -inherit cmake - -ALLOW_EMPTY_${PN} = "1" -ALLOW_EMPTY_${PN}-dbg = "1" - -RDEPENDS_${PN}-dev += "${PN}-staticdev" - -BBCLASSEXTEND = "native nativesdk" - -do_configure_prepend() { - # explicitly use python3 - # the scripts are already python3 compatible since https://github.com/google/googletest/commit/d404af0d987a9c38cafce82a7e26ec8468c88361 and other fixes like this - # but since this oe-core change http://git.openembedded.org/openembedded-core/commit/?id=5f8f16b17f66966ae91aeabc23e97de5ecd17447 - # there isn't python in HOSTTOOLS so "env python" fails - sed -i 's@^#!/usr/bin/env python$@#!/usr/bin/env python3@g' ${S}/googlemock/scripts/*py ${S}/googlemock/scripts/generator/*py ${S}/googlemock/scripts/generator/cpp/*py ${S}/googlemock/test/*py ${S}/googletest/scripts/*py ${S}/googletest/test/*py -} diff --git a/meta-oe/recipes-test/libfaketime/libfaketime/0001-Makefile-Detect-compiler-in-makefile.patch b/meta-oe/recipes-test/libfaketime/libfaketime/0001-Makefile-Detect-compiler-in-makefile.patch new file mode 100644 index 0000000000..ff04837652 --- /dev/null +++ b/meta-oe/recipes-test/libfaketime/libfaketime/0001-Makefile-Detect-compiler-in-makefile.patch @@ -0,0 +1,45 @@ +From 735bb5d053efad274aa4ea5a6682e656ff792909 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 24 Aug 2023 01:49:48 -0700 +Subject: [PATCH] Makefile: Detect compiler in makefile + +Add compiler specific options based on detected compiler gcc/clang + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/Makefile | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index 62e924c..c15eb33 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -110,7 +110,23 @@ PREFIX ?= /usr/local + LIBDIRNAME ?= /lib/faketime + PLATFORM ?=$(shell uname) + +-CFLAGS += -std=gnu99 -Wall -Wextra -Werror -Wno-nonnull-compare -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_UTIME -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' $(FAKETIME_COMPILE_CFLAGS) ++ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1) ++COMPILER := clang ++else ++COMPILER := gcc ++endif ++export COMPILER ++ ++CFLAGS += -std=gnu99 -Wall -Wextra -Werror -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_UTIME -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' $(FAKETIME_COMPILE_CFLAGS) ++ ++ifeq ($(COMPILER),clang) ++CFLAGS += -Wno-tautological-pointer-compare ++endif ++ ++ifeq ($(COMPILER),gcc) ++CFLAGS += -Wno-nonnull-compare ++endif ++ + ifeq ($(PLATFORM),SunOS) + CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=600 + endif +-- +2.42.0 + diff --git a/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb b/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb new file mode 100644 index 0000000000..f13925ee18 --- /dev/null +++ b/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "A library for faking the system time in user-space programs" +SECTION = "libs" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRCREV = "d475b925943ad404c6c728ac868dc73949e7281c" + +SRC_URI = "git://github.com/wolfcw/libfaketime.git;branch=master;protocol=https \ + file://0001-Makefile-Detect-compiler-in-makefile.patch \ + " + +S = "${WORKDIR}/git" + +CFLAGS:append:libc-musl = " -D_LARGEFILE64_SOURCE" + +do_configure[noexec] = "1" +do_compile () { + oe_runmake +} +do_install () { + install -d ${D}${libdir}/faketime + oe_libinstall -C src libfaketime ${D}${libdir}/faketime + install -d ${D}${bindir} + install -m 0755 src/faketime ${D}${bindir} +} + +FILES:${PN} = "${bindir}/faketime ${libdir}/faketime/lib*${SOLIBS}" +FILES:${PN}-dev += "${libdir}/faketime/lib*${SOLIBSDEV}" diff --git a/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb b/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb new file mode 100644 index 0000000000..7346011158 --- /dev/null +++ b/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "Linux Serial Test Application" +HOMEPAGE = "https://github.com/cbrake/linux-serial-test" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSES/MIT;md5=544799d0b492f119fa04641d1b8868ed" + +SRC_URI = "git://github.com/cbrake/linux-serial-test.git;protocol=https;branch=master" + +PV = "0+git" +SRCREV = "2ee61484167eab846f7b7c565284d7c350d738d3" + +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + +S = "${WORKDIR}/git" + +inherit cmake diff --git a/meta-oe/recipes-test/pm-qa/pm-qa_git.bb b/meta-oe/recipes-test/pm-qa/pm-qa_git.bb index 7e9971ea4c..fc21e6192e 100644 --- a/meta-oe/recipes-test/pm-qa/pm-qa_git.bb +++ b/meta-oe/recipes-test/pm-qa/pm-qa_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Utilities for testing Power Management" HOMEPAGE = "https://wiki.linaro.org/WorkingGroups/PowerManagement/Resources/TestSuite/PmQa" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" PV = "0.5.2" @@ -42,6 +42,7 @@ do_install () { do # Remove hardcoded relative paths sed -i -e 's#..\/utils\/##' ${script} + sed -i -e 's#. ..\/Switches#${bindir}#g' ${script} script_basename=`basename ${script}` install -m 0755 $script ${D}${libdir}/${BPN}/${script_basename} @@ -54,7 +55,7 @@ do_install () { # if the script includes any helper scripts from the $libdir # directory then change the source path to the absolute path # to reflect the install location of the helper scripts. - sed -i -e "s#source ../include#source ${libdir}/${BPN}#g" ${script} + sed -i -e "s#. ../include#. ${libdir}/${BPN}#g" ${script} # Remove hardcoded relative paths sed -i -e 's#..\/utils\/##' ${script} @@ -62,7 +63,7 @@ do_install () { install -m 0755 $script ${D}${bindir}/${script_basename} done } -RDEPENDS_${PN} +="bash" +RDEPENDS:${PN} +="bash" # http://errors.yoctoproject.org/Errors/Details/186956/ -COMPATIBLE_HOST_libc-musl = 'null' +COMPATIBLE_HOST:libc-musl = 'null' diff --git a/meta-oe/recipes-test/shunit2/shunit2_2.1.8.bb b/meta-oe/recipes-test/shunit2/shunit2_2.1.8.bb new file mode 100644 index 0000000000..683600f712 --- /dev/null +++ b/meta-oe/recipes-test/shunit2/shunit2_2.1.8.bb @@ -0,0 +1,13 @@ +SUMMARY = "shUnit2 is a xUnit based unit test framework for Bourne based shell scripts" +HOMEPAGE = "https://github.com/kward/shunit2" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" + +SRC_URI = " git://github.com/kward/shunit2.git;branch=master;protocol=https" +SRCREV = "080159b303537888c5d41910b4d47a5002638e30" + +S = "${WORKDIR}/git" + +do_install() { + install -D -m 0755 ${S}/shunit2 ${D}${bindir}/shunit2 +} diff --git a/meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Include-missing-linux-falloc.h.patch b/meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Include-missing-linux-falloc.h.patch new file mode 100644 index 0000000000..23bfb9a5e2 --- /dev/null +++ b/meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Include-missing-linux-falloc.h.patch @@ -0,0 +1,37 @@ +From 9db789b4498d4130450e988757914c03e42b40f5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 19 Jun 2023 18:33:36 -0700 +Subject: [PATCH] executor: Include missing linux/falloc.h + +Its needed for FALLOC_FL_ZERO_RANGE which needs this header, it works +with glibc because fcntl.h includes this header indirectly, however the +failure comes to fore with musl C library where this header is not +included indirectly by other system headers, therefore include it as +required. + +Fixes +In file included from executor/common.h:505: +executor/common_linux.h:5604:16: error: use of undeclared identifier 'FALLOC_FL_ZERO_RANGE' + fallocate(fd, FALLOC_FL_ZERO_RANGE, 0, SWAP_FILE_SIZE); + ^ +Upstream-Status: Submitted [https://github.com/google/syzkaller/pull/3974] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + executor/common_linux.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/executor/common_linux.h b/executor/common_linux.h +index d5152e058..9ae3fb159 100644 +--- a/executor/common_linux.h ++++ b/executor/common_linux.h +@@ -5585,6 +5585,7 @@ static long syz_pkey_set(volatile long pkey, volatile long val) + #include <sys/stat.h> + #include <sys/swap.h> + #include <sys/types.h> ++#include <linux/falloc.h> + + #define SWAP_FILE "./swap-file" + #define SWAP_FILE_SIZE (128 * 1000 * 1000) // 128 MB. +-- +2.41.0 + diff --git a/meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Remove-including-error.h-in-test_linux.h.patch b/meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Remove-including-error.h-in-test_linux.h.patch new file mode 100644 index 0000000000..8bb19fb72b --- /dev/null +++ b/meta-oe/recipes-test/syzkaller/syzkaller/0001-executor-Remove-including-error.h-in-test_linux.h.patch @@ -0,0 +1,29 @@ +From 648868595cf290e77aab1f271db2a57e1f791301 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 20 May 2024 20:37:07 -0700 +Subject: [PATCH] executor: Remove including <error.h> in test_linux.h + +it seems to be redundant and moreover it lets us compile on musl which +does not provide this system header + +Upstream-Status: Submitted [https://github.com/google/syzkaller/pull/4822] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + executor/test_linux.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/executor/test_linux.h b/executor/test_linux.h +index 7cf459569..8c9493539 100644 +--- a/executor/test_linux.h ++++ b/executor/test_linux.h +@@ -1,7 +1,6 @@ + // Copyright 2017 syzkaller project authors. All rights reserved. + // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +-#include <error.h> + #include <stdint.h> + #include <sys/utsname.h> + +-- +2.45.1 + diff --git a/meta-oe/recipes-test/syzkaller/syzkaller/0001-sys-targets-targets.go-allow-users-to-override-hardc.patch b/meta-oe/recipes-test/syzkaller/syzkaller/0001-sys-targets-targets.go-allow-users-to-override-hardc.patch new file mode 100644 index 0000000000..61f4351651 --- /dev/null +++ b/meta-oe/recipes-test/syzkaller/syzkaller/0001-sys-targets-targets.go-allow-users-to-override-hardc.patch @@ -0,0 +1,62 @@ +From aca1030d29f627314d13884ebc7b2c313d718df7 Mon Sep 17 00:00:00 2001 +From: Ovidiu Panait <ovidiu.panait@windriver.com> +Date: Wed, 13 Apr 2022 17:17:54 +0300 +Subject: [PATCH] sys/targets/targets.go: allow users to override hardcoded + cross-compilers + +Currently, cross compiler names are hardcoded for each os/arch combo. However, +toolchain tuples differ, especially when using vendor provided toolchains. +Allow users to specify the cross compiler for an os/arch combo using +SYZ_CC_<os>_<arch> environment variables. + +Also, remove hardcoded "-march=armv6" flag to fix compilation on arm. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> +--- + sys/targets/targets.go | 19 +++++++++++-------- + 1 file changed, 11 insertions(+), 8 deletions(-) + +--- a/sys/targets/targets.go ++++ b/sys/targets/targets.go +@@ -262,7 +262,6 @@ var List = map[string]map[string]*Target + PtrSize: 4, + PageSize: 4 << 10, + LittleEndian: true, +- CFlags: []string{"-D__LINUX_ARM_ARCH__=6", "-march=armv6"}, + Triple: "arm-linux-gnueabi", + KernelArch: "arm", + KernelHeaderArch: "arm", +@@ -700,12 +699,16 @@ func initTarget(target *Target, OS, arch + for i := range target.CFlags { + target.replaceSourceDir(&target.CFlags[i], sourceDir) + } +- if OS == Linux && arch == runtime.GOARCH { +- // Don't use cross-compiler for native compilation, there are cases when this does not work: +- // https://github.com/google/syzkaller/pull/619 +- // https://github.com/google/syzkaller/issues/387 +- // https://github.com/google/syzkaller/commit/06db3cec94c54e1cf720cdd5db72761514569d56 +- target.Triple = "" ++ if OS == Linux { ++ if cc := os.Getenv("SYZ_CC_" + OS + "_" + arch); cc != "" { ++ target.CCompiler = cc ++ } else if arch == runtime.GOARCH { ++ // Don't use cross-compiler for native compilation, there are cases when this does not work: ++ // https://github.com/google/syzkaller/pull/619 ++ // https://github.com/google/syzkaller/issues/387 ++ // https://github.com/google/syzkaller/commit/06db3cec94c54e1cf720cdd5db72761514569d56 ++ target.Triple = "" ++ } + } + if target.CCompiler == "" { + target.setCompiler(useClang) +@@ -839,7 +842,7 @@ func (target *Target) lazyInit() { + // On CI we want to fail loudly if cross-compilation breaks. + // Also fail if SOURCEDIR_GOOS is set b/c in that case user probably assumes it will work. + if (target.OS != runtime.GOOS || !runningOnCI) && getSourceDir(target) == "" { +- if _, err := exec.LookPath(target.CCompiler); err != nil { ++ if _, err := exec.LookPath(strings.Fields(target.CCompiler)[0]); err != nil { + target.BrokenCompiler = fmt.Sprintf("%v is missing (%v)", target.CCompiler, err) + return + } diff --git a/meta-oe/recipes-test/syzkaller/syzkaller_git.bb b/meta-oe/recipes-test/syzkaller/syzkaller_git.bb new file mode 100644 index 0000000000..4043ab7ea5 --- /dev/null +++ b/meta-oe/recipes-test/syzkaller/syzkaller_git.bb @@ -0,0 +1,86 @@ +DESCRIPTION = "syzkaller is an unsupervised coverage-guided kernel fuzzer" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=5335066555b14d832335aa4660d6c376" + +inherit go-mod + +GO_IMPORT = "github.com/google/syzkaller" + +SRC_URI = "git://${GO_IMPORT};protocol=https;destsuffix=${BPN}-${PV}/src/${GO_IMPORT};branch=master \ + file://0001-sys-targets-targets.go-allow-users-to-override-hardc.patch;patchdir=src/${GO_IMPORT} \ + file://0001-executor-Include-missing-linux-falloc.h.patch;patchdir=src/${GO_IMPORT} \ + file://0001-executor-Remove-including-error.h-in-test_linux.h.patch;patchdir=src/${GO_IMPORT} \ + " +SRCREV = "25905f5d0a2a7883bd33491997556193582c6059" + +# Upstream repo does not tag +UPSTREAM_CHECK_COMMITS = "1" + +export GOPROXY = "https://proxy.golang.org,direct" +# Workaround for network access issue during compile step. +# This needs to be fixed in the recipes buildsystem so that +# it can be accomplished during do_fetch task. +do_compile[network] = "1" + +COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64).*-linux" + +B = "${S}/src/${GO_IMPORT}/bin" + +GO_EXTRA_LDFLAGS += ' -X ${GO_IMPORT}/prog.GitRevision=${SRCREV}' + +export GOHOSTFLAGS="${GO_LINKSHARED} ${GOBUILDFLAGS}" +export GOTARGETFLAGS="${GO_LINKSHARED} ${GOBUILDFLAGS}" +export TARGETOS = '${GOOS}' +export TARGETARCH = '${GOARCH}' +export TARGETVMARCH = '${GOARCH}' + +CGO_ENABLED = "1" + +LDFLAGS:append:class-target = "${@bb.utils.contains_any("TC_CXX_RUNTIME", "llvm android", " -lc++", " -lstdc++", d)}" + +DEPENDS:class-native += "qemu-system-native" + +do_compile:class-native() { + export HOSTOS="${GOHOSTOS}" + export HOSTARCH="${GOHOSTARCH}" + + oe_runmake HOSTGO="${GO}" host +} + +do_compile:class-target() { + export HOSTOS="${GOOS}" + export HOSTARCH="${GOARCH}" + export SYZ_CC_${TARGETOS}_${TARGETARCH}="${CC}" + + # Unset GOOS and GOARCH so that the correct syz-sysgen binary can be + # generated. Fixes: + # go install: cannot install cross-compiled binaries when GOBIN is set + unset GOOS + unset GOARCH + + oe_runmake GO="${GO}" CFLAGS="${CXXFLAGS} ${LDFLAGS}" REV=${SRCREV} target +} + +do_install:class-native() { + SYZ_BINS_NATIVE="syz-manager syz-runtest syz-repro syz-mutate syz-prog2c \ + syz-db syz-upgrade" + + install -d ${D}${bindir} + + for i in ${SYZ_BINS_NATIVE}; do + install -m 0755 ${B}/${i} ${D}${bindir} + done +} + +do_install:class-target() { + SYZ_TARGET_DIR="${TARGETOS}_${TARGETARCH}" + SYZ_BINS_TARGET="syz-fuzzer syz-execprog syz-stress syz-executor" + + install -d ${D}${bindir}/${SYZ_TARGET_DIR} + + for i in ${SYZ_BINS_TARGET}; do + install -m 0755 ${B}/${SYZ_TARGET_DIR}/${i} ${D}${bindir}/${SYZ_TARGET_DIR} + done +} + +BBCLASSEXTEND += "native" diff --git a/meta-oe/recipes-test/testfloat/files/0001-Makefile-for-cross-compile-SoftFloat.patch b/meta-oe/recipes-test/testfloat/files/0001-Makefile-for-cross-compile-SoftFloat.patch index 9f41bf2da0..908a352d0b 100644 --- a/meta-oe/recipes-test/testfloat/files/0001-Makefile-for-cross-compile-SoftFloat.patch +++ b/meta-oe/recipes-test/testfloat/files/0001-Makefile-for-cross-compile-SoftFloat.patch @@ -9,6 +9,8 @@ from Fabio Berton <fabio.berton@ossystems.com.br>. Signed-off-by: Zong Li <zongbox@gmail.com> --- +Upstream-Status: Pending + SoftFloat-3e/build/Linux-Cross-Compile/Makefile | 325 ++++++++++++++++++++++ SoftFloat-3e/build/Linux-Cross-Compile/platform.h | 52 ++++ 2 files changed, 377 insertions(+) diff --git a/meta-oe/recipes-test/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch b/meta-oe/recipes-test/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch index b7d861f8fc..c99ba71b37 100644 --- a/meta-oe/recipes-test/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch +++ b/meta-oe/recipes-test/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch @@ -9,6 +9,8 @@ from Fabio Berton <fabio.berton@ossystems.com.br>. Signed-off-by: Zong Li <zongbox@gmail.com> --- +Upstream-Status: Pending + TestFloat-3e/build/Linux-Cross-Compile/Makefile | 353 ++++++++++++++++++++++ TestFloat-3e/build/Linux-Cross-Compile/platform.h | 48 +++ 2 files changed, 401 insertions(+) diff --git a/meta-oe/recipes-test/testfloat/testfloat_3e.bb b/meta-oe/recipes-test/testfloat/testfloat_3e.bb index 48f50d8274..f5aace4d33 100644 --- a/meta-oe/recipes-test/testfloat/testfloat_3e.bb +++ b/meta-oe/recipes-test/testfloat/testfloat_3e.bb @@ -19,7 +19,10 @@ SRC_URI[TestFloat.sha256sum] = "6d4bdf0096b48a653aa59fc203a9e5fe18b5a58d7a1b7151 SRC_URI[SoftFloat.md5sum] = "7dac954ea4aed0697cbfee800ba4f492" SRC_URI[SoftFloat.sha256sum] = "21130ce885d35c1fe73fc1e1bf2244178167e05c6747cad5f450cc991714c746" -S = "${WORKDIR}" +UPSTREAM_CHECK_URI = "http://www.jhauser.us/arithmetic/TestFloat.html" + +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_compile(){ oe_runmake -C SoftFloat-${PV}/build/Linux-Cross-Compile/ diff --git a/meta-oe/recipes-test/trompeloeil/trompeloeil_v47.bb b/meta-oe/recipes-test/trompeloeil/trompeloeil_v47.bb new file mode 100644 index 0000000000..788a15dba2 --- /dev/null +++ b/meta-oe/recipes-test/trompeloeil/trompeloeil_v47.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "A popular statically typed mocking framework for C++14 and later" +HOMEPAGE = "https://trompeloeil.github.io" +LICENSE = "BSL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c" + +SRC_URI = "git://github.com/rollbear/trompeloeil.git;branch=main;protocol=https" +SRCREV = "ad9bc41b1e01ae92802de59a12d19cf7c8683d6d" + +S = "${WORKDIR}/git" + +inherit cmake + +# Header-only library +RDEPENDS:${PN}-dev = "" +RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" |