[PATCH v3 1/2] tests: Save the log of wmediumd

Bob Copeland me at bobcopeland.com
Mon Feb 27 05:27:53 PST 2017


On Mon, Feb 27, 2017 at 10:41:55AM +0900, Masashi Honma wrote:
> diff --git a/tests/hwsim/test_wmediumd.py b/tests/hwsim/test_wmediumd.py
> index 3319673..bdce59c 100644
> --- a/tests/hwsim/test_wmediumd.py
> +++ b/tests/hwsim/test_wmediumd.py
> @@ -18,26 +18,46 @@ ifaces :
>  };
>  """
>  
> -def test_wmediumd_simple(dev, apdev):
> +def start_wmediumd(fn):
> +    try:
> +        p = subprocess.Popen(['wmediumd', '-l', '6', '-c', fn],
> +                             stdout=subprocess.PIPE,
> +                             stderr=subprocess.STDOUT)
[...]
> +        if line.find('invalid option') > -1:
> +            raise HwsimSkip('wmediumd looks old. Retry after updation.')

But fail the whole test just because we couldn't set log level?

What if I just set default loglevel to 6 in wmediumd and then you can
drop the "-l 6" change?  Ok, I did that, default of 7 is too much anyhow.

-- 
Bob Copeland %% http://bobcopeland.com/



More information about the Hostap mailing list