aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnusha Gugale <external.agogale@jp.adit-jv.com>2021-07-27 11:19:17 +0530
committerAnusha Gugale <external.agogale@jp.adit-jv.com>2021-08-24 19:02:03 +0530
commit814e686da31aa2261529e1e166ee952a1ac5ba54 (patch)
tree7775b1ff9a284d612266f95a61e706df4e6fdf1a /src
parentd68ed0af3de3ee672c5ee38a7dff9e2c37ece1d5 (diff)
Bug-AGL: SPEC-4030 Signed-off-by: Anusha Gugale <external.agogale@jp.adit-jv.com> Change-Id: I6c8bad2ba0dc073aae0a31d9e0a68f46d767e9eb
Diffstat (limited to 'src')
-rw-r--r--src/wth-receiver-gst-shm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wth-receiver-gst-shm.c b/src/wth-receiver-gst-shm.c
index be21f6c..78a07da 100644
--- a/src/wth-receiver-gst-shm.c
+++ b/src/wth-receiver-gst-shm.c
@@ -613,7 +613,10 @@ destroy_window(struct window *window)
{
if (window->callback)
wl_callback_destroy(window->callback);
-
+ if(window->buffers[0].buffer)
+ wl_buffer_destroy(window->buffers[0].buffer);
+ if(window->buffers[1].buffer)
+ wl_buffer_destroy(window->buffers[1].buffer);
if (window->xdg_toplevel)
xdg_toplevel_destroy(window->xdg_toplevel);
@@ -696,6 +699,8 @@ create_display(void)
static void
destroy_display(struct display *display)
{
+ if(display->shm)
+ wl_shm_destroy(display->shm);
if (display->compositor)
wl_compositor_destroy(display->compositor);
d-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/bin/sh


if [ ! -e /sys/class/net/can1 ];then
	lava-test-case canconfig_can0 --result skip
	lava-test-case canconfig_can1 --result skip
	lava-test-case start_can0 --result skip
	lava-test-case start_can1 --result skip
	lava-test-case send_frames_through_can0 --result skip
	lava-test-case receive_frames_through_can1 --result skip
	lava-test-case stop_can0 --result skip
	lava-test-case stop_can1 --result skip
	exit 0
fi

#config the can interfaces
ip link set can0 type can bitrate 50000
if [ $? -eq 0 ];then
	lava-test-case canconfig_can0 --result pass
else
	lava-test-case canconfig_can0 --result fail
fi
sleep 3
ip link set can1 type can bitrate 50000
if [ $? -eq 0 ];then
	lava-test-case canconfig_can1 --result pass
else
	lava-test-case canconfig_can1 --result fail
fi
sleep 3
#bring up the devices
ip link set can0 up
if [ $? -eq 0 ];then
	lava-test-case start_can0 --result pass
else
	lava-test-case start_can0 --result fail
fi
sleep 3
ip link set can1 up
if [ $? -eq 0 ];then
	lava-test-case start_can1 --result pass
else
	lava-test-case start_can1 --result fail
fi
sleep 3
#send frames
cangen can0 &
if [ $? -eq 0 ];then
	lava-test-case send_frames_through_can0 --result pass
else
	lava-test-case send_frames_through_can0 --result fail
fi

#receive frames
file_can=$(mktemp)
candump can1 > $file_can &
sleep 3
if [ -s $file_can ];then
	lava-test-case receive_frames_through_can1 --result pass
else
	lava-test-case receive_frames_through_can1 --result fail
fi
rm $file_can

sleep 10
ip link set can0 down
if [ $? -eq 0 ];then
	lava-test-case stop_can0 --result pass
else
	lava-test-case stop_can0 --result fail
fi
sleep 3
ip link set can1 down
if [ $? -eq 0 ];then
	lava-test-case stop_can1 --result pass
else
	lava-test-case stop_can1 --result fail
fi
sleep 5