Opened 3 years ago

Closed 14 months ago

Last modified 14 months ago

#285 closed enhancement (fixed)

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:



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

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


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

thank you

Change History (4)

comment:1 Changed 3 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 15 months ago by moo

  • Milestone changed from undecided to 4.0.0

comment:3 Changed 14 months ago by moo

  • Resolution set to fixed
  • Status changed from new to closed

problem 1 was fixed in [1341] reported as in #228
problem 2 was fixed in [1497]

comment:4 Changed 14 months ago by denu

Thank you very much! Works like a charm.

Note: See TracTickets for help on using tickets.