Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116146 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 66845 invoked from network); 23 Sep 2021 13:42:05 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Sep 2021 13:42:05 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 08DBA1804A9 for ; Thu, 23 Sep 2021 07:23:34 -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-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (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 ; Thu, 23 Sep 2021 07:23:33 -0700 (PDT) Received: by mail-ed1-f44.google.com with SMTP id s17so5791389edd.8 for ; Thu, 23 Sep 2021 07:23:33 -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=j4oAI8dlPvdlJY5j9iihmzl8f8mzBCxA/xJbnfMViJA=; b=T4VpyzkLxP+SMRx0dy7LkESU2qagYafJjp27ZJHUTQ1uv0+34Iq2tuCyrv19PB510A 2b6VWzWGyl8xbqVbo+EergddY81wB5jGlryLDoBApfFLGH1pwIWyk6F4NReL67Clk9l9 qcIhyup782GRxaNhNAidbusnwpV+7q6IvdngYrQ2mLUVdde97j55zySKt6k4+QUgnsRE AxVSwxsrO9ZMir0mOOufp585XlXN1O5xTmL+UxZlTl5Qeuu+sCLqGzZrrahz9m0SATB0 8/xhyBzI4Hc5jAllu6p7PJtG8Lzq9WajaQS+HE1LyhVMMzyPJnQVcCE3GEYVMTacPlOJ NRsQ== 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=j4oAI8dlPvdlJY5j9iihmzl8f8mzBCxA/xJbnfMViJA=; b=0SgTHKzgqlgrLR48ZXA9OEt1Zgj/kC9cVR17+sQclABpyuohdsmW7Iqt98F9Cr2I2F RdJLMgrK4fGlPx9EIqoSAX1Q1WdQOwhnhfdcngJmKFxthuDqQVuPqOR+k08/zYQwwcud 2Qm68HfWkcZkZUvjE6NhoVBun0JfRGs2eRXavJ14F4Y5QEXa7Hg3EJuK0trQSd2PxhE7 mS6pmBY+inQMozy6lZZlhYXGN1d1bnML8jVntDMJjGTKSPNKobji5+R8gcVPpundGqAU B7FKcBRN7o6tQ9Nyi7Is2AaLt7zw6b5mdQYsCU+5EKinL7lexu5PVOK5NxYbzMXjnmEr Iksg== X-Gm-Message-State: AOAM532F8f/DvbyQr60zxetgKAazNf8phJfSLICqbx4/EgWcXD4UDOse hZ0UPN0L+SsXmF5QsnbI4p7G3PDAzeON1V7DmhnOH3GUY+w= X-Google-Smtp-Source: ABdhPJybiZBoKWAJIV11SrqQ6jqpP4c4K4RcfwgjeOC/+Km+EjK3VJJefRIyhfXsAuoWaBIUecFCSRwK9QmAV/W0pvE= X-Received: by 2002:a17:906:e299:: with SMTP id gg25mr5332389ejb.339.1632407012328; Thu, 23 Sep 2021 07:23:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 23 Sep 2021 16:23:15 +0200 Message-ID: To: Jeremy Mikola Cc: PHP Internals Content-Type: multipart/alternative; boundary="0000000000001948e305ccaa6034" Subject: Re: [PHP-DEV] run-tests SKIPIF caching can be problematic for third-party extensions From: nikita.ppv@gmail.com (Nikita Popov) --0000000000001948e305ccaa6034 Content-Type: text/plain; charset="UTF-8" On Thu, Sep 23, 2021 at 4:10 PM Nikita Popov wrote: > On Wed, Sep 15, 2021 at 7:23 PM Jeremy Mikola wrote: > >> I just discovered that run-tests.php was changed to cache SKIPIF >> evaluation >> since 8.1.0beta3[1]. I believe ext-mongodb ran into the same issue as >> mysqli[2], as we use SKIPIF to check that database contents are clean >> going >> into a test. The present solution in core is to check SKIPIF output for >> "nocache" [3,4] and allow individual tests to opt out of caching; however, >> I'm worried that won't be portable for third-party extensions, where we >> test with run-tests.php for each version of PHP that we support. >> >> Is there still time to consider an alternative solution? If "nocache" >> needs >> to remain in place for mysqli, perhaps 8.1.0's run-tests.php can be >> enhanced to consult an environment variable (for maximum BC and playing >> nice with `make test`) that disables caching entirely. >> > > I'm not sure I understand the setup you're using. The "nocache" tag that > mysqli uses covers the situation where part of the test setup is done in > the SKIPIF section -- because checking whether the test should be skipped > requires doing the same setup as the actual test. If the test does get > skipped, it's still fine to cache that. > > Now, it sounds like your situation is different from that, and you > actually have SKIPIF sections where first one test should be skipped, but > then a later test with identical SKIPIF shouldn't be skipped. Is that > correct? What changes between the time these two tests run? > Independently of that question (which is about whether "nocache" is sufficient if we ignore cross-version compatibility issue) I do agree that an option to disable the skip cache entirely would make sense. Would https://github.com/php/php-src/pull/7510 work for you? Regards, Nikita --0000000000001948e305ccaa6034--