From 2db60d6d4a12c393db69fba404917074b5bc6d91 Mon Sep 17 00:00:00 2001
From: Jakob Olsson <jakobols@kth.se>
Date: Tue, 12 Jun 2018 11:42:56 +0200
Subject: [PATCH] example script to test for memory leakgae in pin and apn
 functionality

---
 memory_check_apn | 8 ++++++++
 memory_check_pin | 7 +++++++
 2 files changed, 15 insertions(+)
 create mode 100644 memory_check_apn
 create mode 100644 memory_check_pin

diff --git a/memory_check_apn b/memory_check_apn
new file mode 100644
index 0000000..b4e4cb8
--- /dev/null
+++ b/memory_check_apn
@@ -0,0 +1,8 @@
+
+while true;do
+	ubus call dongle.usb0 list_apn_profiles
+	ubus call dongle.usb0 create_apn_profiles '{"profile_name":"abc", "wan_apn":"abcde", "pdp_type": "IP"}'
+	ubus call dongle.usb0 set_apn_profile '{"profile_name":"abc"}'
+	ubus call dongle.usb0 delete_apn_profile '{"profile_name":"abc"}'
+	ubus call dongle.usb0 current_apn_profile
+done
\ No newline at end of file
diff --git a/memory_check_pin b/memory_check_pin
new file mode 100644
index 0000000..b7c1c2b
--- /dev/null
+++ b/memory_check_pin
@@ -0,0 +1,7 @@
+
+while true;do
+	ubus call dongle.usb0 verify_pin '{"pin":"3242"}'
+	ubus call dongle.usb0 verify_pin '{"pin":"3242"}'
+	ubus call dongle.usb0 verify_pin '{"pin":"3242"}'
+	ubus call dongle.usb0 unlock_sim '{"new_pin":"5555", "puk":"17923619"}'
+done
\ No newline at end of file
-- 
GitLab