Code Monkey home page Code Monkey logo

pcut's People

Contributors

vhotspur avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

le-jzr

pcut's Issues

Pcut creates temporary files in the working directory

Pcut creates temporary files in the current directory with its homebrew code, either in generic.c or helenos.c. On HelenOS if / is full or if the test is run with WD set to a non-writable directory (e.g. /loc), PCUT will fail to create temporary file for every test.

Suggestion: How about tmpfile() on HelenOS and tmpnam() on generic?

PCUT should not prefix test case identifiers with "test_"

int test_foo;

PCUT_TEST(foo)
{
...
}

fails to compile because foo is mangled to test_foo. Perhaps test case identifiers should be mangled to something that the programmer is less likely to use accidentally, such as _test_xxx or _pcut_xxx, for example.

Tests null and nullteardown broken with Clang and -03

Both of these tests checks how PCUT behaves when test is unexpectedly aborted (e.g. during NULL pointer dereference). To achieve this, they intentionally access *p where p == NULL. However, this is undefined behaviour and Clang optimizations causes that the dereference returns 0 (while GCC-compiled program ends with SEGFAULT). See What Every C Programmer Should Know About Undefined Behavior for more details. Note that this happens only with -O3: with -O0 the compiled program behaves the same as GCC-compiled one does.

Fixing ought to be easy: the tests shall explicitly call abort() or its equivalent.

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.