test/datarepo_src: scope error
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 10 Oct 2023 10:26:09 +0000 (19:26 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Wed, 11 Oct 2023 04:08:30 +0000 (13:08 +0900)
commit5aee067ddc51efeccc3572f1668cb2a441abb2ec
tree251a5ca85ec6875bf5529566586ed0ec5906b1da
parentf4c16bb7dee5c80a7e66f415ac2dc08ef33612f1
test/datarepo_src: scope error

The bus_callback was using a global variable, loop,
while its registerers (e.g., TEST (datareposrc, fps30ReadFlexibleTensors) )
has loop local variable.

Therefore, the callback has been using uninitialied and unrelated
global variable, loop, which often causes unit test errors:

```
[  316s] [ RUN      ] datareposrc.fps30ReadFlexibleTensors
[  317s] Elapsed time: 0.687305 second
[  317s] ../tests/nnstreamer_datarepo/unittest_datareposrc.cc:686: Failure
[  317s] Expected: (0.8) < (elapsed_time), actual: 0.8 vs 0.687305
[  317s] Elapsed time: 0.003219 second
[  318s] Elapsed time: 1.001501 second
[  318s] [  FAILED  ] datareposrc.fps30ReadFlexibleTensors (2045 ms)
```

by exiting from g_main_loop too early.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
tests/nnstreamer_filter_reload/tensor_filter_reload_test.c