diff options
author | Mark Hatle <mark.hatle@amd.com> | 2024-07-19 13:58:18 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-07-22 16:53:06 +0100 |
commit | 4462724cab96ed3990fdf9b30edcea2adc9095ee (patch) | |
tree | 006ca075dfb356b80fe2371490bd20d47a0a10d3 /meta-selftest | |
parent | fa894486a99237b56469354c24ef913a96753aaf (diff) | |
download | poky-4462724cab96ed3990fdf9b30edcea2adc9095ee.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: 7171f41c07a39a7543bb64f075d38b8e74563089)
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>
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 5632bdac7a..64fea8ed95 100644 --- a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb +++ b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb | |||
@@ -11,6 +11,9 @@ UNPACKDIR = "${S}" | |||
11 | 11 | ||
12 | do_compile () { | 12 | do_compile () { |
13 | ${CC} hello.c -o hello1 ${CFLAGS} ${LDFLAGS} | 13 | ${CC} hello.c -o hello1 ${CFLAGS} ${LDFLAGS} |
14 | |||
15 | ${CC} hello.c -c -o hello.o ${CFLAGS} | ||
16 | ${AR} rcs libhello.a hello.o | ||
14 | } | 17 | } |
15 | 18 | ||
16 | do_install () { | 19 | do_install () { |
@@ -23,9 +26,19 @@ do_install () { | |||
23 | ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello3 | 26 | ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello3 |
24 | ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello4 | 27 | ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello4 |
25 | 28 | ||
29 | # We need so many hardlink copies to look for specific race conditions | ||
30 | install -d ${D}${libdir} | ||
31 | install -m 0644 libhello.a ${D}${libdir} | ||
32 | for num in `seq 1 100` ; do | ||
33 | ln ${D}${libdir}/libhello.a ${D}${libdir}/libhello-${num}.a | ||
34 | done | ||
35 | |||
26 | dd if=/dev/zero of=${D}${bindir}/sparsetest bs=1 count=0 seek=1M | 36 | dd if=/dev/zero of=${D}${bindir}/sparsetest bs=1 count=0 seek=1M |
27 | } | 37 | } |
28 | 38 | ||
29 | RDEPENDS:${PN}-gdb += "gdb" | 39 | RDEPENDS:${PN}-gdb += "gdb" |
30 | PACKAGES =+ "${PN}-gdb" | 40 | PACKAGES =+ "${PN}-gdb" |
31 | FILES:${PN}-gdb = "${bindir}/gdb.sh" | 41 | FILES:${PN}-gdb = "${bindir}/gdb.sh" |
42 | |||
43 | PACKAGE_STRIP_STATIC = "1" | ||
44 | PACKAGE_DEBUG_STATIC_SPLIT = "1" | ||