Opened 2 years ago

Last modified 3 weeks ago

#285 new enhancement

check for cli and setup xcache.var_size before commencing xcache_var.phpt

Reported by: denu Owned by: moo
Priority: trivial Milestone: 4.0.0
Component: build Version: 2.0.1
Keywords: test case, cli, ini Cc:
Application: PHP Version: 5.*
Other Exts: SAPI: Irrelevant
Probability: Always Blocked By:
Blocking:

Description

hi,

supporting make testers by having some phpt's is great; thank you for that! We frequently do make test after compiling php to get an idea of the overall state, new bugs and such.
We do this by using cli sapi.

1) xcache_var.phpt does not check for cli-usage
and consequently reports FAIL, because var caching is not supported via cli(?).

if you could add something like

--SKIPIF--
<?php
if (php_sapi_name() == 'cli') {
    die('skip not available for CLI');
}
?>

to tests/xcache_var.phpt, that'll be gone.

2) xcache_var.phpt tries to use var_cache features
but without requesting a testcase ini-setup and FAILs (even with other sapi), if xcache.var_size is still set to ootb-default (0).

if you could add something like

--INI--
xcache.var_size=48k
xcache.var_count=1
xcache.var_slots=8K
xcache.var_ttl=0
xcache.var_maxttl=0
xcache.var_gc_interval=300

to tests/xcache_var.phpt, this testcase would reliably work, regardless of ini settings or even ootb/unconfigured.

thank you

Change History (2)

comment:1 Changed 2 years ago by moo

"make xcachetest" do the work correctly, it enable XCache php caching for all *.phpt in php-src.

it will load XCache, enable php caching. set some env and enable xcache.test so xcache is won't disable itself for cli, making it running the *.phpt test

you're right about the ini part, for tests come with XCache

comment:2 Changed 3 weeks ago by moo

  • Milestone changed from undecided to 4.0.0
Note: See TracTickets for help on using tickets.