From 03954d52ee3cd4d00bb22110af69bebb95b69a1c Mon Sep 17 00:00:00 2001 From: jcm Date: Wed, 13 Jul 2022 11:42:05 +0200 Subject: [PATCH] QA - pcntl_setpriority() - adjust error/code coverage --- ext/pcntl/tests/pcntl_setpriority_error.phpt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ext/pcntl/tests/pcntl_setpriority_error.phpt b/ext/pcntl/tests/pcntl_setpriority_error.phpt index cdb8d404afcd1..1c51a5dcbde79 100644 --- a/ext/pcntl/tests/pcntl_setpriority_error.phpt +++ b/ext/pcntl/tests/pcntl_setpriority_error.phpt @@ -1,5 +1,5 @@ --TEST-- -pcntl_setpriority() - Wrong process identifier +pcntl_setpriority() - check for errors --EXTENSIONS-- pcntl --SKIPIF-- @@ -12,12 +12,22 @@ if (!function_exists('pcntl_setpriority')) { --FILE-- getMessage() . "\n"; } +var_dump($result); +pcntl_setpriority(0, -123); + +pcntl_setpriority(0, 1); ?> ---EXPECT-- +--EXPECTF-- pcntl_setpriority(): Argument #3 ($mode) must be one of PRIO_PGRP, PRIO_USER, or PRIO_PROCESS +bool(true) + +Warning: pcntl_setpriority(): Error 3: No process was located using the given parameters in %s + +Warning: pcntl_setpriority(): Error 1: A process was located, but neither its effective nor real user ID matched the effective user ID of the caller in %s