GNU bug report logs - #76839
[PATCH] Fix 'Skip' behavior in erts files

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Fri, 7 Mar 2025 19:39:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Roi Martin <jroi.martin <at> gmail.com>, 76839 <at> debbugs.gnu.org
Subject: bug#76839: [Roi Martin] [PATCH] Fix 'Skip' behavior in erts files
Date: Sat, 8 Mar 2025 09:57:04 +0000
Roi Martin <jroi.martin <at> gmail.com> writes:

> Stefan Kangas <stefankangas <at> gmail.com> writes:
>
>>> +(ert-deftest ert-test-erts-skip-one ()
>>> +  "Test that Skip does not affect subsequent test cases (Bug#76839)."
>>> +  :expected-result :failed
>>
>> I think this should be avoided, because a test can fail for any reason.
>>
>> Can we turn the condition around, so that this test always passes?
>
> The thing is that I need to determine that the test case following the
> skipped one in the erts file has been executed.  If I know that the test
> will fail, it is easy to identify that, which is why I use
> ':expected-result :failed'.  However, If we expect `ert-test-erts-file'
> to succeed, how can I confirm that the second test case has passed
> instead of being skipped as well?
>
> I guess I could handle the `ert-test-failed' error signaled by
> `ert-test-erts-file' when it calls `ert-fail', but is it much better?

I think it's better, because then you reduce the scope to just that one
error.

The test could also fail for any other reason, including that some form
couldn't be read, an incorrect erts file, and so on.  We would want such
things to be flagged, in case they happen.

Does that make sense?  Could you propose an updated patch along these
lines?




This bug report was last modified 20 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.