php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76733 Trivial tests aren't covered by GCOV
Submitted: 2018-08-12 18:13 UTC Modified: 2018-08-20 14:46 UTC
From: carusogabriel@php.net Assigned:
Status: Open Package: Testing related
PHP Version: Irrelevant OS:
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: carusogabriel@php.net
New email:
PHP Version: OS:

 

 [2018-08-12 18:13 UTC] carusogabriel@php.net
Description:
------------
Trivial tests for functions like gettype, floatval, boolval, is_bool, etc, aren't being covered in GCOV: http://gcov.php.net/PHP_HEAD/lcov_html/ext/standard/type.c.gcov.php

I've tested locally the new LCOV version, 1.13 (http://ltp.sourceforge.net/coverage/lcov.php), but it didn't help us.


Something to start with: in PHP 7.1 we weren't using macros for gettype (http://gcov.php.net/PHP_7_1/lcov_html/ext/standard/type.c.gcov.php), for example, and after we started on 7.2 (http://gcov.php.net/PHP_7_2/lcov_html/ext/standard/type.c.gcov.php), we've lost those lines.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-08-20 12:07 UTC] nikic@php.net
The reason is that these functions have custom VM handlers, so in most cases (and in particular the ones being tested), the actual functions are never hit.
 [2018-08-20 14:46 UTC] cmb@php.net
> The reason is that these functions have custom VM handlers, […]

I suggest to add a respective comment to these functions.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri May 24 14:01:26 2019 UTC