index
:
libcamera/jmondi/libcamera.git
imx8mp/extensible-format
imx8mp/extensible-format-v8
imx8mp/extensible-format-v9
isi/raw_sensor
isi/raw_sensor_v2
jmondi/android/ndk/pinephonepro
jmondi/android/pinephonepro
jmondi/android/vndk
jmondi/device-match-generalize
jmondi/imx8mp/debix-a
jmondi/lc-compliance-cros
jmondi/pinephone
jmondi/pinephonepro
jmondi/pinephonepro-af
jmondi/rk3399/google-dru-scarlet
jmondi/rockpi/af/imx519
jmondi/rpi5-on-mainline
multicontext/rpi/v3
pfc/rkisp1-free-run
pfc/rkisp1-free-run-upstreaming
pfc/rkisp1-free-run-v2
rcar-gen4
yaml-emitter
Jacopo Mondi's clone of libcamera
git repository hosting on libcamera.org
summary
refs
log
tree
commit
diff
log msg
author
committer
range
path:
root
/
test
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
Calling the cleanup() function in the base class Test destructor only calls the base class empty cleanup() function, not the overloaded one. This results in tests not cleaning up after themself. Solve this by explicitly calling the cleanup() function from execute(). This was discovered while running valgrind on tests where objects where allocated in init() and freed in cleanup(). Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat
(limited to 'test')
-rw-r--r--
test/test.cpp
7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/test.cpp b/test/test.cpp
index 4e7779e7..1bb6ebcb 100644
--- a/
test/test.cpp
+++ b/
test/test.cpp
@@ -13,7 +13,6 @@ Test::Test()
Test::~Test()
{
- cleanup();
}
int Test::execute()
@@ -24,5 +23,9 @@ int Test::execute()
if (ret < 0)
return ret;
- return run();
+ ret = run();
+
+ cleanup();
+
+ return ret;
}