Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
d115c3f
feat: simple implementation for mlo check with iw dev
tomli380576 Aug 26, 2025
6bd8dfb
fix: remove unused
tomli380576 Aug 26, 2025
8772568
style: flake8
tomli380576 Aug 26, 2025
297de73
fix: require ssid input
tomli380576 Aug 26, 2025
d9edf9d
fix: handle connect and removal
tomli380576 Aug 26, 2025
8f7a545
doc: help msg
tomli380576 Aug 26, 2025
0f9ddf6
doc: comments
tomli380576 Aug 26, 2025
e2e34ad
style: minor cleanup
tomli380576 Aug 27, 2025
ef68558
fix: missing check for nonexistent ssid
tomli380576 Aug 27, 2025
cffa588
fix: follow style guide
tomli380576 Aug 27, 2025
45c76e4
refactor: wrapper class
tomli380576 Sep 5, 2025
ddf82d7
style: rename
tomli380576 Sep 5, 2025
e489b3b
refactor: do the required checks earlier
tomli380576 Sep 8, 2025
7b597a3
fix: bad prefix
tomli380576 Sep 9, 2025
902a1ab
test: unittest setup
tomli380576 Sep 9, 2025
0b3584d
test: happy path test
tomli380576 Sep 17, 2025
c09f301
test: check non-wifi7
tomli380576 Sep 19, 2025
cfd51e7
style: output style tweaks
tomli380576 Sep 19, 2025
a45e0dc
style: lines too long
tomli380576 Sep 19, 2025
b9be6d9
test: increase coverage
tomli380576 Sep 19, 2025
77bd587
test: increase coverage
tomli380576 Sep 19, 2025
294b507
doc: update header
tomli380576 Sep 19, 2025
52827df
style: formatting
tomli380576 Sep 19, 2025
ddbda25
fix: grammar
tomli380576 Sep 19, 2025
e295988
feat: allow interface override, cleanup deletion step
tomli380576 Sep 19, 2025
91267ba
test: increase coverage
tomli380576 Sep 19, 2025
8b09fb7
test: increase coverage
tomli380576 Sep 19, 2025
e6bfba9
test: increase coverage
tomli380576 Sep 19, 2025
0631372
feat: test job
tomli380576 Sep 19, 2025
df0b3ad
doc: update header
tomli380576 Sep 19, 2025
b4d5934
fix: 2 dashes in arg name
tomli380576 Sep 22, 2025
8491db8
fix: spelling
tomli380576 Sep 22, 2025
1d77688
style: formatting
tomli380576 Sep 22, 2025
a6ce2f0
refactor: put the checks in a @retry-ed function
tomli380576 Sep 22, 2025
12ca1c2
style: isort and formatting
tomli380576 Sep 22, 2025
74265e4
fix: check for wpasupplicant's version
tomli380576 Sep 25, 2025
900ea21
fix: apply Issac's suggestion and use mlo in the name
tomli380576 Sep 25, 2025
8300040
feat: save iw outputs
tomli380576 Sep 25, 2025
2e28340
fix: log the save location
tomli380576 Sep 25, 2025
da6d09e
fix: missing interface argument
tomli380576 Sep 25, 2025
7337a41
fix: patch open() and os.environ in tests
tomli380576 Sep 25, 2025
a672fff
style: filename
tomli380576 Sep 25, 2025
05e2552
fix: formatting
tomli380576 Sep 25, 2025
a8cac47
refactor: just put retry on the entire thing
tomli380576 Sep 25, 2025
02431d7
fix: move log location
tomli380576 Sep 25, 2025
0d5a355
fix: wording
tomli380576 Sep 25, 2025
6cce64d
doc: comments
tomli380576 Sep 25, 2025
0a2c175
fix: shorter envvar name
tomli380576 Sep 25, 2025
a56cb76
fix: print with flush
tomli380576 Sep 25, 2025
7cf86e7
doc: comments
tomli380576 Sep 25, 2025
5623def
doc: comments cleanup
tomli380576 Oct 3, 2025
a368999
feat: add a resource job for wpa supplicant
tomli380576 Oct 3, 2025
8d339fa
feat: also check kernel version
tomli380576 Oct 3, 2025
a9e1474
style: more readable names
tomli380576 Oct 3, 2025
5acfbe5
doc: comments
tomli380576 Oct 3, 2025
d4b731a
refactor: minor cleanup
tomli380576 Oct 3, 2025
75b5100
feat: resource job
tomli380576 Oct 3, 2025
e960db8
feat: dependency in jobs.pxu
tomli380576 Oct 3, 2025
f3347f5
fix: missing header
tomli380576 Oct 3, 2025
a744e0c
fix: missing category id
tomli380576 Oct 3, 2025
7167996
fix: formatting
tomli380576 Oct 3, 2025
6b60ebd
fix: flush print
tomli380576 Oct 3, 2025
cce6090
fix: handle missing words in tx bitrate line
tomli380576 Oct 3, 2025
eee3b8f
fix: bad length check
tomli380576 Oct 3, 2025
8bda5c4
test: add tests for resource job
tomli380576 Oct 7, 2025
7dced99
fix: dump the iw outputs
tomli380576 Oct 7, 2025
cc3232e
fix: do array searches instead of index access
tomli380576 Oct 7, 2025
5182036
fix: bad mcs parse step
tomli380576 Oct 7, 2025
1b44c40
hack: filter out labs that can't run the test yet
tomli380576 Oct 7, 2025
2e008c9
fix: missing line in job pxu
tomli380576 Oct 7, 2025
5732b2d
doc: comments, remove unused imports
tomli380576 Oct 7, 2025
4cc6866
refactor: use simpler method for filtering
tomli380576 Oct 7, 2025
0d9a80f
feat: restore connections after the test
tomli380576 Oct 7, 2025
ba515bf
fix: condition for not connected
tomli380576 Oct 7, 2025
36e28b9
fix: remove debug changes
tomli380576 Oct 7, 2025
f9a5c13
fix: extraneous import
tomli380576 Oct 7, 2025
030706e
test: mock connect list output
tomli380576 Oct 7, 2025
e6ad854
fix: formatting
tomli380576 Oct 7, 2025
df8d1fd
refactor: always parse the connection type
tomli380576 Oct 7, 2025
3a156de
test: add more test inputs
tomli380576 Oct 7, 2025
a5934bd
test: test for legacy connections
tomli380576 Oct 7, 2025
ff9a0a0
fix: formatting
tomli380576 Oct 7, 2025
83725d1
test: increase coverage
tomli380576 Oct 7, 2025
4b6794e
test: increase coverage
tomli380576 Oct 7, 2025
abd2de8
fix: add missing environ
tomli380576 Oct 17, 2025
50adfdd
fix: replace env resource with env manifest
tomli380576 Oct 20, 2025
105f02a
fix: missing manifest import
tomli380576 Oct 20, 2025
8de2a5f
fix: add universal_newlines to sp.check_call to not have random escap…
tomli380576 Oct 20, 2025
14e360d
fix: escape sequence still appears
tomli380576 Oct 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions providers/base/bin/wifi_7_resource.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#! /usr/bin/env python3
import os
import subprocess as sp


def get_wpa_supplicant_version() -> "tuple[int, int]":
"""
(manually verified on ubuntu16 ~ 24 including ubuntu core)
The output of "wpa_supplicant -v" always looks like the following

wpa_supplicant v2.10
Copyright (c) 2003-2022, Jouni Malinen <[email protected]> and contributors

:return: the sys.version style tuple like (2, 10)
"""
wpa_supplicant_version_output = sp.check_output(
["wpa_supplicant", "-v"], universal_newlines=True
)

# take the 1st line, 2nd word, remove the 'v'
clean_version_str = wpa_supplicant_version_output.splitlines()[0].split()[
1
][1:]
# Example: clean_version_str == '2.11'
# Now convert to a sys.version style tuple
version_tuple = tuple(
map(
int,
clean_version_str.split(".", maxsplit=1),
),
)
assert len(version_tuple) == 2

return version_tuple


def get_kernel_version() -> "tuple[int, int]":
# kernel version string format is consistent
# https://askubuntu.com/questions/843197/what-are-kernel-version-number-components-w-x-yy-zzz-called # noqa: E501
version_str = os.uname().release
# '6.14.0-32-generic'
# '6.14.0-1012-oem'
major, minor, _ = version_str.split("-", maxsplit=1)[0].split(".")
return (int(major), int(minor))


def main():
# workaround: we need to produce true/false in the resource job since
# pxu resource expressions only support string comparison,
# which means the only predictable comparator is '=='

# TODO: if the pxu engine supports rich comparison in the future,
# move these comparisons to the pxu files to make job requirements more
# explicit

print(
"wpa_supplicant_at_least_2_11: {}".format(
get_wpa_supplicant_version() >= (2, 11)
)
)
print("kernel_at_least_6_14: {}".format(get_kernel_version() >= (6, 14)))


if __name__ == "__main__":
main()
Loading
Loading