pcp
[Top] [All Lists]

Re: [pcp] PCP Updates: Fix Intermittent Failure of qa tests 712, 713, 71

To: Nathan Scott <nathans@xxxxxxxxxx>
Subject: Re: [pcp] PCP Updates: Fix Intermittent Failure of qa tests 712, 713, 714
From: Dave Brolley <brolley@xxxxxxxxxx>
Date: Wed, 26 Mar 2014 11:15:48 -0400
Cc: PCP Mailing List <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <878628419.479859.1395801816032.JavaMail.zimbra@xxxxxxxxxx>
References: <53319976.10107@xxxxxxxxxx> <1102981313.459447.1395795004225.JavaMail.zimbra@xxxxxxxxxx> <878628419.479859.1395801816032.JavaMail.zimbra@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0
On 03/25/2014 10:43 PM, Nathan Scott wrote:
One minor issue - the output has dependencies on the version of
coreutils installed (also unlikely to work cross-platform, if we
ever did secure socket builds somewhere else someday)...
[ ... ]
Would ...

     if $withcerts
     then
         nss_setup_certificates $fqdn $host
         $sudo chmod -R 0644 $collectordb/*
         $sudo chown -R pcp:pcp $collectordb
     else
         echo "Skipping addition of certificates to certdb"
     fi

and remaking 966.out do the trick here?

The problem is that test 712 depends on the existence of an empty $collectordb with the correct permissions when 'false' is passed in for $withcerts. On the other hand, for the new test 966, I wanted the directory to not exist at all, so that NSS would fail to start. I got a little tricky and passed in the name of a function that removes $collectordb and returns with a failing exit code. I guess the alternative would be to define several exit codes for $withcerts (e.g. 1: leave empty $collectordb, 2: leave no $collectordb).

Alternatively, this also solves the problem:

    $withcerts && nss_setup_certificates $fqdn $host

    if [ -d $collectordb ]
    then
    $sudo chmod -R 0644 $collectordb/*
    $sudo chown -R pcp:pcp $collectordb
    fi

Dave

<Prev in Thread] Current Thread [Next in Thread>