Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116046 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 22138 invoked from network); 15 Sep 2021 19:53:47 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Sep 2021 19:53:47 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8807B180505 for ; Wed, 15 Sep 2021 13:33:20 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-il1-f180.google.com (mail-il1-f180.google.com [209.85.166.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 15 Sep 2021 13:33:20 -0700 (PDT) Received: by mail-il1-f180.google.com with SMTP id d11so417336ilc.8 for ; Wed, 15 Sep 2021 13:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YnJhzRcZMYzVAlAhow9J1pksgop5q6NkJdAAWQ/ascQ=; b=ZVYnMnEP8elpgZW9yt06UQO2TE0P+vFn+diWogySdnnWMRqHMMcJG677Y2QyQfprP+ YPYiKa66ERv9RHqk9F+7/rUfDw6Gqe9TNrMjF1x4RLnNJhmt61J5HP6hsk/v8N6H9OWF QshJuAHDMguYSvfPfXKmlR95DmZ2sbX6Y+H9uZzbvTQFQJ5VaAMCI5HpGMLdgjrI4UCM mIS2NtAjOmumXcPXwx65j7NysKt+rkDtD+Ho/HhhQMqlCbV4sPmUvDYAhx8i8RCyDCqT K3YLE2TaVx9grOig2QVEkS4vx0HATNgNxpH35ke0BuTnq6IIpJPj/dsaDvrBflgD9l4l H9cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YnJhzRcZMYzVAlAhow9J1pksgop5q6NkJdAAWQ/ascQ=; b=aWTrN/Xh4kfBMKgq1a4POWu/LNuZZ/YUUUrfiSDWWmdAV5IJ8KwiI3/FB/CtHJnyQB 6cDDkcpbMfqHAJ6f8YEt2kkBoWUMUFWqJjVaBwGTSQzxjs7iDoPWlZR9pHKtVZqv6ve+ xZ0NRpuTW9YILlLhMrGvJcns/ctAvQBP3hgF7lSt57r7bRQcEvu2gAXozwtZ6zVYMYXc gbx/UukJakMfwn4YW326e/1Sks1HopJo/T+K/aab01UdINAvDlHPbmf2MTu99QeLQQo2 jI2ZQnGldXpqVWrJWZUbQNsDNMIUPntNeJu822B1iCAyJ96xXKTKzV/0+YGGOiBz5efU b0Ew== X-Gm-Message-State: AOAM530jGPiKr0V+FS4/bmYbQey9nqp9endk4ksk+MvPlhqb258MIOeS eeo6UBDisSPsZuAURzIt9dAik56m8weKJfL/V06uOjAqpvs= X-Google-Smtp-Source: ABdhPJz0N4wMyHrB889Y7jj4STDrcVslMHF+KGRL6GV5p/45H/fS1plRtMEbRpFikVTLFBZ8Qqf/U5ALA+On9VwJeus= X-Received: by 2002:a92:c248:: with SMTP id k8mr71136ilo.52.1631737998500; Wed, 15 Sep 2021 13:33:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 15 Sep 2021 16:33:07 -0400 Message-ID: To: Sara Golemon Cc: PHP Internals Content-Type: multipart/alternative; boundary="000000000000c4697805cc0e9bae" Subject: Re: [PHP-DEV] run-tests SKIPIF caching can be problematic for third-party extensions From: jmikola@gmail.com (Jeremy Mikola) --000000000000c4697805cc0e9bae Content-Type: text/plain; charset="UTF-8" On Wed, Sep 15, 2021 at 1:59 PM Sara Golemon wrote: > > If the phpt file outputs "skip nocache" then that will skip without > caching on all versions, won't it? In 8.1 because it has the explicit > 'nocache' provided, and in older versions because they don't cache anyway. > > Am I missing something? > If I'm reading the most recent patch correctly [^1], the SKIPIF result is always cached if the output does not start with "nocache". If the output starts with "nocache" (ignoring whatever may follow), the entire result is replaced with an empty string. Given that, it seems like it's not possible to opt out of caching and skip a test. Perhaps that's by design if the cache is only intended to memoize SKIPIF blocks that do result in a test skip. But the question remains: how do we portably opt out of caching without skipping a test? In PHP 7.4 (and presumably earlier versions), run-tests.php appears to ignore unrecognized SKIPIF output [^2]; however, 8.0 is more strict and will flag unrecognized output as borked [^3]. I think Nikita alluded to that logic in his most recent patch [^1], since the same validation exists in 8.1; however, I don't think backwards compatibility (e.g. running the same test on both 8.0 and 8.1) was being considered there. [^1]: https://github.com/php/php-src/commit/0074a1d4e3a85d0d63118e7a30f4b7ed6da64695 [^2]: https://github.com/php/php-src/blob/php-7.4.23/run-tests.php#L2127 [^3]: https://github.com/php/php-src/blob/php-8.0.10/run-tests.php#L2200 -- jeremy mikola --000000000000c4697805cc0e9bae--