[PATCH v2 1/2] tests: Save a log of wmediumd

Jouni Malinen j at w1.fi
Sat Feb 25 00:11:40 PST 2017

On Wed, Feb 22, 2017 at 12:04:05PM +0900, Masashi Honma wrote:
> -def test_wmediumd_simple(dev, apdev):
> +def test_wmediumd_simple(dev, apdev, params):
>      """test a simple wmediumd configuration"""
>      fd, fn = tempfile.mkstemp()
>      try:
> @@ -26,8 +26,8 @@ def test_wmediumd_simple(dev, apdev):
>          f.write(CFG % (apdev[0]['bssid'], dev[0].own_addr()))
>          f.close()
>          try:
> -            p = subprocess.Popen(['wmediumd', '-c', fn],
> -                                 stdout=open('/dev/null', 'a'),
> +            p = subprocess.Popen(['wmediumd', '-l', '6', '-c', fn],

This breaks the test with the wmediumd version that I was using:

wmediumd: invalid option -- 'l'
wmediumd: Error - No such option: `l'

It looks like -l is a relatively recent addition and I'm not sure we
should depend on it being available, i.e., the test case should likely
have a fallback mechanism to restarting wmediumd without the -l argument
if that fails.

Interestingly, the test case was still claiming PASS even when wmediumd
could not be launched. That should really be fixed by verifying that
wmediumd is actually properly started and still running when executing
_test_ap_open() the first time..

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list