aboutsummaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2018-02-28jibuf: Take RTP marker into accountPau Espin Pedrol3-2/+74
Change-Id: Ie142acfb45650e0af775f58226fd191beaf8178e
2018-02-28tests: jibuf_tool: Add parameters to control size of bufferPau Espin Pedrol1-4/+14
Change-Id: I8a7fa39985f8d197e24c32cab80299aba2d03087
2018-02-28tests: jibuf_tool: Add OSMUX supportPau Espin Pedrol1-5/+42
Change-Id: I0f02da0329e6739ff340d31113161bb520b1b760
2018-02-28tests: jibuf_tool: Improve jibuf_test to read pcapsPau Espin Pedrol3-105/+305
Change-Id: I7a13c823fb70e0adbc5fa0726fd66b15dc40014e Signed-off-by: Pau Espin Pedrol <pespin@sysmocom.de>
2018-02-28tests: jibuf_tool: Initial commitPau Espin Pedrol3-0/+418
Change-Id: I92307c8b1483dd488339771462290aae0ae5689a
2018-02-28jibuf: Add initial implementation of Jitter BufferPau Espin Pedrol4-2/+957
Change-Id: I9688ba9c4d5b733b9f29d0f15f73750f9271ef55
2018-02-26test: osmo-pcap-test: Fix clock drift while replaying pcap filePau Espin Pedrol2-7/+26
In the previous implementation, the processing time was not being taken into account, which was implicitly added for each new packet to be sent, which caused a steady incremental drift in the clock clearly visible when analysing a RTP stream. As it uses timespecsub, it depends on libosmocore Change-Id I45fc993b9bb0a343763238bf463c8640f47b00f1. Change-Id: I11cb9a63e16e829ccd4af1096b9f473c802d822f
2017-09-11osmux: fix buffer management mess in snprintf() callsPablo Neira Ayuso1-4/+4
SNPRINTF_BUFFER_SIZE() looks too complex, previous version maintains two different variables to account for the remaining space in the buffer, one of them is always decremented based on what snprintf() returns, which may result in underflow. These variables are swapped - not used consistently - all over this code. Replace this macro by a simplified version, with one single parameter to account for remaining space. This macro also deals with two corner cases: 1) snprintf() fails, actually never happens in practise, but documentation indicates it may return -1, so let's catch this case from here to stick to specs. 2) There is not enough space in the buffer, in that case, keep increasing offset, so we know how much would have been printed, just like snprintf() does. Thanks to Pau Espin for reporting, and Holger for clues on this. I have run osmux_test and, at quick glance, it looks good. Change-Id: I5b5d6ec57a02f57c23b1ae86dbd894bad28ea797
2017-08-14osmux: Slightly improve output format of osmux_snprintfPau Espin Pedrol1-1/+1
The buffer for osmux_test is increased as the former doesn't seem to be able to cope with the whole output. Change-Id: Ic838dd9d7ad89b4510ccfa58c0390c69a075b616
2017-08-08tests: osmo-pcap: Allow different l2 pktsPau Espin Pedrol9-50/+189
Before this patch, ETH was assumed and other types were not supported. This patch also adds Linux cooked packet support for L2. Change-Id: Ie62fa0a8e45e1e141edb64b116dad185ad9c7a5f
2017-08-08tests: osmo-pcap: Fix per packet timerPau Espin Pedrol2-7/+13
Before this commit, the gap time between 2 packets {n-1, n} was being applied to {n, n+1}. Change-Id: I715865c1edd1fc2ec9b024671d91eb72559cbdea
2017-04-27osmux: Use osmo_gettimeofday for testing puroposesPau Espin Pedrol1-4/+24
This way we can use fake time and osmux_test take 700ms instead of >2sec to run. Change-Id: Ic39cab74400aca8262a00c0d06884230b1a15ca3
2017-04-27osmux: Add RTP marker bit supportPau Espin Pedrol1-1/+64
According to RFC4867 (RTP payload format for AMR): "The RTP header marker bit (M) SHALL be set to 1 if the first frameblock carried in the packet contains a speech frame which is the first in a talkspurt. For all other packets the marker bit SHALL be set to zero (M=0)." This information bit provides a way for the receiver to better synchronize the delay with ther sender. This is specially useful if AMR DTX features are supported and enabled on the sender. Change-Id: I0315658159429603f1d80a168718b026015060e9
2016-10-01configure: check for pkg-config presenceNeels Hofmeyr1-0/+7
Change-Id: Ifaea95befa3d1d8f6f047e22efcd62cb0bd8b287
2016-07-07osmux-test: remove real-time constraint by defaultNeels Hofmeyr1-0/+10
Introduce a local #define to disable the real-time constraint from osmux-test. It would make sense to remove this completely, but in case anyone may be interested in the timing on a specific platform, I've just #defined it away. The real-time constraint to pass or fail the test is a bad idea in terms of our build server. Whenever the server is loaded, the tests will fail for no reason, like here: https://gerrit.osmocom.org/474 The real time to calculate is highly dependent also on the hardware platform. The arbitrarity of the time constraint is sort of proven by dd24cdd95f3fb8c8f which simply doubles the time to pass the test. Change-Id: Ic1da4bd22411652334f73195b2e37853e0738906
2016-02-29osmux_test.c: tweak error reportNeels Hofmeyr1-1/+3
2015-07-21tests: osmux: iterate 64 times in osmo_test_loop()Pablo Neira Ayuso1-1/+1
Instead of 63, this resolves major "definitely lost" remaining leak that valgrind reports regarding msgb.
2015-07-21tests: compile tests with debugging symbols, ie. -gPablo Neira Ayuso1-1/+1
Useful when debuggin via valgrind/gdb.
2015-07-21tests: osmux: fix msgb leaksPablo Neira Ayuso1-0/+2
2015-07-21tests: osmux: test circuit reopening after closurePablo Neira Ayuso1-0/+7
Make sure circuit routines works correctly.
2015-07-21tests: osmux: validate dummy padding with no voice data interactionPablo Neira Ayuso1-0/+4
Make sure that early dummy bandwitch preallocation works fine in the absence of any kind of voice traffic.
2015-07-21tests: osmux: test online deactivation of dummy paddingPablo Neira Ayuso1-0/+4
Add RTP packets to circuit with dummy padding enabled to test automatic deactivation once when start seeing real voice traffic.
2015-07-21tests: osmux: factor out main test loopPablo Neira Ayuso1-28/+36
Move main test loop routine to the new osmux_test_loop() function.
2015-07-21tests: osmux: adapt it to use the new circuit APIPablo Neira Ayuso1-0/+13
This also introduces a spare circuit that contains no voice data to test bandwidth preallocation through the new osmux dummy frame type.
2014-10-02build: remove all_includesJan Engelhardt1-1/+1
This variable is never set and could therefore be removed.
2014-10-02build: put dependency libraries in the right place in MakefilesJan Engelhardt1-1/+1
Libs must be in _LDADD/_LIBADD and not in _LDFLAGS.
2014-05-22misc: Fix distcheck and refer to the right file0.0.3Holger Hans Peter Freyther3-4/+5
2013-12-16tests: osmux: no need to skip RTP message anymorePablo Neira Ayuso1-6/+4
With the fan-out approach to test multi-batch added int (078d532 tests: osmux: test multi-batch support), this doesn't need the explicit skip as there are already gaps to be filled.
2013-12-16tests: osmux: test multi-batch supportPablo Neira Ayuso1-5/+9
Extend this to test multi-batch in one packet support, eg. OSMUX message (len=158) OSMUX seq=016 ccid=000 ft=1 ctr=6 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ]OSMUX seq=017 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ]
2013-05-27tests: osmux-test: double timing validation thresholdPablo Neira Ayuso1-1/+1
Double timing validation to avoid hitting errors easily.
2013-05-24tests: osmux_test: exercise osmux_replay_lost_packetsPablo Neira Ayuso1-2/+10
Emulate RTP message loss to test osmux_replay_lost_packets code in src/osmux.c. After this test, lcov reports 90.3% line coverage of osmux.c
2013-05-24tests: osmux_test: deadline after 10 secondsPablo Neira Ayuso1-0/+14
If the test takes longer than 10 seconds (it barely takes less than a second according to `time'), bail out and report an error.
2013-05-24tests: Use the libosmonetif we just built for the testsHolger Hans Peter Freyther1-1/+1
Use the library we just built instead for one already installed in the system.
2013-05-24add testsuite infrastructure and osmux testPablo Neira Ayuso4-0/+216
This patch adds the testsuite infrastructure and it populates it with one test for osmux. The osmux tests makes sure that: * We get the same number of RTP messages in the input and the output path. * The payload of the RTP message is reconstructed correctly. * The reconstructed timing is correct.
2013-02-12fix osmux_test with pcap filePablo Neira Ayuso1-5/+5
2012-10-20osmux: remove generic functions to register and get ccidPablo Neira Ayuso1-4/+45
Remove these functions: - osmux_xfrm_input_get_ccid - osmux_xfrm_input_register_ccid The ccid will be managed by the BSC and it will be stored in the mgcp_endpoint structure. Also adjust all tests and examples using the API.
2012-10-15osmux: release of batch message is controled by callerPablo Neira Ayuso1-0/+1
Instead of internally released. This is required if we use the osmo_dgram infrastructure, to avoid a double release. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2012-08-06osmux: support two concurrent calls in output pathPablo Neira Ayuso1-4/+2
2012-08-06osmux: add infrastructure to map RTP SSRC and osmux CCIDPablo Neira Ayuso1-0/+9
2012-08-06osmux: batching factor can be explicitly configured by callerPablo Neira Ayuso1-0/+1
Not hardcoded in osmux.c code anymore.
2012-08-06osmux: store internal batching information in struct osmux_in_handlePablo Neira Ayuso1-1/+1
The layout is not provided, as it is internal. Thus, we don't allocate the internal batching information in BSS anymore.
2012-08-04osmux: remove timeval parameter from osmux_tx_schedPablo Neira Ayuso1-4/+1
We can internal allocate this in the stack, no need to expose it to the caller.
2012-08-04osmux: cleanup tx pathPablo Neira Ayuso1-20/+5
This patch cleans up the transmission path for osmux, this involves the functions that extract the messages from the batch and the one that reconstruct the timing. They now take a list that contains the reconstructed RTP messages: osmux_xfrm_output(osmuxh, &h_output, &list); osmux_tx_sched(&list, &tv, tx_cb, NULL);
2012-08-04fix wrong delta between two RTP messagesPablo Neira Ayuso1-1/+1
it should 20 ms, not 160 ms. Thanks for Holger for spotting this.
2012-08-02osmux: major rework to reduce batch message size (add counter field)Pablo Neira Ayuso1-0/+10
This patch adds the counter field to the osmux header, so we can reduce the size of the batch even further, eg. osmuxhdr (ctr=3) speech speech speech osmuxhdr (ctr=2) speech speech ... The new header is the following: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FT | CTR |F|Q| SeqNR | Circuit ID |AMR-FT |AMR-CMR| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The counter field is 3 bits long, thus, we can batch up to 8 RTP speech frames into one single batch per circuit ID. I have also removed the RTP marker, since it can be reconstructed from the AMR information. Moreover, the entire workflow has been also reworked. Whenever a packet arrives, we introduce it into the batch list. This batch list contains a list of RTP messages ordered by RTP SSRC. Then, once the batch timer expires or the it gets full, we build the batch from the list of RTP messages. Note that this allows us to put several speech frame into one single osmux header without actually worrying about the amount of messages that we'll receive. The functions that reconstruct the RTP messages has been also adjusted. Now, it returns a list of RTP messages per RTP SSRC that has been extracted from the batch.
2012-08-02tests: osmux: initialize input handler before first runPablo Neira Ayuso1-2/+2
Make sure we don't segfault due to uninitiliazed handler.
2012-08-02tests: osmo-pcap: callback control the release of the emulated packetPablo Neira Ayuso1-2/+0
The callback is now in charge of releasing the packet.
2012-08-02tests: osmo-pcap: cleanup for osmux test receiver loopPablo Neira Ayuso1-11/+7
2012-07-19tests: osmo-pcap: use logging infrastructurePablo Neira Ayuso1-0/+26
so far, it was missing and printf was used instead of the generic logging infrastructure that osmocom provides.
2012-07-19tests: osmo-pcap: split packet replay from osmux_test codePablo Neira Ayuso4-118/+189
This patch splits in two files the code that contains the packet replay based on PCAP from the osmux test.