[gparted] Prevent file system tests core dumping in GitLab CI Ubuntu image (!49)



commit f2165fd44dd329e61ec0fee6ddb26939ee2bbe61
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Wed Oct 16 07:36:41 2019 +0100

    Prevent file system tests core dumping in GitLab CI Ubuntu image (!49)
    
    With the previous commit, execution of test_SupportedFileSystems is
    failing in the GitLab CI Ubuntu image.  Fragment from file
    tests/test-suite.log:
    
        FAIL: test_SupportedFileSystems
        ===============================
    
        Terminate called after throwing an instance of 'Glib::ConvertError'
        Aborted (core dumped)
        FAIL test_SupportedFileSystems (exit status: 134)
    
    This core dump can be re-created locally by (1) removing modprobe from
    the PATH, and (2) executing the test program in the C locale.
    
        $ LC_ALL=C ./test_SupportedFileSystems
        Running main() from test_SupportedFileSystems.cc
        terminate called after throwing an instance of 'Glib::ConvertError'
        Aborted
        $ echo $?
        134
    
    Backtrace from gdb:
        (gdb) backtrace
        #0  0x00007f4f93002337 in __GI_raise (sig=sig@entry=6)
            at ../nptl/sysdeps/unix/sysv/linux/raise.c:55
        #1  0x00007f4f93003a28 in __GI_abort () at abort.c:90
        #2  0x00007f4f93b2e7d5 in __gnu_cxx::__verbose_terminate_handler() ()
            at ../../../../libstdc++-v3/libsupc++/vterminate.cc:95
        #3  0x00007f4f93b2c746 in __cxxabiv1::__terminate(void (*)()) (handler=<optimized out>)
            at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:38
        #4  0x00007f4f93b2c773 in std::terminate() ()
            at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:48
        #5  0x00007f4f93b2c993 in __cxxabiv1::__cxa_throw(void*, std::type_info*, void (*)(void*))
            (obj=0x260d4b0, tinfo=0x7f4f966c1930 <typeinfo for Glib::ConvertError>, dest=0x7f4f96486fa0 
<Glib::ConvertError::~ConvertError()>)
            at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:87
        #6  0x00007f4f96486e27 in Glib::ConvertError::throw_func(_GError*) (gobject=0x260bf90) at 
convert.cc:329
        #7  0x00007f4f9649b5d7 in Glib::Error::throw_exception(_GError*) (gobject=0x260bf90) at error.cc:175
        #8  0x00007f4f964a7155 in Glib::operator<<(std::ostream&, Glib::ustring const&)
            (os=warning: RTTI symbol not found for class 'std::ostream' ..., utf8_string=...) at 
ustring.cc:1430
        #9  0x000000000044d66f in GParted::Utils::execute_command(Glib::ustring const&, char const*, 
Glib::ustring&, Glib::ustring&, bool)
            (command=..., input=input@entry=0x0, output=..., error=..., use_C_locale=use_C_locale@entry=true)
            at ../src/Utils.cc:688
        #10 0x000000000044dae9 in GParted::Utils::kernel_supports_fs(Glib::ustring const&)
            (use_C_locale=true, error=..., output=..., command=...)
            at ../src/Utils.cc:659
        #11 0x000000000044dae9 in GParted::Utils::kernel_supports_fs(Glib::ustring const&) (fs=...)
            at ../src/Utils.cc:480
        #12 0x0000000000460008 in GParted::jfs::get_filesystem_support() (this=0x25e8e60)
            at ../src/jfs.cc:59
        #13 0x00000000004464f9 in GParted::SupportedFileSystems::find_supported_filesystems() (this=0x25e8690)
            at ../src/SupportedFileSystems.cc:120
        #14 0x0000000000412360 in GParted::SupportedFileSystemsTest::setup_supported_filesystems() ()
            at test_SupportedFileSystems.cc:278
        #15 0x00000000004151b0 in GParted::SupportedFileSystemsTest::get_supported_fstypes() ()
            at test_SupportedFileSystems.cc:256
        #16 0x00000000004152c0 in GParted::gtest_MySupportedFileSystemsTest_EvalGenerator_() ()
            at test_SupportedFileSystems.cc:495
        #17 0x000000000041c7d6 in 
testing::internal::ParameterizedTestCaseInfo<GParted::SupportedFileSystemsTest>::RegisterTests()
            (this=0x2528ac0) at ../lib/gtest/include/gtest/internal/gtest-param-util.h:549
        #18 0x0000000000479fb5 in testing::internal::UnitTestImpl::RegisterParameterizedTests() 
(this=0x25288d0)
            at ./include/gtest/internal/gtest-param-util.h:709
        #19 0x0000000000479fb5 in testing::internal::UnitTestImpl::RegisterParameterizedTests()
            (this=this@entry=0x2528800) at ./src/gtest.cc:2658
        #20 0x000000000048a001 in testing::internal::UnitTestImpl::PostFlagParsingInit() (this=0x2528800)
            at ./src/gtest.cc:4980
        #21 0x000000000049e399 in testing::internal::InitGoogleTestImpl<char>(int*, char**)
            (argc=argc@entry=0x7ffe9d208a3c, argv=argv@entry=0x7ffe9d208b38) at ./src/gtest.cc:5934
        #22 0x000000000048d285 in testing::InitGoogleTest(int*, char**)
            (argc=argc@entry=0x7ffe9d208a3c, argv=argv@entry=0x7ffe9d208b38) at ./src/gtest.cc:5952
        #23 0x0000000000410404 in main(int, char**) (argc=1, argv=0x7ffe9d208b38)
            at test_SupportedFileSystems.cc:557
    
    The test program runs when executed in my locale and produces these
    messages:
    
        $ ./test_SupportedFileSystems
        Running main() from test_SupportedFileSystems.cc
        Failed to execute child process “modprobe” (No such file or directory)
        Failed to execute child process “modprobe” (No such file or directory)
        [==========] Running 210 tests from 1 test case.
    ...
    
    So the test program is aborting when trying to print the failed to
    execute child process message, but only in the C locale.
    
    This doesn't affect the CentOS GitLab CI image because that installs the
    kmod package with modprobe by default, however the Ubuntu image doesn't
    have the kmod package.
    
    Fix this by explicitly installing the kmod package into both the CentOS
    and Ubuntu GitLab CI images.
    
    Closes !49 - Add file system interface tests

 .gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e40bc6ed..f1a380b9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -16,7 +16,7 @@ stages:
     - yum install -y btrfs-progs e2fsprogs f2fs-tools dosfstools mtools
                      hfsplus-tools util-linux cryptsetup device-mapper lvm2
                      ntfsprogs udftools xfsprogs xfsdump
-                     xorg-x11-server-Xvfb
+                     xorg-x11-server-Xvfb kmod
     - cat /etc/os-release
 
 .ubuntu_image_template: &ubuntu_image_definition
@@ -31,7 +31,7 @@ stages:
     - apt-get install -y btrfs-progs e2fsprogs f2fs-tools dosfstools mtools
                          hfsutils hfsprogs jfsutils util-linux cryptsetup-bin
                          dmsetup lvm2 nilfs-tools ntfs-3g reiser4progs
-                         reiserfsprogs udftools xfsprogs xfsdump xvfb
+                         reiserfsprogs udftools xfsprogs xfsdump xvfb kmod
     - cat /etc/os-release
 
 .build_stage_template: &build_stage_definition


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]