*** tpb has joined #timvideos | 00:00 | |
mithro | shenki: have you figured out your flights yet? | 00:59 |
---|---|---|
mithro | ~seen Joelw | 01:00 |
tpb | mithro: Joelw was last seen in #timvideos 5 weeks, 3 days, 19 hours, 55 minutes, and 1 second ago: <Joelw> Ah, tricky! | 01:00 |
shenki | mithro: nope | 01:02 |
shenki | mithro: waiting on work | 01:02 |
shenki | mithro: will ping them | 01:03 |
mithro | shenki: what is the best way to "unit test" c code? Does rusty have opinions? | 01:06 |
shenki | mithro: heh. define 'best' | 01:07 |
shenki | mithro: take a look at ccan for how he does tests | 01:07 |
mithro | probably "most popular so when things go wrong I can find the answer on Google" :P | 01:07 |
shenki | hah | 01:09 |
mithro | since this is a gstreamer application, I guess I should check what they use | 01:09 |
shenki | at my old work people use things like gtest. i wasn't involved in that though, and it's a bit strange to test C with C++ | 01:09 |
shenki | in skiboot we have a makefile that builds and runs tests when you do make check | 01:10 |
mithro | http://stackoverflow.com/questions/65820/unit-testing-c-code | 01:12 |
tpb | Title: Unit Testing C Code - Stack Overflow (at stackoverflow.com) | 01:12 |
*** rusty has joined #timvideos | 01:14 | |
rusty | mithro: C code testing? Bwahahaha! | 01:14 |
mithro | rusty: basically, I have a parsing function that I want to check gets the right output on some example input | 01:15 |
mithro | currently I just have a main() function which does a g_assert_cmpint | 01:15 |
shenki | mithro: what are you testing? | 01:16 |
mithro | shenki: gst-switch | 01:16 |
rusty | mithro: OK, so the way ccan does unit tests is a fairly simple template; tests sit in a test/ dir and anything matching run*.c will get compiled and executed. It's expected to #include "../xxx.c" as required, which is good and bad, but allows testing of static functions and other special effects. | 01:17 |
rusty | mithro: I don't believe in precanned test infrastructure, since assert() is well-known and obvious. | 01:17 |
mithro | rusty: okay, that might be a way to start | 01:17 |
mithro | looks like gtk/glib has some type of inbuilt stuff which makes comparing their wrapped types easier | 01:17 |
rusty | mithro: However, for a parser specifically I recommend writing a special suite of tests which take an input filename; parse input and produce some output. | 01:19 |
rusty | mithro: this will allow you to test it with american fuzzy lop, FTW. | 01:19 |
mithro | rusty: I'm quite happy for this to crash on junk :P - I'm more interested in making sure valid input does the right thing | 01:20 |
rusty | mithro: then I'd parse and spit out output, and have your test wrapper check the output matches some canned output. | 01:21 |
rusty | mithro: don't spend too much time on it; getting *some tests* gets you 90% of the way there, in practice. | 01:21 |
mithro | rusty: yeah true | 01:23 |
rusty | mithro: yeah, good testing is the other 90% :) | 01:24 |
*** hyades has joined #timvideos | 02:59 | |
*** Joelw has joined #timvideos | 03:44 | |
*** 17SAA0E0K has quit IRC | 03:46 | |
*** 7JTABL4JK has joined #timvideos | 03:48 | |
*** rusty has quit IRC | 05:03 | |
mithro | https://www.youtube.com/watch?v=biMtVlWqRDU | 08:19 |
tpb | Title: SLUG November 2014 - Lightning Talks - YouTube (at www.youtube.com) | 08:19 |
*** slomo has joined #timvideos | 08:37 | |
mithro | https://www.youtube.com/watch?v=Ob42E7RrgUs | 08:55 |
tpb | Title: SLUG November 2014 - "Creating your own virtual appliance" by Robert Smit - YouTube (at www.youtube.com) | 08:55 |
mithro | hyades: ping? | 09:20 |
hyades | mithro: pong | 09:23 |
mithro | hyades: I'm trying to understand the current .travis.yml file | 09:23 |
hyades | ok | 09:23 |
hyades | there are four environments - unittests, integration, all tests and c coverage | 09:26 |
mithro | they are split into two groups, python-api and c | 09:27 |
mithro | - TEST=python-api TYPE=unittest | 09:27 |
mithro | - TEST=python-api TYPE=integration | 09:27 |
mithro | - TEST=module TYPE=python | 09:27 |
mithro | - TEST=module TYPE=c | 09:27 |
hyades | mithro: yea | 09:30 |
*** Niharika has joined #timvideos | 13:11 | |
CarlFK | mithro: did you want me to do something with https://github.com/timvideos/gst-switch/pull/40 "@CarlFK I used your tests/test_ui_lag1.sh script to verify the issue." | 14:20 |
tpb | Title: Use sync=false on imagesinks as feeds are live. by mithro · Pull Request #40 · timvideos/gst-switch · GitHub (at github.com) | 14:20 |
mithro | CarlFK: give it a try | 14:21 |
CarlFK | mithro: how do I get to mithro:sync-false | 14:26 |
hyades | CarlFK: git fetch origin pull/40/head:pull_40, and then checkout to pull_40 ? | 14:35 |
CarlFK | ?checkout to pull_40 | 14:44 |
hyades | after doing fetch | 14:46 |
*** slomo_ has joined #timvideos | 14:46 | |
CarlFK | ah, no to | 14:48 |
CarlFK | i tried git checkout to pull_40 | 14:48 |
*** slomo has quit IRC | 14:50 | |
CarlFK | woo look at all those balls go :D | 14:54 |
*** Niharika has quit IRC | 18:21 | |
*** hyades has quit IRC | 19:15 | |
*** CarlFK has quit IRC | 19:39 | |
*** hyades has joined #timvideos | 20:20 | |
*** CarlFK has joined #timvideos | 20:26 | |
*** ChanServ sets mode: +v CarlFK | 20:26 | |
*** slomo_ has quit IRC | 20:42 | |
*** slomo has joined #timvideos | 20:45 | |
*** slomo has joined #timvideos | 20:45 | |
*** slomo has quit IRC | 21:14 |
Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!