Re: [PATCH 1/2] tests: ibss kill subprocess usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2016-04-02 at 08:24 +0200, Janusz Dziedzic wrote:

> -    subprocess.check_call(['iw', 'dev', dev[0].ifname, 'set',
> 'type', 'adhoc'])
> -    subprocess.check_call(['iw', 'dev', dev[0].ifname, 'ibss',
> 'join',
> -                           'ibss-test', '2412', 'HT20', 'fixed-
> freq',
> -                           '02:22:33:44:55:66'])
> +    dev[0].host.execute("iw dev " + dev[0].ifname + " set type
> adhoc")
> 
I suppose I should've seen that in some other patch in the previous
series, but can we perhaps find a way to not have to do string
manipulation here? host.execute() should probably take a list just like
subprocess.Popen() does, and execute it as such, rather than passing it
through a shell? And even if that's absolutely not possible (using
ssh?) then we should probably do string quoting in a central place in
the code.

johannes

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux