-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mac80211_hwsim test #3303
Add mac80211_hwsim test #3303
Conversation
tests/x11/mac80211_hwsim.pm
Outdated
# notice and this notice are preserved. This file is offered as-is, | ||
# without any warranty. | ||
|
||
# Summary: mac80211 hw test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some more here, I know you can do :-) Describe the purpose of the test, limitations, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do so
tests/x11/mac80211_hwsim.pm
Outdated
# Tags: poo#20306 | ||
|
||
use base 'x11test'; | ||
use y2x11test qw(launch_yast2_module_x11); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use single ticks, probably perlcritic will also tell this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use single ticks
tests/x11/mac80211_hwsim.pm
Outdated
send_key 'tab'; | ||
type_string 'nots3cr3t'; | ||
|
||
# aat 'connect' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aat?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover comments
tests/x11/mac80211_hwsim.pm
Outdated
y2x11test::launch_yast2_module_x11; | ||
$self->yast_search('Network Settings'); | ||
|
||
# assert_and_click 'yast2-networksettings' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some of these comments are a bit to verbose and don't add information. Looks like left-overs from initial pseudo code? Better delete some comments now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, definitely leftovers from pseudocode
tests/x11/mac80211_hwsim.pm
Outdated
# softfail yast2 error | ||
# aac 'ok' | ||
if (check_screen 'yast2_network-error_dialog') { | ||
record_soft_failure 'bsc#TODO'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you don't have a bugref better just make it a die with a hint what to report a but about.
tests/x11/mac80211_hwsim.pm
Outdated
# assert 'saving-is-running' | ||
# softfail yast2 error | ||
# aac 'ok' | ||
if (check_screen 'yast2_network-error_dialog') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't use check_screen with default timeout or higher as this would waste time in case everything is ok. Better use a multi-tag assert_screen in combination with match_has_tag
tests/x11/mac80211_hwsim.pm
Outdated
} | ||
} | ||
type_string $name if $name; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case you just copied this from the yast2_control_center test better extract it into a common base class
tests/x11/mac80211_hwsim.pm
Outdated
$self->generate_certs; | ||
$self->configure_hostapd; | ||
$self->reload_services; | ||
type_string "exit\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't log out of the root console. You can call utils::clear_console
if you prefer
It's not done when you don't update the PR, the PR message still states WIP and checks fail |
Therefore commit I'm not 100% sure how to handle this recommendation from you about the assert_screen but will ask you in person. Anything to improve about the current code base? |
1dafa48
to
a177e40
Compare
update PR message, remove the WIP part |
tests/x11/mac80211_hwsim.pm
Outdated
# Tags: poo#20306 | ||
|
||
use base 'x11test'; | ||
use y2x11test qw(launch_yast2_module_x11); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use single ticks
tests/x11/mac80211_hwsim.pm
Outdated
|
||
## we have to change the networkmanager form wicked to NetworkManager | ||
#y2x11test::launch_yast2_module_x11; | ||
#$self->yast_search('Network Settings'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why disabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
y2x11test::launch_yast2_module_x11 is able to open yast modules directly. This results in less duplicate code (e.g. the yast2 search function is not needed anymore). The comment is mainly for me to not check in these needles
tests/x11/mac80211_hwsim.pm
Outdated
|
||
## open the 'Network Settings' | ||
#assert_and_click 'yast2_control-center_network-check'; | ||
#assert_screen 'yast2_control-center_network-opened'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why disabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment above
a177e40
to
4aaeb33
Compare
4aaeb33
to
661a0fb
Compare
LGTM, I will enable the test in the test plan |
Enable the new mac80211_hwsim wifi simulation test added by #3303
This test is supposed to test the WPA2 enterprise capabilities of hostapd and NetworkManager.
It makes use of the mac80211_hwsim kernel module to simulate real radio hardware.
Right now it is very based on Gnome on Tumbleweed for a first start but should be compatible with all our products after some needle changes.
It does the testing like described here:
https://progress.opensuse.org/issues/20306
A first impression how this looks can be found on my local machine:http://openqa.glados.qa.suse.de/tests/257
This is how this module looks like in action:
http://openqa.glados.qa.suse.de/tests/282#step/consoletest_setup/29
Required needles: os-autoinst/os-autoinst-needles-opensuse#236
Feedback and critique heavily welcome!