Skip to content

Commit

Permalink
pkg/hwsim/PKGBUILD: fix generating hwsim-long-param testcases
Browse files Browse the repository at this point in the history
hwsim testcases source code had changed, shoud update the method to generating hwsim-long-param testcases

 == change log ==
 commit 7e88ed8e2d2af0438da19f4cf0ae94a6415c3374
 Author: Jouni Malinen <[email protected]>
 Date:   Sat Apr 18 11:00:49 2020 +0300

     tests: Use function decorator to clean up --long processing

     Signed-off-by: Jouni Malinen <[email protected]>

 ......

 diff --git a/tests/hwsim/test_ap_ciphers.py b/tests/hwsim/test_ap_ciphers.py
 index ba54102d4..fb0d9b614 100644
 --- a/tests/hwsim/test_ap_ciphers.py
 +++ b/tests/hwsim/test_ap_ciphers.py
 @@ -201,10 +201,9 @@ def test_ap_cipher_tkip_countermeasures_sta(dev, apdev):
      if ev is not None:
          raise Exception("Unexpected connection during TKIP countermeasures")

 -def test_ap_cipher_tkip_countermeasures_sta2(dev, apdev, params):
 -    """WPA-PSK/TKIP countermeasures (detected by two STAs) [long]"""
 -    if not params['long']:
 -        raise HwsimSkip("Skip test case with long duration due to --long not specified")
 +@long_duration_test
 +def test_ap_cipher_tkip_countermeasures_sta2(dev, apdev):
 +    """WPA-PSK/TKIP countermeasures (detected by two STAs)"""
      skip_with_fips(dev[0])
      skip_without_tkip(dev[0])
      params = {"ssid": "tkip-countermeasures",

Reviewed-by: Li Zhijian <[email protected]>
Signed-off-by: Zhu Yifei <[email protected]>
Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
Zhu Yifei authored and rli9 committed Dec 9, 2021
1 parent 4344c36 commit f9d3698
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/hwsim/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ build_hwsim_tests()
cd $srcdir/hostap/tests/hwsim

# try to find out the case requiring params long
# root@debian9:/home/lizhijian/chroot/lkp/benchmarks/hwsim/tests/hwsim# git grep -B 2 -w 'if not params\['\'long\']
# test_ap_ciphers.py-def test_ap_cipher_tkip_countermeasures_sta2(dev, apdev, params):
# test_ap_ciphers.py- """WPA-PSK/TKIP countermeasures (detected by two STAs) [long]"""
# test_ap_ciphers.py: if not params['long']:
git grep -B 2 -w 'if not params\['\'long\'] | grep '.*\.py\-def' | awk -F 'def ' '{print $2}' | awk -F'(' '{print $1}' | sed s/test_//g > $srcdir/hostap/hwsim-long-param
# tests/hwsim# git grep -A 1 -w '@long_duration_test'
# test_ap_acs.py:@long_duration_test
# test_ap_acs.py-def test_ap_acs_dfs(dev, apdev):
git grep -A 1 -w '^@long_duration_test' | grep '.*\.py\-def' | awk -F 'def ' '{print $2}' | awk -F'(' '{print $1}' | sed s/test_//g > $srcdir/hostap/hwsim-long-param

git grep -E -e 'def test.*mcc' | awk -F 'test_' '{print $3}'| awk -F '(' '{print $1}' > $srcdir/hostap/hwsim-mcc

Expand Down

0 comments on commit f9d3698

Please sign in to comment.