Re: [hackers] [sbase][PATCH v2] Add tests for some utilities

2018-08-03 Thread Dimitris Papastamos
On Fri, Aug 03, 2018 at 11:36:10AM +0200, Silvan Jegen wrote: > Hi Roberto > > On Fri, Aug 3, 2018 at 8:37 AM, Roberto E. Vargas Caballero > wrote: > > Hi, > > > > On Wed, Aug 01, 2018 at 09:16:26PM +0200, Silvan Jegen wrote: > >> > * `echo` is unportable and `printf` should be used instead. >

Re: [hackers] [sbase][PATCH v2] Add tests for some utilities

2018-08-03 Thread Silvan Jegen
Hi Roberto On Fri, Aug 3, 2018 at 8:37 AM, Roberto E. Vargas Caballero wrote: > Hi, > > On Wed, Aug 01, 2018 at 09:16:26PM +0200, Silvan Jegen wrote: >> > * `echo` is unportable and `printf` should be used instead. >> >> Didn't know that echo was not portable. Thought it was just a builtin >>

Re: [hackers] [sbase][PATCH v2] Add tests for some utilities

2018-08-03 Thread Roberto E. Vargas Caballero
Hi, On Wed, Aug 01, 2018 at 09:16:26PM +0200, Silvan Jegen wrote: > > * `echo` is unportable and `printf` should be used instead. > > Didn't know that echo was not portable. Thought it was just a builtin > that should work the same everywhere. It's probably the flags that are > the issue...

Re: [hackers] [sbase][PATCH v2] Add tests for some utilities

2018-08-03 Thread Roberto E. Vargas Caballero
Hi, On Wed, Aug 01, 2018 at 04:36:35PM +0200, Silvan Jegen wrote: > I definitely think we should have unit tests for sbase (and other > projects?) as soon as possible. What concerns me with your approach is > that we have about 700 lines of C code in testing-common.{c,h} of which > I feel quite a

Re: [hackers] [sbase][PATCH v2] Add tests for some utilities

2018-08-01 Thread Silvan Jegen
On Wed, Aug 01, 2018 at 10:12:54PM +0200, Mattias Andrée wrote: > On Wed, 1 Aug 2018 22:07:33 +0200 > Mattias Andrée wrote: > > [...] > > > On Wed, 1 Aug 2018 21:16:26 +0200 > > Silvan Jegen wrote: > > > > > On Wed, Aug 01, 2018 at 07:53:18PM +0200, Mattias Andrée wrote: > > > > Thank you

Re: [hackers] [sbase][PATCH v2] Add tests for some utilities

2018-08-01 Thread Silvan Jegen
On Wed, Aug 01, 2018 at 10:07:33PM +0200, Mattias Andrée wrote: > On Wed, 1 Aug 2018 21:16:26 +0200 > Silvan Jegen wrote: > > [...] > > > On Wed, Aug 01, 2018 at 07:53:18PM +0200, Mattias Andrée wrote: > > > Thank you for your time! > > > * uname: > > > Most of uname can be tested in ed,

Re: [hackers] [sbase][PATCH v2] Add tests for some utilities

2018-08-01 Thread Mattias Andrée
On Wed, 1 Aug 2018 22:07:33 +0200 Mattias Andrée wrote: > On Wed, 1 Aug 2018 21:16:26 +0200 > Silvan Jegen wrote: > > > On Wed, Aug 01, 2018 at 07:53:18PM +0200, Mattias Andrée wrote: > > > Thank you for your time! > > > > Thank you for all your work! :P > > Hi again Silvan, > > >

Re: [hackers] [sbase][PATCH v2] Add tests for some utilities

2018-08-01 Thread Silvan Jegen
On Wed, Aug 01, 2018 at 07:53:18PM +0200, Mattias Andrée wrote: > Thank you for your time! Thank you for all your work! :P > The common code is 590 lines of code, including: > > * 102 lines of code related to identifying the error when the > test fails. > > * 14 lines of code for properly

Re: [hackers] [sbase][PATCH v2] Add tests for some utilities

2018-08-01 Thread Mattias Andrée
Hi Silvan, Thank you for your time! The common code is 590 lines of code, including: * 102 lines of code related to identifying the error when the test fails. * 14 lines of code for properly killing processes on failure, abortion, and when a test case hangs. * 32 lines of code, plus 13 of

Re: [hackers] [sbase][PATCH v2] Add tests for some utilities

2018-08-01 Thread Silvan Jegen
Hi Mattias! On Wed, Jul 11, 2018 at 09:39:23PM +0200, Mattias Andrée wrote: > The following utilities are tested: > - basename(1) > - dirname(1) > - echo(1) > - false(1) > - link(1) > - printenv(1) > - sleep(1) > - test(1) > - time(1) > - true(1) > - tty(1) > - uname(1) > - unexpand(1) > -

[hackers] [sbase][PATCH v2] Add tests for some utilities

2018-07-11 Thread Mattias Andrée
The following utilities are tested: - basename(1) - dirname(1) - echo(1) - false(1) - link(1) - printenv(1) - sleep(1) - test(1) - time(1) - true(1) - tty(1) - uname(1) - unexpand(1) - unlink(1) - whoami(1) - yes(1) Some tests contain "#ifdef TODO", these tests current fail, but there are patches