aboutsummaryrefslogtreecommitdiffstats
path: root/tests/CommonLibs
AgeCommit message (Collapse)AuthorFilesLines
2018-04-27build: Fix make distcheckPau Espin Pedrol1-1/+2
Change-Id: I1fa5e34b44331cd56408ea7ad4483dcf6443b259
2018-04-25Logger: Print correct source file and line numberPau Espin Pedrol1-5/+5
Before this commit, always Logger.cpp:53 was being printed. Change-Id: Ie5c64b4961c7c41d23484784a93eda5e08331f08
2018-04-16use osmo_init_logging2()Pau Espin Pedrol1-1/+6
Change-Id: I2c28e6e6e3eb9f587680b34330e03408e32c2b94
2018-02-27Logger: Use libosmocore logging systemPau Espin Pedrol4-68/+35
We still need an intermediate class Logger due to osmo-trx being multi-threaded and requiring to have a lock to use libosmocore, which is not thread safe. Change-Id: I30baac89f53e927f8699d0586b43cccf88ecd493
2018-02-20Logger: Drop syslog supportPau Espin Pedrol1-1/+1
This feature is currently not being used, so let's drop it to make it easier to integrate into libosmocore logging system in the future. Change-Id: I8282745ef0282d41599eaf94fe460a1d29b18e2a
2018-02-20Logger: get rid of alarm APIsPau Espin Pedrol2-46/+0
It's only used internally inside the Logger module, and in case there's an "alarm" (level more than critical) we still print on cerr, so we can just rely on our system catching stderr instead of stdout to handle it. Change-Id: I6d6df1578c3a4c1a37bd0d69952d443f62eed2ab
2018-01-31tests: null-terminate bufferMax1-1/+1
Initialize temporary buffer with 0 to make sure that it's null-terminated. Change-Id: Icdde701839e35d3131605ea5a11882af21c8939a Fixes: CID149362
2018-01-15tests: TimevalTest: refactor and avoid double comparisonPau Espin Pedrol1-9/+15
Before this patch, the experession assert(then_secondws==then.seconds()) was failing in x86 architecture (and passing when adding a fprintf to debug it). Avoid comparing the double values with == as that's usually a bad idea, since the processor can output slightly different results for the same operation depending on how it is optimized. Use timespec() instead to check the invariant. Take the chance to refactor some variables around to make the test easier to read. Change-Id: Id4324be8ece86d371b1acb46bbd97856dfed241d
2018-01-15tests: SocketsTest: Fail test on write failPau Espin Pedrol1-1/+7
Change-Id: Ib6b778a2225339ebd2eaa80b3fca6ee8d8646b23
2018-01-15tests: SocketsTest: Avoid hang forever if test failsPau Espin Pedrol1-1/+15
Change-Id: Ia95e216a2ab6d397ab02c828b70f2b95d1671257
2018-01-15tests: SocketTests: Pick OS-assigned instead of setting one manuallyPau Espin Pedrol1-8/+9
This fixes failures if the port is already being taken by other apps or if this test is run several times concurrently in the same system. Change-Id: Iea213375e489a56cf8ed3e47fe814e17c288803e
2018-01-11Remove UDDSocket classPau Espin Pedrol1-28/+1
This class is not used anymore in osmo-trx, so we can safely remove it. Change-Id: I67f90aa3d6a2a5e92292436d10928e0705c8f8ff
2018-01-10tests: Sockets: adapt to have reproducible output and enable autotestPau Espin Pedrol2-5/+8
Change-Id: I5414076c6846b849973bcdeb3f2358b28dcb004c
2018-01-10tests: Log: adapt to have reproducible output and enable autotestPau Espin Pedrol3-83/+85
Change-Id: I77c40230503acadef5f64ab2624cd872f9782b98
2018-01-10tests: Timeval: adapt to have reproducible output and enable autotestPau Espin Pedrol2-26/+18
Change-Id: I1a79892ba3c934879a171789e0edb357277acae4
2018-01-10tests: InterThread: adapt to have reproducible output and enable autotestPau Espin Pedrol2-86/+28
Change-Id: I05d4067890b526bd72d2eb31cf76de43ee11e80f
2018-01-10Set up GNU Autotest infrastructurePau Espin Pedrol15-0/+743
Test files are moved from CommonLibs/ to tests/CommonLibs/. Some tests are disabled in autotest because they generate timedate related output which cannot exactly match against expected output. Change-Id: I3d6ba625968be09297642d18090c496490e9b8fc