[COMMITTED] debuginfod_find_section: Always update rc with most recent error code

2022-11-04 Thread Aaron Merey via Elfutils-devel
debuginfod_find_section may attempt to download both the debuginfo
and executable matching the given build-id.  If neither of these
files can be found, update rc to ensure that we always return an
accurate error code in this case.

Signed-off-by: Aaron Merey 
---
 debuginfod/ChangeLog   | 5 +
 debuginfod/debuginfod-client.c | 6 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog
index 4d576cae..5678002a 100644
--- a/debuginfod/ChangeLog
+++ b/debuginfod/ChangeLog
@@ -1,3 +1,8 @@
+2022-11-04  Aaron Merey  
+
+   * debuginfod-client.c (debuginfod_find_section): Ensure rc
+   is always updated with the most recent error code.
+
 2022-11-03  Frank Ch. Eigler 
 
* debuginfod.cxx (handle_buildid): Correctly manage lifetime
diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
index f48e32cc..99da05ef 100644
--- a/debuginfod/debuginfod-client.c
+++ b/debuginfod/debuginfod-client.c
@@ -1944,7 +1944,8 @@ debuginfod_find_section (debuginfod_client *client,
 
   if (rc == -EEXIST)
 {
-  /* The section should be found in the executable.  */
+  /* Either the debuginfo couldn't be found or the section should
+be in the executable.  */
   fd = debuginfod_find_executable (client, build_id,
   build_id_len, &tmp_path);
   if (fd > 0)
@@ -1952,6 +1953,9 @@ debuginfod_find_section (debuginfod_client *client,
  rc = extract_section (fd, section, tmp_path, path);
  close (fd);
}
+  else
+   /* Update rc so that we return the most recent error code.  */
+   rc = fd;
 }
 
   free (tmp_path);
-- 
2.37.3



☠ Buildbot (GNU Toolchain): elfutils - failed test (failure) (master)

2022-11-04 Thread builder--- via Elfutils-devel
A new failure has been detected on builder elfutils-centos-x86_64 while 
building elfutils.

Full details are available at:
https://builder.sourceware.org/buildbot/#builders/39/builds/105

Build state: failed test (failure)
Revision: 4628be9e03db78eaf2b02e9aa6cc677a0b4319ea
Worker: centos-x86_64
Build Reason: (unknown)
Blamelist: Aaron Merey 

Steps:

- 0: worker_preparation ( success )

- 1: set package name ( success )

- 2: git checkout ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/2/logs/stdio

- 3: autoreconf ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/3/logs/stdio

- 4: configure ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/4/logs/stdio

- 5: get version ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/5/logs/stdio
- property changes: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/5/logs/property_changes

- 6: make ( warnings )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/6/logs/stdio
- warnings (2): 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/6/logs/warnings__2_

- 7: make check ( failure )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/7/logs/stdio
- test-suite.log: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/7/logs/test-suite_log

- 8: prep ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/8/logs/stdio

- 9: build bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/9/logs/stdio

- 10: fetch bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/10/logs/stdio

- 11: unpack bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/11/logs/stdio

- 12: pass .bunsen.source.gitname ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/12/logs/stdio

- 13: pass .bunsen.source.gitdescribe ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/13/logs/stdio

- 14: pass .bunsen.source.gitbranch ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/14/logs/stdio

- 15: pass .bunsen.source.gitrepo ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/15/logs/stdio

- 16: upload to bunsen ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/16/logs/stdio

- 17: clean up ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/17/logs/stdio

- 18: make distclean ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/105/steps/18/logs/stdio