Fix elf/loadfail test build dependencies

Message ID 20220128133617.4077738-1-szabolcs.nagy@arm.com
State Committed
Commit 1d1ce7d637fdeb911f82d10f6a23287b5dca2a3b
Headers
Series Fix elf/loadfail test build dependencies |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent
dj/TryBot-32bit success Build for i686

Commit Message

Szabolcs Nagy Jan. 28, 2022, 1:36 p.m. UTC
  There was no direct or indirect make dependency on testobj3.so so the
test could fail with

/B/elf/loadfail: failed to load shared object: testobj3.so: cannot open
 shared object file: No such file or directory
---
 elf/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Comments

Carlos O'Donell Jan. 28, 2022, 5:20 p.m. UTC | #1
On 1/28/22 08:36, Szabolcs Nagy via Libc-alpha wrote:
> There was no direct or indirect make dependency on testobj3.so so the
> test could fail with
> 
> /B/elf/loadfail: failed to load shared object: testobj3.so: cannot open
>  shared object file: No such file or directory

Good catch. OK for glibc 2.35.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> ---
>  elf/Makefile | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/elf/Makefile b/elf/Makefile
> index 718e826290..1fa1a519a5 100644
> --- a/elf/Makefile
> +++ b/elf/Makefile
> @@ -1468,7 +1468,9 @@ preloadtest-ENV = \
>  
>  LDFLAGS-loadfail = -rdynamic
>  
> -$(objpfx)loadfail.out: $(objpfx)failobj.so
> +$(objpfx)loadfail.out: $(objpfx)failobj.so $(objpfx)testobj1.so \
> +		       $(objpfx)testobj2.so $(objpfx)testobj3.so \
> +		       $(objpfx)testobj4.so $(objpfx)testobj5.so
>  
>  LDFLAGS-multiload = -rdynamic
>  CFLAGS-multiload.c += -DOBJDIR=\"$(elf-objpfx)\"
  

Patch

diff --git a/elf/Makefile b/elf/Makefile
index 718e826290..1fa1a519a5 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -1468,7 +1468,9 @@  preloadtest-ENV = \
 
 LDFLAGS-loadfail = -rdynamic
 
-$(objpfx)loadfail.out: $(objpfx)failobj.so
+$(objpfx)loadfail.out: $(objpfx)failobj.so $(objpfx)testobj1.so \
+		       $(objpfx)testobj2.so $(objpfx)testobj3.so \
+		       $(objpfx)testobj4.so $(objpfx)testobj5.so
 
 LDFLAGS-multiload = -rdynamic
 CFLAGS-multiload.c += -DOBJDIR=\"$(elf-objpfx)\"