pcp
[Top] [All Lists]

qa/859 and python problem in fetchgroup wrapper?

To: PCP <pcp@xxxxxxxxxxx>
Subject: qa/859 and python problem in fetchgroup wrapper?
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Thu, 17 Mar 2016 08:16:20 +1100
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
On Mac OS X, qa/859 is failing thusly

QA output created by 859
pmfg -   File "/Users/kenj/src/pcp/qa/src/test_pmfg.py", line 123, in test_pmfg
    test_pmfg_live(self, c_api.PM_CONTEXT_HOST, "local:")
  File "/Users/kenj/src/pcp/qa/src/test_pmfg.py", line 46, in test_pmfg_live
    print ("time: %s" % tt())
  File "/usr/local/lib/python2.6/site-packages/pcp/pmapi.py", line 2132, in 
__call__
    ts.tm_hour, ts.tm_min, ts.tm_sec, us, None)
OverflowError: signed integer is greater than maximum


I've eventually tracked this down to a bogus value for tv_usec in a struct 
timeval in the __call__ method of the fetchgroup_timestamp class where tv_sec= 
1458160058 and tv_usec= 4295837705 ... tv_usec should be no larger than 999999.

The value for tv_usec is not constant, but it is always really big and in hex 
is something like 1000XXXX

I'm not sure if the problem is in the python wrapper code, or the python test 
program, so I'd really appreciate some help.

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