canonical / checkbox

Checkbox
https://checkbox.readthedocs.io
GNU General Public License v3.0
31 stars 46 forks source link

Wireless Wide Area Network tests miss network-manager dependency #564

Open EnricoMontecaggi opened 1 year ago

EnricoMontecaggi commented 1 year ago

Bug Description

If network-manager is not installed on the system, the test will fail (status failed) because of lack of "nmcli" command. I think, also, that the correct exit status in this case (because network-manager is not installed) is non supported

To Reproduce

  1. checkbox.odm-certification
  2. select "ODM Client Certification for Server 22.04 - (2/2) Automated tests" test plan
  3. select Wireless Wide Area Network
  4. run

Environment

OS: Ubuntu 22.04 Server Checkbox snap (22.04)

Relevant log output

I/O log report

## Creating 3GPP Connection
+ nmcli c add con-name GSMCONN type gsm ifname cdc-wdm1 apn internet
Traceback (most recent call last):
  File "/tmp/nest-2fp5en4u.e7b803502f2e5998aa8bd8cbdb91d61e5782a9df7ccf1f77f39d51266d80a3b7/wwan_tests.py", line 419, in <module>
    WWANTests().main()
  File "/tmp/nest-2fp5en4u.e7b803502f2e5998aa8bd8cbdb91d61e5782a9df7ccf1f77f39d51266d80a3b7/wwan_tests.py", line 415, in main
    sub_commands[args.subcommand]().invoked()
  File "/tmp/nest-2fp5en4u.e7b803502f2e5998aa8bd8cbdb91d61e5782a9df7ccf1f77f39d51266d80a3b7/wwan_tests.py", line 318, in invoked
    _create_3gpp_connection(wwan_control_if, args.apn)
  File "/tmp/nest-2fp5en4u.e7b803502f2e5998aa8bd8cbdb91d61e5782a9df7ccf1f77f39d51266d80a3b7/wwan_tests.py", line 253, in _create_3gpp_connection
    subprocess.check_call(cmd)
  File "/snap/checkbox22/current/usr/lib/python3.10/subprocess.py", line 364, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/snap/checkbox22/current/usr/lib/python3.10/subprocess.py", line 345, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/snap/checkbox22/current/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/snap/checkbox22/current/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'nmcli'
==== Service units logs ====

Additional context

No response

pieqq commented 1 year ago

Hello @EnricoMontecaggi and thanks for reporting this!

A few questions:

  1. Does the device being tested have a WWAN module?
  2. If it does and you manually install network-manager on this device, do the Checkbox tests pass?
EnricoMontecaggi commented 1 year ago

Hello @EnricoMontecaggi and thanks for reporting this!

A few questions:

  1. Does the device being tested have a WWAN module?

Yes!

  1. If it does and you manually install network-manager on this device, do the Checkbox tests pass?

Yes, I've installed it with apt