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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 04 18:01:31 2024 UTC