1#!/usr/bin/env python3.4
2#
3#   Copyright 2017 - Google
4#
5#   Licensed under the Apache License, Version 2.0 (the "License");
6#   you may not use this file except in compliance with the License.
7#   You may obtain a copy of the License at
8#
9#       http://www.apache.org/licenses/LICENSE-2.0
10#
11#   Unless required by applicable law or agreed to in writing, software
12#   distributed under the License is distributed on an "AS IS" BASIS,
13#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14#   See the License for the specific language governing permissions and
15#   limitations under the License.
16"""
17    Test Script for Telephony Stress Call Test
18"""
19
20import collections
21import json
22import os
23import random
24import time
25
26from acts import utils
27from acts.asserts import fail
28from acts.test_decorators import test_tracker_info
29from acts.test_utils.tel.TelephonyBaseTest import TelephonyBaseTest
30from acts.test_utils.tel.tel_defines import MAX_WAIT_TIME_SMS_RECEIVE
31from acts.test_utils.tel.tel_defines import NETWORK_MODE_WCDMA_ONLY
32from acts.test_utils.tel.tel_defines import NETWORK_MODE_GLOBAL
33from acts.test_utils.tel.tel_defines import NETWORK_MODE_CDMA
34from acts.test_utils.tel.tel_defines import NETWORK_MODE_GSM_ONLY
35from acts.test_utils.tel.tel_defines import NETWORK_MODE_TDSCDMA_GSM_WCDMA
36from acts.test_utils.tel.tel_defines import NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA
37from acts.test_utils.tel.tel_defines import WAIT_TIME_AFTER_MODE_CHANGE
38from acts.test_utils.tel.tel_defines import WFC_MODE_WIFI_PREFERRED
39from acts.test_utils.tel.tel_test_utils import STORY_LINE
40from acts.test_utils.tel.tel_test_utils import active_file_download_test
41from acts.test_utils.tel.tel_test_utils import is_phone_in_call
42from acts.test_utils.tel.tel_test_utils import call_setup_teardown
43from acts.test_utils.tel.tel_test_utils import ensure_wifi_connected
44from acts.test_utils.tel.tel_test_utils import hangup_call
45from acts.test_utils.tel.tel_test_utils import hangup_call_by_adb
46from acts.test_utils.tel.tel_test_utils import initiate_call
47from acts.test_utils.tel.tel_test_utils import run_multithread_func
48from acts.test_utils.tel.tel_test_utils import set_wfc_mode
49from acts.test_utils.tel.tel_test_utils import sms_send_receive_verify
50from acts.test_utils.tel.tel_test_utils import start_adb_tcpdump
51from acts.test_utils.tel.tel_test_utils import stop_adb_tcpdump
52from acts.test_utils.tel.tel_test_utils import start_qxdm_loggers
53from acts.test_utils.tel.tel_test_utils import mms_send_receive_verify
54from acts.test_utils.tel.tel_test_utils import set_preferred_network_mode_pref
55from acts.test_utils.tel.tel_test_utils import wait_for_in_call_active
56from acts.test_utils.tel.tel_voice_utils import is_phone_in_call_3g
57from acts.test_utils.tel.tel_voice_utils import is_phone_in_call_2g
58from acts.test_utils.tel.tel_voice_utils import is_phone_in_call_csfb
59from acts.test_utils.tel.tel_voice_utils import is_phone_in_call_iwlan
60from acts.test_utils.tel.tel_voice_utils import is_phone_in_call_volte
61from acts.test_utils.tel.tel_voice_utils import phone_setup_csfb
62from acts.test_utils.tel.tel_voice_utils import phone_setup_voice_3g
63from acts.test_utils.tel.tel_voice_utils import phone_setup_voice_2g
64from acts.test_utils.tel.tel_voice_utils import phone_setup_volte
65from acts.test_utils.tel.tel_voice_utils import phone_idle_iwlan
66from acts.test_utils.tel.tel_voice_utils import get_current_voice_rat
67from acts.utils import get_current_epoch_time
68from acts.utils import rand_ascii_str
69
70EXCEPTION_TOLERANCE = 5
71
72
73class TelLiveStressTest(TelephonyBaseTest):
74    def setup_class(self):
75        super(TelLiveStressTest, self).setup_class()
76        self.dut = self.android_devices[0]
77        self.single_phone_test = self.user_params.get("single_phone_test",
78                                                      False)
79        # supported file download methods: chrome, sl4a, curl
80        self.file_download_method = self.user_params.get(
81            "file_download_method", "sl4a")
82        if len(self.android_devices) == 1:
83            self.single_phone_test = True
84        if self.single_phone_test:
85            self.android_devices = self.android_devices[:1]
86            self.call_server_number = self.user_params.get(
87                "call_server_number", STORY_LINE)
88            if self.file_download_method == "sl4a":
89                # with single device, do not use sl4a file download
90                # due to stability issue
91                self.file_download_method = "chrome"
92        else:
93            self.android_devices = self.android_devices[:2]
94        self.user_params["telephony_auto_rerun"] = False
95        self.wifi_network_ssid = self.user_params.get(
96            "wifi_network_ssid") or self.user_params.get(
97                "wifi_network_ssid_2g")
98        self.wifi_network_pass = self.user_params.get(
99            "wifi_network_pass") or self.user_params.get(
100                "wifi_network_pass_2g")
101        self.phone_call_iteration = int(
102            self.user_params.get("phone_call_iteration", 500))
103        self.max_phone_call_duration = int(
104            self.user_params.get("max_phone_call_duration", 600))
105        self.min_sleep_time = int(self.user_params.get("min_sleep_time", 10))
106        self.max_sleep_time = int(self.user_params.get("max_sleep_time", 120))
107        self.max_run_time = int(self.user_params.get("max_run_time", 14400))
108        self.max_sms_length = int(self.user_params.get("max_sms_length", 1000))
109        self.max_mms_length = int(self.user_params.get("max_mms_length", 160))
110        self.min_sms_length = int(self.user_params.get("min_sms_length", 1))
111        self.min_mms_length = int(self.user_params.get("min_mms_length", 1))
112        self.min_phone_call_duration = int(
113            self.user_params.get("min_phone_call_duration", 10))
114        self.crash_check_interval = int(
115            self.user_params.get("crash_check_interval", 300))
116
117        return True
118
119    def setup_test(self):
120        super(TelLiveStressTest, self).setup_test()
121        self.result_info = collections.defaultdict(int)
122        self._init_perf_json()
123
124    def on_fail(self, test_name, begin_time):
125        pass
126
127    def _setup_wfc(self):
128        for ad in self.android_devices:
129            if not ensure_wifi_connected(
130                    self.log,
131                    ad,
132                    self.wifi_network_ssid,
133                    self.wifi_network_pass,
134                    retries=3):
135                ad.log.error("Phone Wifi connection fails.")
136                return False
137            ad.log.info("Phone WIFI is connected successfully.")
138            if not set_wfc_mode(self.log, ad, WFC_MODE_WIFI_PREFERRED):
139                ad.log.error("Phone failed to enable Wifi-Calling.")
140                return False
141            ad.log.info("Phone is set in Wifi-Calling successfully.")
142            if not phone_idle_iwlan(self.log, ad):
143                ad.log.error("Phone is not in WFC enabled state.")
144                return False
145            ad.log.info("Phone is in WFC enabled state.")
146        return True
147
148    def _setup_lte_volte_enabled(self):
149        for ad in self.android_devices:
150            if not phone_setup_volte(self.log, ad):
151                ad.log.error("Phone failed to enable VoLTE.")
152                return False
153            ad.log.info("Phone VOLTE is enabled successfully.")
154        return True
155
156    def _setup_lte_volte_disabled(self):
157        for ad in self.android_devices:
158            if not phone_setup_csfb(self.log, ad):
159                ad.log.error("Phone failed to setup CSFB.")
160                return False
161            ad.log.info("Phone VOLTE is disabled successfully.")
162        return True
163
164    def _setup_3g(self):
165        for ad in self.android_devices:
166            if not phone_setup_voice_3g(self.log, ad):
167                ad.log.error("Phone failed to setup 3g.")
168                return False
169            ad.log.info("Phone RAT 3G is enabled successfully.")
170        return True
171
172    def _setup_2g(self):
173        for ad in self.android_devices:
174            if not phone_setup_voice_2g(self.log, ad):
175                ad.log.error("Phone failed to setup 2g.")
176                return False
177            ad.log.info("RAT 2G is enabled successfully.")
178        return True
179
180    def _send_message(self, max_wait_time=2 * MAX_WAIT_TIME_SMS_RECEIVE):
181        if self.single_phone_test:
182            ads = [self.dut, self.dut]
183        else:
184            ads = self.android_devices[:]
185            random.shuffle(ads)
186        selection = random.randrange(0, 2)
187        message_type_map = {0: "SMS", 1: "MMS"}
188        max_length_map = {0: self.max_sms_length, 1: self.max_mms_length}
189        min_length_map = {0: self.min_sms_length, 1: self.min_mms_length}
190        length = random.randrange(min_length_map[selection],
191                                  max_length_map[selection] + 1)
192        message_func_map = {
193            0: sms_send_receive_verify,
194            1: mms_send_receive_verify
195        }
196        message_type = message_type_map[selection]
197        the_number = self.result_info["%s Total" % message_type] + 1
198        begin_time = get_current_epoch_time()
199        start_qxdm_loggers(self.log, self.android_devices)
200        log_msg = "The %s-th %s test: of length %s from %s to %s" % (
201            the_number, message_type, length, ads[0].serial, ads[1].serial)
202        self.log.info(log_msg)
203        for ad in self.android_devices:
204            for session in ad._sl4a_manager.sessions.values():
205                try:
206                    session.rpc_client.logI(log_msg)
207                    break
208                except Exception as e:
209                    ad.log.warning(e)
210        text = "%s: " % log_msg
211        text_length = len(text)
212        if length < text_length:
213            text = text[:length]
214        else:
215            text += rand_ascii_str(length - text_length)
216        message_content_map = {0: [text], 1: [(log_msg, text, None)]}
217        incall_non_ims = False
218        for ad in self.android_devices:
219            if ad.droid.telecomIsInCall() and (
220                    not ad.droid.telephonyIsImsRegistered()):
221                incall_non_ims = True
222                break
223
224        if not message_func_map[selection](self.log, ads[0], ads[1],
225                                           message_content_map[selection],
226                                           max_wait_time):
227            self.result_info["%s Total" % message_type] += 1
228            if message_type == "SMS":
229                self.log.error("%s fails", log_msg)
230                self.result_info["%s Failure" % message_type] += 1
231                self._take_bug_report("%s_%s_No_%s_failure" %
232                                      (self.test_name, message_type,
233                                       the_number), begin_time)
234            else:
235                if incall_non_ims:
236                    self.log.info(
237                        "Device not in IMS, MMS in call is not support")
238                    self.result_info["Expected In-call MMS failure"] += 1
239                    return True
240                else:
241                    self.log.error("%s fails", log_msg)
242                    self.result_info["MMS Failure"] += 1
243                    if self.result_info["MMS Failure"] == 1:
244                        self._take_bug_report("%s_%s_No_%s_failure" %
245                                              (self.test_name, message_type,
246                                               the_number), begin_time)
247            return False
248        else:
249            self.result_info["%s Total" % message_type] += 1
250            self.log.info("%s succeed", log_msg)
251            self.result_info["%s Success" % message_type] += 1
252            return True
253
254    def _make_phone_call(self, call_verification_func=None):
255        ads = self.android_devices[:]
256        if not self.single_phone_test:
257            random.shuffle(ads)
258        for ad in ads:
259            hangup_call_by_adb(ad)
260        the_number = self.result_info["Call Total"] + 1
261        duration = random.randrange(self.min_phone_call_duration,
262                                    self.max_phone_call_duration)
263        result = True
264        if self.single_phone_test:
265            log_msg = "The %s-th phone call test for %ssec duration" % (
266                the_number, duration)
267        else:
268            log_msg = "The %s-th phone call test from %s to %s for %ssec" % (
269                the_number, ads[0].serial, ads[1].serial, duration)
270        self.log.info(log_msg)
271        for ad in ads:
272            try:
273                ad.droid.logI(log_msg)
274            except Exception as e:
275                ad.log.warning(e)
276        begin_time = get_current_epoch_time()
277        start_qxdm_loggers(self.log, self.android_devices, begin_time)
278        if self.single_phone_test:
279            call_setup_result = initiate_call(
280                self.log,
281                self.dut,
282                self.call_server_number,
283                wait_time_betwn_call_initcheck=5) and wait_for_in_call_active(
284                    self.dut, 60, 3)
285        else:
286            call_setup_result = call_setup_teardown(
287                self.log, ads[0], ads[1], ad_hangup=None, wait_time_in_call=0)
288        if not call_setup_result:
289            self.log.error("%s: Setup Call failed.", log_msg)
290            self.result_info["Call Setup Failure"] += 1
291            failure_reason = "setup"
292            result = False
293        else:
294            elapsed_time = 0
295            check_interval = 5
296            while (elapsed_time < duration):
297                check_interval = min(check_interval, duration - elapsed_time)
298                time.sleep(check_interval)
299                elapsed_time += check_interval
300                time_message = "at <%s>/<%s> second." % (elapsed_time,
301                                                         duration)
302                for ad in ads:
303                    if not call_verification_func(self.log, ad):
304                        ad.log.error("Call is NOT in correct %s state at %s",
305                                     call_verification_func.__name__,
306                                     time_message)
307                        self.result_info["Call Maintenance Failure"] += 1
308                        failure_reason = "maintenance"
309                        reasons = ad.search_logcat(
310                            "qcril_qmi_voice_map_qmi_to_ril_last_call_failure_cause",
311                            begin_time)
312                        if reasons:
313                            ad.log.info(reasons[-1]["log_message"])
314                        hangup_call(self.log, ads[0])
315                        result = False
316                    else:
317                        ad.log.info("Call is in correct %s state at %s",
318                                    call_verification_func.__name__,
319                                    time_message)
320                if not result:
321                    break
322        if not hangup_call(self.log, ads[0]):
323            time.sleep(10)
324            for ad in ads:
325                if ad.droid.telecomIsInCall():
326                    ad.log.error("Still in call after hungup")
327                    self.result_info["Call Teardown Failure"] += 1
328                    failure_reason = "teardown"
329                    result = False
330        self.result_info["Call Total"] += 1
331        if not result:
332            self.log.info("%s test failed", log_msg)
333            test_name = "%s_call_No_%s_%s_failure" % (self.test_name,
334                                                      the_number,
335                                                      failure_reason)
336            for ad in ads:
337                log_path = os.path.join(self.log_path, test_name,
338                                        "%s_binder" % ad.serial)
339                utils.create_dir(log_path)
340                ad.adb.pull("/sys/kernel/debug/binder %s" % log_path)
341            self._take_bug_report(test_name, begin_time)
342        else:
343            self.log.info("%s test succeed", log_msg)
344            self.result_info["Call Success"] += 1
345            if self.result_info["Call Total"] % 50 == 0:
346                test_name = "%s_call_No_%s_success_binder_logs" % (
347                    self.test_name, the_number)
348                for ad in ads:
349                    log_path = os.path.join(self.log_path, test_name,
350                                            "%s_binder" % ad.serial)
351                    utils.create_dir(log_path)
352                    ad.adb.pull("/sys/kernel/debug/binder %s" % log_path)
353        return result
354
355    def _prefnetwork_mode_change(self, sub_id):
356        # ModePref change to non-LTE
357        begin_time = get_current_epoch_time()
358        start_qxdm_loggers(self.log, self.android_devices)
359        network_preference_list = [
360            NETWORK_MODE_TDSCDMA_GSM_WCDMA, NETWORK_MODE_WCDMA_ONLY,
361            NETWORK_MODE_GLOBAL, NETWORK_MODE_CDMA, NETWORK_MODE_GSM_ONLY
362        ]
363        network_preference = random.choice(network_preference_list)
364        set_preferred_network_mode_pref(self.log, self.dut, sub_id,
365                                        network_preference)
366        time.sleep(WAIT_TIME_AFTER_MODE_CHANGE)
367        self.dut.log.info("Current Voice RAT is %s",
368                          get_current_voice_rat(self.log, self.dut))
369
370        # ModePref change back to with LTE
371        set_preferred_network_mode_pref(self.log, self.dut, sub_id,
372                                        NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA)
373        time.sleep(WAIT_TIME_AFTER_MODE_CHANGE)
374        rat = get_current_voice_rat(self.log, self.dut)
375        self.dut.log.info("Current Voice RAT is %s", rat)
376        self.result_info["RAT Change Total"] += 1
377        if rat != "LTE":
378            self.result_info["RAT Change Failure"] += 1
379            self._take_bug_report("%s_rat_change_failure" % self.test_name,
380                                  begin_time)
381            return False
382        else:
383            self.result_info["RAT Change Success"] += 1
384            return True
385
386    def _get_result_message(self):
387        msg_list = [
388            "%s: %s" % (count, self.result_info[count])
389            for count in sorted(self.result_info.keys())
390        ]
391        return ", ".join(msg_list)
392
393    def _write_perf_json(self):
394        json_str = json.dumps(self.perf_data, indent=4, sort_keys=True)
395        with open(self.perf_file, 'w') as f:
396            f.write(json_str)
397
398    def _init_perf_json(self):
399        self.perf_file = os.path.join(self.log_path, "%s_perf_data_%s.json" %
400                                      (self.test_name, self.begin_time))
401        self.perf_data = self.android_devices[0].build_info.copy()
402        self.perf_data["model"] = self.android_devices[0].model
403        self._write_perf_json()
404
405    def _update_perf_json(self):
406        for result_key, result_value in self.result_info.items():
407            self.perf_data[result_key] = result_value
408        self._write_perf_json()
409
410    def crash_check_test(self):
411        failure = 0
412        while time.time() < self.finishing_time:
413            try:
414                self.log.info(dict(self.result_info))
415                self._update_perf_json()
416                begin_time = get_current_epoch_time()
417                time.sleep(self.crash_check_interval)
418                for ad in self.android_devices:
419                    crash_report = ad.check_crash_report(
420                        "checking_crash", begin_time, log_crash_report=True)
421                    if crash_report:
422                        ad.log.error("Find new crash reports %s", crash_report)
423                        failure += 1
424                        self.result_info["Crashes"] += 1
425                        for crash in crash_report:
426                            if "ramdump_modem" in crash:
427                                self.result_info["Crashes-Modem"] += 1
428            except Exception as e:
429                self.log.error("Exception error %s", str(e))
430                self.result_info["Exception Errors"] += 1
431            self.log.info("Crashes found: %s", failure)
432            if self.result_info["Exception Errors"] >= EXCEPTION_TOLERANCE:
433                self.log.error("Too many exception errors, quit test")
434                return False
435        if failure:
436            return False
437        else:
438            return True
439
440    def call_test(self, call_verification_func=None):
441        while time.time() < self.finishing_time:
442            try:
443                self._make_phone_call(call_verification_func)
444            except Exception as e:
445                self.log.error("Exception error %s", str(e))
446                self.result_info["Exception Errors"] += 1
447            if self.result_info["Exception Errors"] >= EXCEPTION_TOLERANCE:
448                self.log.error("Too many exception errors, quit test")
449                return False
450            self.log.info("%s", dict(self.result_info))
451            time.sleep(
452                random.randrange(self.min_sleep_time, self.max_sleep_time))
453        if any([
454                self.result_info["Call Setup Failure"],
455                self.result_info["Call Maintenance Failure"],
456                self.result_info["Call Teardown Failure"]
457        ]):
458            return False
459        else:
460            return True
461
462    def message_test(self, max_wait_time=MAX_WAIT_TIME_SMS_RECEIVE):
463        while time.time() < self.finishing_time:
464            try:
465                self._send_message(max_wait_time=max_wait_time)
466            except Exception as e:
467                self.log.error("Exception error %s", str(e))
468                self.result_info["Exception Errors"] += 1
469            self.log.info(dict(self.result_info))
470            if self.result_info["Exception Errors"] >= EXCEPTION_TOLERANCE:
471                self.log.error("Too many exception errors, quit test")
472                return False
473            time.sleep(
474                random.randrange(self.min_sleep_time, self.max_sleep_time))
475        if self.result_info["SMS Failure"] or (
476                self.result_info["MMS Failure"] / self.result_info["MMS Total"]
477                > 0.3):
478            return False
479        else:
480            return True
481
482    def _data_download(self):
483        #file_names = ["5MB", "10MB", "20MB", "50MB", "200MB", "512MB", "1GB"]
484        file_names = ["5MB", "10MB", "20MB", "50MB", "200MB"]
485        begin_time = get_current_epoch_time()
486        start_qxdm_loggers(self.log, self.android_devices)
487        self.dut.log.info(dict(self.result_info))
488        selection = random.randrange(0, len(file_names))
489        file_name = file_names[selection]
490        self.result_info["File Download Total"] += 1
491        if not active_file_download_test(
492                self.log, self.dut, file_name,
493                method=self.file_download_method):
494            self.result_info["File Download Failure"] += 1
495            if self.result_info["File Download Failure"] == 1:
496                self._take_bug_report(
497                    "%s_file_download_failure" % self.test_name, begin_time)
498            return False
499        else:
500            self.result_info["File Download Success"] += 1
501            return True
502
503    def data_test(self):
504        while time.time() < self.finishing_time:
505            try:
506                self._data_download()
507            except Exception as e:
508                self.log.error("Exception error %s", str(e))
509                self.result_info["Exception Errors"] += 1
510            self.log.info("%s", dict(self.result_info))
511            if self.result_info["Exception Errors"] >= EXCEPTION_TOLERANCE:
512                self.log.error("Too many exception errors, quit test")
513                return False
514            time.sleep(
515                random.randrange(self.min_sleep_time, self.max_sleep_time))
516        if self.result_info["File Download Failure"] / self.result_info["File Download Total"] > 0.1:
517            return False
518        else:
519            return True
520
521    def parallel_tests(self, setup_func=None, call_verification_func=None):
522        self.log.info(self._get_result_message())
523        if setup_func and not setup_func():
524            msg = "Test setup %s failed" % setup_func.__name__
525            self.log.error(msg)
526            fail(msg)
527        if not call_verification_func:
528            call_verification_func = is_phone_in_call
529        self.finishing_time = time.time() + self.max_run_time
530        results = run_multithread_func(
531            self.log, [(self.call_test, [call_verification_func]),
532                       (self.message_test, []), (self.data_test, []),
533                       (self.crash_check_test, [])])
534        result_message = self._get_result_message()
535        self.log.info(result_message)
536        self._update_perf_json()
537        self.result_detail = result_message
538        return all(results)
539
540    def volte_modechange_volte_test(self):
541        sub_id = self.dut.droid.subscriptionGetDefaultSubId()
542        while time.time() < self.finishing_time:
543            try:
544                run_multithread_func(
545                    self.log,
546                    [(self._data_download, []),
547                     (self._make_phone_call, [is_phone_in_call_volte]),
548                     (self._send_message, [])])
549                self._prefnetwork_mode_change(sub_id)
550            except Exception as e:
551                self.log.error("Exception error %s", str(e))
552                self.result_info["Exception Errors"] += 1
553            self.log.info(dict(self.result_info))
554            if self.result_info["Exception Errors"] >= EXCEPTION_TOLERANCE:
555                self.log.error("Too many exception errors, quit test")
556                return False
557        if self.result_info["Call Failure"] or self.result_info["RAT Change Failure"] or self.result_info["SMS Failure"]:
558            return False
559        else:
560            return True
561
562    def parallel_with_network_change_tests(self, setup_func=None):
563        if setup_func and not setup_func():
564            self.log.error("Test setup %s failed", setup_func.__name__)
565            return False
566        self.finishing_time = time.time() + self.max_run_time
567        results = run_multithread_func(self.log,
568                                       [(self.volte_modechange_volte_test, []),
569                                        (self.crash_check_test, [])])
570        result_message = self._get_result_message()
571        self.log.info(result_message)
572        self._update_perf_json()
573        self.result_detail = result_message
574        return all(results)
575
576    """ Tests Begin """
577
578    @test_tracker_info(uuid="d035e5b9-476a-4e3d-b4e9-6fd86c51a68d")
579    @TelephonyBaseTest.tel_test_wrap
580    def test_default_parallel_stress(self):
581        """ Default state stress test"""
582        return self.parallel_tests()
583
584    @test_tracker_info(uuid="c21e1f17-3282-4f0b-b527-19f048798098")
585    @TelephonyBaseTest.tel_test_wrap
586    def test_lte_volte_parallel_stress(self):
587        """ VoLTE on stress test"""
588        return self.parallel_tests(
589            setup_func=self._setup_lte_volte_enabled,
590            call_verification_func=is_phone_in_call_volte)
591
592    @test_tracker_info(uuid="a317c23a-41e0-4ef8-af67-661451cfefcf")
593    @TelephonyBaseTest.tel_test_wrap
594    def test_csfb_parallel_stress(self):
595        """ LTE non-VoLTE stress test"""
596        return self.parallel_tests(
597            setup_func=self._setup_lte_volte_disabled,
598            call_verification_func=is_phone_in_call_csfb)
599
600    @test_tracker_info(uuid="fdb791bf-c414-4333-9fa3-cc18c9b3b234")
601    @TelephonyBaseTest.tel_test_wrap
602    def test_wfc_parallel_stress(self):
603        """ Wifi calling on stress test"""
604        return self.parallel_tests(
605            setup_func=self._setup_wfc,
606            call_verification_func=is_phone_in_call_iwlan)
607
608    @test_tracker_info(uuid="4566eef6-55de-4ac8-87ee-58f2ef41a3e8")
609    @TelephonyBaseTest.tel_test_wrap
610    def test_3g_parallel_stress(self):
611        """ 3G stress test"""
612        return self.parallel_tests(
613            setup_func=self._setup_3g,
614            call_verification_func=is_phone_in_call_3g)
615
616    @test_tracker_info(uuid="f34f1a31-3948-4675-8698-372a83b8088d")
617    @TelephonyBaseTest.tel_test_wrap
618    def test_call_2g_parallel_stress(self):
619        """ 2G call stress test"""
620        return self.parallel_tests(
621            setup_func=self._setup_2g,
622            call_verification_func=is_phone_in_call_2g)
623
624    @test_tracker_info(uuid="af580fca-fea6-4ca5-b981-b8c710302d37")
625    @TelephonyBaseTest.tel_test_wrap
626    def test_volte_modeprefchange_parallel_stress(self):
627        """ VoLTE Mode Pref call stress test"""
628        return self.parallel_with_network_change_tests(
629            setup_func=self._setup_lte_volte_enabled)
630
631    """ Tests End """
632