Changeset 03295a9 in mod_gnutls


Ignore:
Timestamp:
May 16, 2015, 6:13:50 AM (4 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, upstream
Children:
52c3f68
Parents:
70509f8
git-author:
Thomas Klute <thomas2.klute@…> (05/16/15 06:05:32)
git-committer:
Thomas Klute <thomas2.klute@…> (05/16/15 06:13:50)
Message:

Test suite: Prevent race over error log for server fail cases

In some test cases that expect the server to fail to start, it won't
even get far enough to write an error log. Sometimes these tests failed
because tail could not find the error log in the apache_down_err hook,
which shouldn't have been called at that point.

Two changes to the runtests script should remove the problem:

a) Call tail on the error log only if it is readable
b) Remove Apache error hook before trying to stop the server

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/runtests

    r70509f8 r03295a9  
    9090    fi
    9191
    92     printf "\nApache error logs:\n"
    93     tail "logs/${TEST_NAME}.error.log"
     92    local errlog="logs/${TEST_NAME}.error.log"
     93    if [ -r "${errlog}" ]; then
     94        printf "\nApache error logs:\n"
     95        tail "${errlog}"
     96    fi
    9497
    9598    if [ -n "${USE_MSVA}" ]; then
     
    175178        diff_output_filter_headers "${t}/output" "$output" "-q"
    176179    fi
    177     /usr/sbin/apache2 -f "${t}/apache.conf" -k stop || [ -e ${t}/fail.server ]
    178180    if [ -n "${USE_MSVA}" ]; then
    179181        trap stop_msva EXIT
     
    181183        trap - EXIT
    182184    fi
     185    /usr/sbin/apache2 -f "${t}/apache.conf" -k stop || [ -e ${t}/fail.server ]
    183186    printf "SUCCESS: %s\n" "$TEST_NAME"
    184187done
Note: See TracChangeset for help on using the changeset viewer.