Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libstorage-ng for openSUSE:Factory 
checked in at 2023-10-29 19:39:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old)
 and      /work/SRC/openSUSE:Factory/.libstorage-ng.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libstorage-ng"

Sun Oct 29 19:39:47 2023 rev:243 rq:1120885 version:4.5.155

Changes:
--------
--- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes      
2023-10-27 22:28:02.187169549 +0200
+++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.17445/libstorage-ng.changes   
2023-10-29 19:40:01.207490586 +0100
@@ -1,0 +2,7 @@
+Sat Oct 28 07:23:46 UTC 2023 - aschn...@suse.com
+
+- merge gh#openSUSE/libstorage-ng#963
+- extended testsuite
+- 4.5.155
+
+--------------------------------------------------------------------

Old:
----
  libstorage-ng-4.5.154.tar.xz

New:
----
  libstorage-ng-4.5.155.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libstorage-ng.spec ++++++
--- /var/tmp/diff_new_pack.zF1iB2/_old  2023-10-29 19:40:01.967518235 +0100
+++ /var/tmp/diff_new_pack.zF1iB2/_new  2023-10-29 19:40:01.971518381 +0100
@@ -18,7 +18,7 @@
 
 %define libname %{name}1
 Name:           libstorage-ng
-Version:        4.5.154
+Version:        4.5.155
 Release:        0
 Summary:        Library for storage management
 License:        GPL-2.0-only

++++++ libstorage-ng-4.5.154.tar.xz -> libstorage-ng-4.5.155.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.154/VERSION 
new/libstorage-ng-4.5.155/VERSION
--- old/libstorage-ng-4.5.154/VERSION   2023-10-27 16:52:32.000000000 +0200
+++ new/libstorage-ng-4.5.155/VERSION   2023-10-28 09:23:46.000000000 +0200
@@ -1 +1 @@
-4.5.154
+4.5.155
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.154/storage/Utils/SystemCmd.cc 
new/libstorage-ng-4.5.155/storage/Utils/SystemCmd.cc
--- old/libstorage-ng-4.5.154/storage/Utils/SystemCmd.cc        2023-10-27 
16:52:32.000000000 +0200
+++ new/libstorage-ng-4.5.155/storage/Utils/SystemCmd.cc        2023-10-28 
09:23:46.000000000 +0200
@@ -306,6 +306,8 @@
        _files[IDX_STDERR] = _files[IDX_STDOUT] = NULL;
        invalidate();
 
+       // TODO use RAII for pipes
+
        int child_failure_info_pipe[2];
        if (pipe(child_failure_info_pipe) != 0)
            SYSCALL_FAILED("pipe child_failure_info creation failed");
@@ -419,7 +421,7 @@
                default: // parent process
                {
                    if (close(child_failure_info_pipe[1]) != 0)
-                       SYSCALL_FAILED("close(childfailureinfo_pipe) failed");
+                       SYSCALL_FAILED("close(child_failure_info_pipe[1]) 
failed");
 
                    // Read ChildFailureInfo. If the exec in the child 
succeeded the pipe
                    // was closed (due to CLOEXEC) and reading fails. If the 
exec in the
@@ -434,6 +436,9 @@
                              stringerror(child_failure_info.errnum));
                    }
 
+                   if (close(child_failure_info_pipe[0]) != 0)
+                       SYSCALL_FAILED("close(child_failure_info_pipe[0]) 
failed");
+
                    if ( close( sin[0] ) < 0 )
                    {
                        SYSCALL_FAILED_NOTHROW( "close( stdin ) in parent 
failed" );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.154/testsuite/Utils/systemcmd.cc 
new/libstorage-ng-4.5.155/testsuite/Utils/systemcmd.cc
--- old/libstorage-ng-4.5.154/testsuite/Utils/systemcmd.cc      2023-10-27 
16:52:32.000000000 +0200
+++ new/libstorage-ng-4.5.155/testsuite/Utils/systemcmd.cc      2023-10-28 
09:23:46.000000000 +0200
@@ -5,6 +5,7 @@
 #include <boost/test/unit_test.hpp>
 #include <boost/algorithm/string.hpp>
 
+#include <fcntl.h>
 #include <iostream>
 #include <string>
 #include <vector>
@@ -243,12 +244,33 @@
 }
 
 
+int
+num_open_fds()
+{
+    const int max_fd = getdtablesize();
+
+    int n = 0;
+
+    for (int fd = 0; fd < max_fd; ++fd)
+        if (fcntl(fd, F_GETFD) == 0)
+         ++n;
+
+    return n;
+}
+
+
 BOOST_AUTO_TEST_CASE(close_fds)
 {
+    // stdin, stdout and stderr - fails with valgrind
+    BOOST_CHECK_EQUAL(num_open_fds(), 3);
+
     SystemCmd cmd({ LS_BIN, "-1", "/proc/self/fd/" });
 
     BOOST_CHECK_EQUAL(cmd.retcode(), 0);
 
     // stdin, stdout, stderr and an fd resulting from the opendir in ls
     BOOST_CHECK_EQUAL(cmd.stdout().size(), 4);
+
+    // still only stdin, stdout and stderr - fails with valgrind
+    BOOST_CHECK_EQUAL(num_open_fds(), 3);
 }

Reply via email to