Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 406353 - dev-util/cmake-2.8.6-r4 - stop Xvfb after failed test phase
Summary: dev-util/cmake-2.8.6-r4 - stop Xvfb after failed test phase
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-29 18:51 UTC by Toralf Förster
Modified: 2012-10-03 22:47 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
bug-406353.patch (bug-406353.patch,866 bytes, patch)
2012-09-05 14:56 UTC, Michael Palimaka (kensington)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2012-02-29 18:51:37 UTC
Otherwise they run and run :

n22 ~ # ps -efla | grep Xvfb | grep -v grep
0 S root      9425     1  0  80   0 -  3543 poll_s 19:13 pts/4    00:00:00 /usr/bin/Xvfb :2 -screen 0 800x600x24
0 S root     19843     1  0  80   0 -  3543 poll_s 16:22 ?        00:00:00 /usr/bin/Xvfb :1 -screen 0 800x600x24


Reproducible: Always
Comment 1 Tomáš Chvátal (RETIRED) gentoo-dev 2012-04-19 12:07:06 UTC
Weird it hsould get killed every time


        einfo "Starting Xvfb on \$DISPLAY=${XDISPLAY} ..."

        export DISPLAY=:${XDISPLAY}
        # Do not break on error, but setup $retval, as we need
        # to kill Xvfb
        debug-print "${FUNCNAME}: ${VIRTUALX_COMMAND} \"$@\""
        ${VIRTUALX_COMMAND} "$@"
        retval=$?

        # Now kill Xvfb
        kill $(cat /tmp/.X${XDISPLAY}-lock)
Comment 2 Dustin Polke 2012-05-23 18:32:17 UTC
(In reply to comment #1)
> Weird it hsould get killed every time
> 
> 
>         einfo "Starting Xvfb on \$DISPLAY=${XDISPLAY} ..."
> 
>         export DISPLAY=:${XDISPLAY}
>         # Do not break on error, but setup $retval, as we need
>         # to kill Xvfb
>         debug-print "${FUNCNAME}: ${VIRTUALX_COMMAND} \"$@\""
>         ${VIRTUALX_COMMAND} "$@"
>         retval=$?
> 
>         # Now kill Xvfb
>         kill $(cat /tmp/.X${XDISPLAY}-lock)
Yes, but it never reaches this line because ${VIRTUALX_COMMAND} calls die:
"""
cmake_src_test() {
    # fix OutDir test
    # this is altered thanks to our eclass
    sed -i -e 's:#IGNORE ::g' "${S}"/Tests/OutDir/CMakeLists.txt || die                                                                                                             
                                                                                                                                                                                    
    pushd "${CMAKE_BUILD_DIR}" > /dev/null

    local ctestargs
    [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"

    # Excluded tests:
    #    BootstrapTest: we actualy bootstrap it every time so why test it.
    #    SimpleCOnly_sdcc: sdcc choke on global cflags so just skip the test
    #        as it was never intended to be used this way.
    "${CMAKE_BUILD_DIR}"/bin/ctest ${ctestargs} \
        -E BootstrapTest SimpleCOnly_sdcc \
        || die "Tests failed"
"""
           ^^^
           Here
"""
    popd > /dev/null
"""
Comment 3 Michael Palimaka (kensington) gentoo-dev 2012-09-05 14:56:27 UTC
Created attachment 323008 [details, diff]
bug-406353.patch

I believe the attached patch solves the issue. Thoughts?
Comment 4 Michael Palimaka (kensington) gentoo-dev 2012-09-05 14:57:13 UTC
> I believe the attached patch solves the issue. Thoughts?

CCing x11, as this patch touches virtualx.eclass.
Comment 5 Johannes Huber (RETIRED) gentoo-dev 2012-09-20 11:25:44 UTC
<johu> chithead: bug 406353 feedback on the patch?
<willikins> johu: https://bugs.gentoo.org/406353 "dev-util/cmake-2.8.6-r4 - stop Xvfb after failed test phase"; Gentoo Linux, KDE; UNCO; toralf.foerster:kde
<chithead> if you tested it to work, fine with me
Comment 6 Toralf Förster gentoo-dev 2012-09-20 15:36:30 UTC
(In reply to comment #5)
> <johu> chithead: bug 406353 feedback on the patch?
> <willikins> johu: https://bugs.gentoo.org/406353 "dev-util/cmake-2.8.6-r4 -
> stop Xvfb after failed test phase"; Gentoo Linux, KDE; UNCO;
> toralf.foerster:kde
> <chithead> if you tested it to work, fine with me

tested with 2.8.8-r3, patch applied successfully, issue went away
Comment 7 Michael Palimaka (kensington) gentoo-dev 2012-10-02 08:20:09 UTC
Thanks everyone, this patch is now applied in the main tree.
Comment 8 Joseph Yasi 2012-10-03 21:14:32 UTC
This patch to virtualx.eclass broke building firefox for me.  The firefox ebuild is EAPI 3 and portage gives an error that nonfatal is unavailable in that EAPI. virtualx.eclass claims to only require EAPI 2 or newer.
Comment 9 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-10-03 22:47:43 UTC
I updated the eclass to avoid nonfatal when EAPI=2 or 3 is used.