def start_server(self, protocol='TCP', port=5001, mss=None, window=None): """iperf -s -D --mss mss """ cmd = ['iperf', '-s', '-p', str(port)] if not cmp(protocol, 'UDP'): cmd.append('-u') if mss: cmd.extend(['-M', str(mss)]) if window: cmd.extend(['-w', str(window)]) pid = utils.create_deamon(cmd) data = dict() data['pid'] = pid return data
def test_create_deamon(self): cmd = ["ls", self.test_file] pid = utils.create_deamon(cmd) self.pids.append(pid) self.assertEqual(type(pid), types.IntType)