php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #59656 Please wrap rrd_strversion
Submitted: 2011-03-07 13:47 UTC Modified: 2011-04-11 05:30 UTC
From: Fedora at FamilleCollet dot com Assigned: koubel (profile)
Status: Closed Package: rrd (PECL)
PHP Version: 5.3.5 OS: GNU/Linux (Fedora 14)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Fedora at FamilleCollet dot com
New email:
PHP Version: OS:

 

 [2011-03-07 13:47 UTC] Fedora at FamilleCollet dot com
Description:
------------
It will be great to 
- have a rrd_strversion in a future version.
- display this value in phpinfo(), as some other extension does (mysql, memcached, ...)

The first use will be to have conditional part in test suite.

I mean, when the rrdtool API changes and affects the test suite, the old tests are kept, but skip for new version, and the new ones are created, but skip for old version.

This solution will allow to provide a more robust test suite, I think.

Patch proposal:
http://remi.fedorapeople.org/rrd-strversion.patch

This patch :
- add rrd_strversion wrapped function
- display "rrdtool library version" in phpinfo()
- change test 19 to run only if rrdtool >= 1.4.0
- add test 20 (copied from 19) to run only if rrdtool < 1.4.0

Feel free to comment this minor contribution.

Test under fedora 14
PASS RRDGraph saveVerbose full export test [tests/rrd_019.phpt] 
SKIP RRDGraph saveVerbose full export test [tests/rrd_020.phpt] reason: - test only applies to rrdtool 1.3.x

Test under RHEL 6
SKIP RRDGraph saveVerbose full export test [tests/rrd_019.phpt] reason: - test only applies to rrdtool >= 1.4.x
PASS RRDGraph saveVerbose full export test [tests/rrd_020.phpt] 


Of course, if you think this is a good idea, I should be able to fix the others some tests which fails with rrdtool 1.3.x


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-11 05:30 UTC] koubel at seznam dot cz
rrd_version added to php user space functions, underlying librrd version added to phpinfo() also.

Regarding test suite:
Make test result with current trunk for librrd 1.3.x and publish it on some public url. After that I'll try to make some librrd conditional tests. Maybe I'll change names for phpt files also, I think they aren't so transparent now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 15:01:32 2024 UTC