Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 14 16:25
    Snaipe commented #301
  • Sep 13 19:26
    Snaipe commented #302
  • Sep 13 19:21
    Snaipe commented #302
  • Sep 13 17:36
    MrAnno commented #301
  • Sep 13 17:35
    MrAnno commented #301
  • Sep 13 15:28
    kugel- commented #302
  • Sep 13 15:26
    kugel- commented #302
  • Sep 13 15:14
    Snaipe labeled #302
  • Sep 13 15:14
    Snaipe labeled #302
  • Sep 13 15:14
    Snaipe labeled #302
  • Sep 13 15:14
    Snaipe assigned #302
  • Sep 13 15:14
    Snaipe opened #302
  • Sep 13 14:55

    Snaipe on actions

    ci: setup basic actions yaml (compare)

  • Sep 11 08:33
    MrAnno opened #301
  • Sep 03 18:13
    Fumesover closed #300
  • Sep 03 18:13
    Fumesover commented #300
  • Sep 03 18:02
    Fumesover edited #300
  • Sep 03 18:02
    Fumesover edited #300
  • Sep 03 17:32
    Fumesover opened #300
  • Aug 26 18:59
    4lph4-Ph4un closed #298
Andrei Preda
@mirror3000
Hi there! Can i make a theory run on multiple threads, to spilt th workload?
Franklin Mathieu
@Snaipe
@mirror3000 not as of now, sorry. There are plans to refactor the theory code to run under the same backend as parameterized & normal tests, but you're not going to see this before 2.4.0 or 3.0.0.
If you need parallelization, you could use a parameterized test for the moment and emulate cr_assume with if (!condition) cr_skip_test();
However you'll have to make a proper generator for it
Andrei Preda
@mirror3000
Thank you! Parallelizing it will help a lot. Cheers for the great library!
Franklin Mathieu
@Snaipe
You're welcome! Glad you like Criterion :)
Franklin Mathieu
@Snaipe
@/all I'd appreciate if users shimed in on this discussion: Snaipe/Criterion#204. I don't normally ping everyone, but since this will impact everyone that uses Criterion, I'd rather have some inputs before taking a decision.
Jeroen Koekkoek
@k0ekk0ek
I've got a question regarding a custom runner and Windows. When I use the simple example, I get these messages: "criterion: Could not spawn test instance: No child processes"
This is on Windows 10, with Visual Studio 2015. Anybody knows if there are problems with providing your own main on Windows?
Franklin Mathieu
@Snaipe
@k0ekk0ek just saw your message on irc, we can continue here if you prefer :)
still, I've had no issue recently on windows 10 with criterion, so if you have something for me to reproduce, it would help greatly
GuyThreepwood
@GuyThreepwood
Hello! I'm trying to
I'm trying compile a test project on windows
I'm using msvc from cmd directly, but the linker fails with "entry poibt must be defined"
This is for samples/simple.c from the repo.
This is the cmd I' tryibg to run: /I"<path to criterion headers>" .\simple.c /link "path to criterion.lib"
For some reason it stripped the cl from my message above. Should read: cl /I"<path to..."...
GuyThreepwood
@GuyThreepwood
Am I holding the compiler wrong? Any help would be appreciated
GuyThreepwood
@GuyThreepwood
Relevant: I'm using v19.00.24215.1 (x64) and the latest msvc binary of criterion (2.3.2)
GuyThreepwood
@GuyThreepwood
Solved my problem, was missing "/subsystem:console" from the linker call.
However, when I'm trying to run the exe, I get "criterion: could not initialize inheritable arena: not enough space"
Douman
@DoumanAsh
@Snaipe Did you have opportunity to test whether Criterion works on VS17?
Douman
@DoumanAsh
@Snaipe Found out that idiots in MS cannot even expect utf-8 as default encoding of file so utf-8 strings may cause compiler errors unless you specify flag /source-charset:utf-8
GuyThreepwood
@GuyThreepwood
Mit
GuyThreepwood
@GuyThreepwood
Sorry about that. Was a typo
Franklin Mathieu
@Snaipe
@GuyThreepwood sorry for the delay, I was taking a break. Do you perhaps have more details on what platform you were compiling on? Were you testing a memory-intensive application, or did it behave like that even for a simple hello world?
@DoumanAsh I didn't test criterion on VS17, but I could add that platform for appveyor. I'm mostly assuming that MSVC would be backward compatible, and that testing with VS15 is enough, but I may be wrong here
Leo Smith
@p4p1
Hello, I am using criterion on a basic app in C. This app has it's own main file and I wish to test it. Is there an option in criterion to call a main passing all the arguments (argc, argv) from a test file?
Franklin Mathieu
@Snaipe
@p4p1 the logistics behind it might be a little hard, since Criterion defines its own main, and defining yours means you actively are responsible for calling the runner
I would perhaps recommend abstracting main() from your program into a function
(so that you can call it from the test itself)
alternatively, you could include the main in your library code, and dlsym it
an other possibility could be to pass -Dmain=program_main when compiling your program, so that main becomes substituted to program_main, which is then callable easily
Anthony M. Cook
@acook
I have been trying to build Criterion with ELLCC (a fork of LLVM built against Musl), everything works fine until it gets to the csptrdependency and cmake appears to be deciding to use clang-6.0 instead of ecc and clang-6.0 doesn't support -l flags. This is despite having set $CC and $CLINKER to ecc.
If it would just use ecc as specified instead of being "smart" and trying to use the clang-6.0 binary it would work fine. :worried:
Franklin Mathieu
@Snaipe
@acook Is ecc being picked up for the other dependencies and Criterion itself? I might have forgotten some tricky bit in the csptr's configuration
I think CMake wants you to use a toolchain file rather than just defining CC
Something like this maybe:
$ pwd
/path/to/criterion/build
$ cat ecc.cmake
set(CMAKE_SYSTEM_NAME Linux)

set(CMAKE_C_COMPILER ecc)
$ cmake -DCMAKE_TOOLCHAIN_FILE=ecc.cmake ..
(point is, I'm not sure CC propagates to dependencies)
Anthony M. Cook
@acook
Hmm, I will give that a shot, thanks. It only stops on csptr so far, other deps seem to work fine.
Anthony M. Cook
@acook
Okay, so it looks like all the deps were ignoring $CC, but only csptr was failing. With some additional research I got a Cmake toolchain file written, so all the Cmake deps are now using the correct toolchain (yay). On the downside, the ecc I'm using is based off a quite old clang and it isn't happy about the forward declaration of structs in nanomsg (boo).
For posterity, here is the ecc.cmake I ended up with:
set(CMAKE_SYSTEM_NAME Linux)
find_program(CMAKE_C_COMPILER ecc)
find_program(CMAKE_CXX_COMPILER ecc++)
find_program(CMAKE_LINKER ecc)
find_program(CMAKE_AR ecc-ar)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
set(TRIPLE x86_64-pc-linux-gnu)
set(CMAKE_C_COMPILER_TARGET ${TRIPLE})
set(CMAKE_CXX_COMPILER_TARGET ${TRIPLE})
Anthony M. Cook
@acook
Also, I'm not sure but it looks like Cmake is nondeterministic in the order it decides to build deps. It always(?) seems to build git2 first and then it will build nanomsg, boxfort, or csptr but it seems random which it chooses.
Anthony M. Cook
@acook
I'd been assuming it was getting farther in the process, but it wasn't. Anyway, here's the csptr error:
'linker' input unused
Franklin Mathieu
@Snaipe
What errors are you getting on the nanomsg side? I'm quite familiar with their implementation and I've been in touch with the maintainer, I can probably send him a patch
Also it looks like there's a -Werror somewhere that really shouldn't be here. Let me have a look
Anthony M. Cook
@acook
Here is a capture of the nanomsg errors:
field has incomplete type 'struct gaicb'
The messages seem to imply that there's a missing #include.
Franklin Mathieu
@Snaipe
Yes, I think that dns_getaddrinfo_a.inc isn't including the .h
which in turn includes netdb