1#!/usr/bin/env python3 2# 3# Copyright 2021 - The Android Open Source Project 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 17import acts_contrib.test_utils.cellular.cellular_base_test as cbt 18import scapy.all as scapy 19 20 21class CellularPingTest(cbt.CellularBaseTest): 22 def test_lte_band_13_pul_low_bw_10_tm_3_mimo_2x2(self): 23 host_ip = scapy.get_if_addr(self.packet_senders[0].interface) 24 self.log.info('Will ping ' + host_ip) 25 ping_result = self.dut.adb.shell('ping -w 5 ' + host_ip, 26 ignore_status=True) 27 self.log.info(ping_result) 28 return '0% packet loss' in ping_result 29