Friday, 2014-11-28

*** tpb has joined #timvideos00:00
mithroshenki: have you figured out your flights yet?00:59
mithro~seen Joelw01:00
tpbmithro: Joelw was last seen in #timvideos 5 weeks, 3 days, 19 hours, 55 minutes, and 1 second ago: <Joelw> Ah, tricky!01:00
shenkimithro: nope01:02
shenkimithro: waiting on work01:02
shenkimithro: will ping them01:03
mithroshenki: what is the best way to "unit test" c code? Does rusty have opinions?01:06
shenkimithro: heh. define 'best'01:07
shenkimithro: take a look at ccan for how he does tests01:07
mithroprobably "most popular so when things go wrong I can find the answer on Google" :P01:07
mithrosince this is a gstreamer application, I guess I should check what they use01:09
shenkiat 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
shenkiin skiboot we have a makefile that builds and runs tests when you do make check01:10
tpbTitle: Unit Testing C Code - Stack Overflow (at
*** rusty has joined #timvideos01:14
rustymithro: C code testing?  Bwahahaha!01:14
mithrorusty: basically, I have a parsing function that I want to check gets the right output on some example input01:15
mithrocurrently I just have a main() function which does a g_assert_cmpint01:15
shenkimithro: what are you testing?01:16
mithroshenki: gst-switch01:16
rustymithro: 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
rustymithro: I don't believe in precanned test infrastructure, since assert() is well-known and obvious.01:17
mithrorusty: okay, that might be a way to start01:17
mithrolooks like gtk/glib has some type of inbuilt stuff which makes comparing their wrapped types easier01:17
rustymithro: 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
rustymithro: this will allow you to test it with american fuzzy lop, FTW.01:19
mithrorusty: I'm quite happy for this to crash on junk :P - I'm more interested in making sure valid input does the right thing01:20
rustymithro: then I'd parse and spit out output, and have your test wrapper check the output matches some canned output.01:21
rustymithro: don't spend too much time on it; getting *some tests* gets you 90% of the way there, in practice.01:21
mithrorusty: yeah true01:23
rustymithro: yeah, good testing is the other 90% :)01:24
*** hyades has joined #timvideos02:59
*** Joelw has joined #timvideos03:44
*** 17SAA0E0K has quit IRC03:46
*** 7JTABL4JK has joined #timvideos03:48
*** rusty has quit IRC05:03
tpbTitle: SLUG November 2014 - Lightning Talks - YouTube (at
*** slomo has joined #timvideos08:37
tpbTitle: SLUG November 2014 - "Creating your own virtual appliance" by Robert Smit - YouTube (at
mithrohyades: ping?09:20
hyadesmithro: pong09:23
mithrohyades: I'm trying to understand the current .travis.yml file09:23
hyadesthere are four environments - unittests, integration, all tests and c coverage09:26
mithrothey are split into two groups, python-api and c09:27
mithro  - TEST=python-api TYPE=unittest09:27
mithro  - TEST=python-api TYPE=integration09:27
mithro  - TEST=module TYPE=python09:27
mithro  - TEST=module TYPE=c09:27
hyadesmithro: yea09:30
*** Niharika has joined #timvideos13:11
CarlFKmithro: did you want me to do something with "@CarlFK I used your tests/ script to verify the issue."14:20
tpbTitle: Use sync=false on imagesinks as feeds are live. by mithro · Pull Request #40 · timvideos/gst-switch · GitHub (at
mithroCarlFK: give it a try14:21
CarlFKmithro: how do I get to mithro:sync-false14:26
hyadesCarlFK: git fetch origin pull/40/head:pull_40, and then checkout to pull_40 ?14:35
CarlFK?checkout to pull_4014:44
hyadesafter doing fetch14:46
*** slomo_ has joined #timvideos14:46
CarlFKah, no to14:48
CarlFKi tried git checkout to pull_4014:48
*** slomo has quit IRC14:50
CarlFKwoo look at all those balls go :D14:54
*** Niharika has quit IRC18:21
*** hyades has quit IRC19:15
*** CarlFK has quit IRC19:39
*** hyades has joined #timvideos20:20
*** CarlFK has joined #timvideos20:26
*** ChanServ sets mode: +v CarlFK20:26
*** slomo_ has quit IRC20:42
*** slomo has joined #timvideos20:45
*** slomo has joined #timvideos20:45
*** slomo has quit IRC21:14

Generated by 2.13.1 by Marius Gedminas - find it at!