Giter VIP home page Giter VIP logo

Comments (2)

gilles-peskine-arm avatar gilles-peskine-arm commented on June 7, 2024

Out of curiosity, why is reporting the test step more difficult than reporting the file/line location?

from mbedtls.

paul-elliott-arm avatar paul-elliott-arm commented on June 7, 2024

Reporting the line / location is guarded by the test result state - we take the lock, then set the test name, line and file (and the two extra lines if necessary), and then unlock. Should a second thread come along at this point, they would bounce off as the test had already failed.

When setting the step (to an arbitary value) there is no such built in safeguard, one simply sets the step. If two threads are both attempting to set the step, then the order in which they set the step (one obviously overwriting the other) is completely undetermined. Even if we constrained the step value to a single test, and that test used threads we would hit this, so I'm really not entirely sure, as I said how best to fix it.

In the case of increment step, if its basically being used as a counter, then it will function as that, but there is still uncertainty about the order in which increments happen, however if that is not something you are bothered about then this is still useful in a multi-thread environment.

from mbedtls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.