diff options
author | Mark Hatle <mark.hatle@amd.com> | 2024-07-26 11:22:33 -0500 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2024-08-06 19:11:18 -0700 |
commit | c80d82054e9c34305d3372b9c644b147187b36e9 (patch) | |
tree | 0b3a550422c4f53ac5a4a9ccdfe4b4d8a31330c6 /meta-selftest | |
parent | 0d017528d4477172a34d7a805cf4888e642708d8 (diff) | |
download | poky-c80d82054e9c34305d3372b9c644b147187b36e9.tar.gz |
selftest-hardlink: Add additional test cases
Additional test cases for debug symlink generation both binaries
and static libraries.
This also has the side effect of testing for race conditions in the
hardlink debug generation and stripping.
(From OE-Core rev: 39823d3211411e661320e1164ba4c50370804425)
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 7171f41c07a39a7543bb64f075d38b8e74563089)
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta-selftest')
-rw-r--r-- | meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb index be346b8a0e..052bf0c92a 100644 --- a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb +++ b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb | |||
@@ -10,6 +10,9 @@ S = "${WORKDIR}" | |||
10 | 10 | ||
11 | do_compile () { | 11 | do_compile () { |
12 | ${CC} hello.c -o hello1 ${CFLAGS} ${LDFLAGS} | 12 | ${CC} hello.c -o hello1 ${CFLAGS} ${LDFLAGS} |
13 | |||
14 | ${CC} hello.c -c -o hello.o ${CFLAGS} | ||
15 | ${AR} rcs libhello.a hello.o | ||
13 | } | 16 | } |
14 | 17 | ||
15 | do_install () { | 18 | do_install () { |
@@ -22,9 +25,19 @@ do_install () { | |||
22 | ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello3 | 25 | ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello3 |
23 | ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello4 | 26 | ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello4 |
24 | 27 | ||
28 | # We need so many hardlink copies to look for specific race conditions | ||
29 | install -d ${D}${libdir} | ||
30 | install -m 0644 libhello.a ${D}${libdir} | ||
31 | for num in `seq 1 100` ; do | ||
32 | ln ${D}${libdir}/libhello.a ${D}${libdir}/libhello-${num}.a | ||
33 | done | ||
34 | |||
25 | dd if=/dev/zero of=${D}${bindir}/sparsetest bs=1 count=0 seek=1M | 35 | dd if=/dev/zero of=${D}${bindir}/sparsetest bs=1 count=0 seek=1M |
26 | } | 36 | } |
27 | 37 | ||
28 | RDEPENDS:${PN}-gdb += "gdb" | 38 | RDEPENDS:${PN}-gdb += "gdb" |
29 | PACKAGES =+ "${PN}-gdb" | 39 | PACKAGES =+ "${PN}-gdb" |
30 | FILES:${PN}-gdb = "${bindir}/gdb.sh" | 40 | FILES:${PN}-gdb = "${bindir}/gdb.sh" |
41 | |||
42 | PACKAGE_STRIP_STATIC = "1" | ||
43 | PACKAGE_DEBUG_STATIC_SPLIT = "1" | ||