← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Bug 2129815] [NEW] broadcast_ether_dst.sh in ubuntu_kselftests_net fails because is executed as privileged but missing the explicit -Z option

 

Public bug reported:

on questing broadcast_ether_dts() executes

tcpdump -i link0 -c 1 -w "${CAPFILE}" icmp &> "${OUTPUT}" &

but from tcpdump manpage:

"If tcpdump is running as root, after opening the capture device or
input savefile, change the user ID to user and the group ID to the
primary  group of user.

This behavior is enabled by default (-Z tcpdump), and can be disabled by
-Z root."

this results in the CAP file being unreadable by the rest of the test.
Adding the explicit -Z root

tcpdump -i link0 -c 1 -w "${CAPFILE}" -Z root icmp &> "${OUTPUT}" &

Fixes the test.

Full log:
24772  14:22:31 INFO | START ubuntu_kselftests_net.net:broadcast_ether_dst.sh ubuntu_kselftests_net.net:broadcast_ether_dst.sh timeout=2700 timestamp=1760970151 localtime=Oct 20 14:22:31
24773  14:22:31 DEBUG| Persistent state client._record_indent now set to 2
24774  14:22:31 DEBUG| Persistent state client.unexpected_reboot now set to ('ubuntu_kselftests_net.net:broadcast_ether_dst.sh', 'ubuntu_kselftests_net.net:broadcast_ether_dst.sh')
24775  14:22:31 DEBUG| Waiting for pid 1606301 for 2700 seconds
24776  14:22:31 WARNI| System python is too old, crash handling disabled
24777  14:22:31 DEBUG| Running 'make run_tests -C net TEST_PROGS=broadcast_ether_dst.sh TEST_GEN_PROGS='' TEST_CUSTOM_PROGS='''
24778  14:22:31 DEBUG| [stdout] make: Entering directory '/home/ubuntu/autotest/client/tmp/ubuntu_kselftests_net/src/linux/tools/testing/selftests/net'
24779  14:22:31 DEBUG| [stdout] TAP version 13
24780  14:22:31 DEBUG| [stdout] 1..1
24781  14:22:31 DEBUG| [stdout] # timeout set to 0
24782  14:22:31 DEBUG| [stdout] # selftests: net: broadcast_ether_dst.sh
24783  14:22:31 DEBUG| [stdout] # Testing ethernet broadcast destination
24784  14:22:32 DEBUG| [stdout] # [FAIL] expected dst ether addr to be ff:ff:ff:ff:ff:ff, got
24785  14:22:32 DEBUG| [stdout] not ok 1 selftests: net: broadcast_ether_dst.sh # exit=1
24786  14:22:32 DEBUG| [stdout] make: Leaving directory '/home/ubuntu/autotest/client/tmp/ubuntu_kselftests_net/src/linux/tools/testing/selftests/net'
24787  14:22:32 ERROR| Exception escaping from test:
24788  Traceback (most recent call last):
24789   File "/home/ubuntu/autotest/client/shared/test.py", line 411, in _exec
24790   _call_test_function(self.execute, *p_args, **p_dargs)
24791   ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24792   File "/home/ubuntu/autotest/client/shared/test.py", line 823, in _call_test_function
24793   return func(*args, **dargs)
24794   File "/home/ubuntu/autotest/client/shared/test.py", line 290, in execute
24795   self._call_run_once(constraints, profile_only,
24796   ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
24797   postprocess_profiled_run, args, dargs)
24798   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24799   File "/home/ubuntu/autotest/client/shared/test.py", line 212, in _call_run_once
24800   self.run_once(*args, **dargs)
24801   ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
24802   File "/home/ubuntu/autotest/client/tests/ubuntu_kselftests_net/ubuntu_kselftests_net.py", line 174, in run_once
24803   raise error.TestError(test_name + ' failed.')
24804  autotest.client.shared.error.TestError: net:broadcast_ether_dst.sh failed.
24805  14:22:32 ERROR| child process failed
24806  14:22:32 DEBUG| Traceback (most recent call last):
24807  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 411, in _exec
24808  14:22:32 DEBUG| _call_test_function(self.execute, *p_args, **p_dargs)
24809  14:22:32 DEBUG| ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24810  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 823, in _call_test_function
24811  14:22:32 DEBUG| return func(*args, **dargs)
24812  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 290, in execute
24813  14:22:32 DEBUG| self._call_run_once(constraints, profile_only,
24814  14:22:32 DEBUG| ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
24815  14:22:32 DEBUG| postprocess_profiled_run, args, dargs)
24816  14:22:32 DEBUG| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24817  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 212, in _call_run_once
24818  14:22:32 DEBUG| self.run_once(*args, **dargs)
24819  14:22:32 DEBUG| ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
24820  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/tests/ubuntu_kselftests_net/ubuntu_kselftests_net.py", line 174, in run_once
24821  14:22:32 DEBUG| raise error.TestError(test_name + ' failed.')
24822  14:22:32 DEBUG| autotest.client.shared.error.TestError: net:broadcast_ether_dst.sh failed.
24823  14:22:32 DEBUG|
24824  14:22:32 DEBUG| During handling of the above exception, another exception occurred:
24825  14:22:32 DEBUG|
24826  14:22:32 DEBUG| Traceback (most recent call last):
24827  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/parallel.py", line 25, in fork_start
24828  14:22:32 DEBUG| l()
24829  14:22:32 DEBUG| ~^^
24830  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/job.py", line 506, in
24831  14:22:32 DEBUG| l = lambda: test.runtest(self, url, tag, args, dargs)
24832  14:22:32 DEBUG| ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24833  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/test.py", line 121, in runtest
24834  14:22:32 DEBUG| common_test.runtest(job, url, tag, args, dargs, locals(), globals(),
24835  14:22:32 DEBUG| ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24836  14:22:32 DEBUG| job.sysinfo.log_before_each_test,
24837  14:22:32 DEBUG| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24838  14:22:32 DEBUG| job.sysinfo.log_after_each_test,
24839  14:22:32 DEBUG| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24840  14:22:32 DEBUG| job.sysinfo.log_before_each_iteration,
24841  14:22:32 DEBUG| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24842  14:22:32 DEBUG| job.sysinfo.log_after_each_iteration)
24843  14:22:32 DEBUG| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24844  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 913, in runtest
24845  14:22:32 DEBUG| mytest._exec(args, dargs)
24846  14:22:32 DEBUG| ~~~~~~~~~~~~^^^^^^^^^^^^^
24847  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 434, in _exec
24848  14:22:32 DEBUG| raise exc_info[0](exc_info[1]).with_traceback(exc_info[2])
24849  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 411, in _exec
24850  14:22:32 DEBUG| _call_test_function(self.execute, *p_args, **p_dargs)
24851  14:22:32 DEBUG| ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24852  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 823, in _call_test_function
24853  14:22:32 DEBUG| return func(*args, **dargs)
24854  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 290, in execute
24855  14:22:32 DEBUG| self._call_run_once(constraints, profile_only,
24856  14:22:32 DEBUG| ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
24857  14:22:32 DEBUG| postprocess_profiled_run, args, dargs)
24858  14:22:32 DEBUG| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24859  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 212, in _call_run_once
24860  14:22:32 DEBUG| self.run_once(*args, **dargs)
24861  14:22:32 DEBUG| ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
24862  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/tests/ubuntu_kselftests_net/ubuntu_kselftests_net.py", line 174, in run_once
24863  14:22:32 DEBUG| raise error.TestError(test_name + ' failed.')
24864  14:22:32 DEBUG| autotest.client.shared.error.TestError: net:broadcast_ether_dst.sh failed.
24865  14:22:33 INFO | ERROR ubuntu_kselftests_net.net:broadcast_ether_dst.sh ubuntu_kselftests_net.net:broadcast_ether_dst.sh timestamp=1760970153 localtime=Oct 20 14:22:33 net:broadcast_ether_dst.sh failed.

24866  14:22:33 INFO | END ERROR
ubuntu_kselftests_net.net:broadcast_ether_dst.sh
ubuntu_kselftests_net.net:broadcast_ether_dst.sh timestamp=1760970153
localtime=Oct 20 14:22:33

** Affects: ubuntu-kernel-tests
     Importance: Undecided
         Status: New

** Summary changed:

- /home/edocan/canonical/autotest/client/tmp/ubuntu_kselftests_net/sbroadcast_ether_dst.sh in ubuntu_kselftests_net fails because is executed as privileged but missing the explicit -Z option
+ broadcast_ether_dst.sh in ubuntu_kselftests_net fails because is executed as privileged but missing the explicit -Z option

-- 
You received this bug notification because you are a member of Canonical
Platform QA Team, which is subscribed to ubuntu-kernel-tests.
https://bugs.launchpad.net/bugs/2129815

Title:
  broadcast_ether_dst.sh in ubuntu_kselftests_net fails because is
  executed as privileged but missing the explicit -Z option

Status in ubuntu-kernel-tests:
  New

Bug description:
  on questing broadcast_ether_dts() executes

  tcpdump -i link0 -c 1 -w "${CAPFILE}" icmp &> "${OUTPUT}" &

  but from tcpdump manpage:

  "If tcpdump is running as root, after opening the capture device or
  input savefile, change the user ID to user and the group ID to the
  primary  group of user.

  This behavior is enabled by default (-Z tcpdump), and can be disabled
  by -Z root."

  this results in the CAP file being unreadable by the rest of the test.
  Adding the explicit -Z root

  tcpdump -i link0 -c 1 -w "${CAPFILE}" -Z root icmp &> "${OUTPUT}" &

  Fixes the test.

  Full log:
  24772  14:22:31 INFO | START ubuntu_kselftests_net.net:broadcast_ether_dst.sh ubuntu_kselftests_net.net:broadcast_ether_dst.sh timeout=2700 timestamp=1760970151 localtime=Oct 20 14:22:31
  24773  14:22:31 DEBUG| Persistent state client._record_indent now set to 2
  24774  14:22:31 DEBUG| Persistent state client.unexpected_reboot now set to ('ubuntu_kselftests_net.net:broadcast_ether_dst.sh', 'ubuntu_kselftests_net.net:broadcast_ether_dst.sh')
  24775  14:22:31 DEBUG| Waiting for pid 1606301 for 2700 seconds
  24776  14:22:31 WARNI| System python is too old, crash handling disabled
  24777  14:22:31 DEBUG| Running 'make run_tests -C net TEST_PROGS=broadcast_ether_dst.sh TEST_GEN_PROGS='' TEST_CUSTOM_PROGS='''
  24778  14:22:31 DEBUG| [stdout] make: Entering directory '/home/ubuntu/autotest/client/tmp/ubuntu_kselftests_net/src/linux/tools/testing/selftests/net'
  24779  14:22:31 DEBUG| [stdout] TAP version 13
  24780  14:22:31 DEBUG| [stdout] 1..1
  24781  14:22:31 DEBUG| [stdout] # timeout set to 0
  24782  14:22:31 DEBUG| [stdout] # selftests: net: broadcast_ether_dst.sh
  24783  14:22:31 DEBUG| [stdout] # Testing ethernet broadcast destination
  24784  14:22:32 DEBUG| [stdout] # [FAIL] expected dst ether addr to be ff:ff:ff:ff:ff:ff, got
  24785  14:22:32 DEBUG| [stdout] not ok 1 selftests: net: broadcast_ether_dst.sh # exit=1
  24786  14:22:32 DEBUG| [stdout] make: Leaving directory '/home/ubuntu/autotest/client/tmp/ubuntu_kselftests_net/src/linux/tools/testing/selftests/net'
  24787  14:22:32 ERROR| Exception escaping from test:
  24788  Traceback (most recent call last):
  24789   File "/home/ubuntu/autotest/client/shared/test.py", line 411, in _exec
  24790   _call_test_function(self.execute, *p_args, **p_dargs)
  24791   ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24792   File "/home/ubuntu/autotest/client/shared/test.py", line 823, in _call_test_function
  24793   return func(*args, **dargs)
  24794   File "/home/ubuntu/autotest/client/shared/test.py", line 290, in execute
  24795   self._call_run_once(constraints, profile_only,
  24796   ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24797   postprocess_profiled_run, args, dargs)
  24798   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24799   File "/home/ubuntu/autotest/client/shared/test.py", line 212, in _call_run_once
  24800   self.run_once(*args, **dargs)
  24801   ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  24802   File "/home/ubuntu/autotest/client/tests/ubuntu_kselftests_net/ubuntu_kselftests_net.py", line 174, in run_once
  24803   raise error.TestError(test_name + ' failed.')
  24804  autotest.client.shared.error.TestError: net:broadcast_ether_dst.sh failed.
  24805  14:22:32 ERROR| child process failed
  24806  14:22:32 DEBUG| Traceback (most recent call last):
  24807  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 411, in _exec
  24808  14:22:32 DEBUG| _call_test_function(self.execute, *p_args, **p_dargs)
  24809  14:22:32 DEBUG| ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24810  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 823, in _call_test_function
  24811  14:22:32 DEBUG| return func(*args, **dargs)
  24812  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 290, in execute
  24813  14:22:32 DEBUG| self._call_run_once(constraints, profile_only,
  24814  14:22:32 DEBUG| ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24815  14:22:32 DEBUG| postprocess_profiled_run, args, dargs)
  24816  14:22:32 DEBUG| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24817  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 212, in _call_run_once
  24818  14:22:32 DEBUG| self.run_once(*args, **dargs)
  24819  14:22:32 DEBUG| ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  24820  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/tests/ubuntu_kselftests_net/ubuntu_kselftests_net.py", line 174, in run_once
  24821  14:22:32 DEBUG| raise error.TestError(test_name + ' failed.')
  24822  14:22:32 DEBUG| autotest.client.shared.error.TestError: net:broadcast_ether_dst.sh failed.
  24823  14:22:32 DEBUG|
  24824  14:22:32 DEBUG| During handling of the above exception, another exception occurred:
  24825  14:22:32 DEBUG|
  24826  14:22:32 DEBUG| Traceback (most recent call last):
  24827  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/parallel.py", line 25, in fork_start
  24828  14:22:32 DEBUG| l()
  24829  14:22:32 DEBUG| ~^^
  24830  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/job.py", line 506, in
  24831  14:22:32 DEBUG| l = lambda: test.runtest(self, url, tag, args, dargs)
  24832  14:22:32 DEBUG| ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24833  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/test.py", line 121, in runtest
  24834  14:22:32 DEBUG| common_test.runtest(job, url, tag, args, dargs, locals(), globals(),
  24835  14:22:32 DEBUG| ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24836  14:22:32 DEBUG| job.sysinfo.log_before_each_test,
  24837  14:22:32 DEBUG| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24838  14:22:32 DEBUG| job.sysinfo.log_after_each_test,
  24839  14:22:32 DEBUG| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24840  14:22:32 DEBUG| job.sysinfo.log_before_each_iteration,
  24841  14:22:32 DEBUG| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24842  14:22:32 DEBUG| job.sysinfo.log_after_each_iteration)
  24843  14:22:32 DEBUG| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24844  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 913, in runtest
  24845  14:22:32 DEBUG| mytest._exec(args, dargs)
  24846  14:22:32 DEBUG| ~~~~~~~~~~~~^^^^^^^^^^^^^
  24847  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 434, in _exec
  24848  14:22:32 DEBUG| raise exc_info[0](exc_info[1]).with_traceback(exc_info[2])
  24849  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 411, in _exec
  24850  14:22:32 DEBUG| _call_test_function(self.execute, *p_args, **p_dargs)
  24851  14:22:32 DEBUG| ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24852  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 823, in _call_test_function
  24853  14:22:32 DEBUG| return func(*args, **dargs)
  24854  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 290, in execute
  24855  14:22:32 DEBUG| self._call_run_once(constraints, profile_only,
  24856  14:22:32 DEBUG| ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24857  14:22:32 DEBUG| postprocess_profiled_run, args, dargs)
  24858  14:22:32 DEBUG| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24859  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/shared/test.py", line 212, in _call_run_once
  24860  14:22:32 DEBUG| self.run_once(*args, **dargs)
  24861  14:22:32 DEBUG| ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  24862  14:22:32 DEBUG| File "/home/ubuntu/autotest/client/tests/ubuntu_kselftests_net/ubuntu_kselftests_net.py", line 174, in run_once
  24863  14:22:32 DEBUG| raise error.TestError(test_name + ' failed.')
  24864  14:22:32 DEBUG| autotest.client.shared.error.TestError: net:broadcast_ether_dst.sh failed.
  24865  14:22:33 INFO | ERROR ubuntu_kselftests_net.net:broadcast_ether_dst.sh ubuntu_kselftests_net.net:broadcast_ether_dst.sh timestamp=1760970153 localtime=Oct 20 14:22:33 net:broadcast_ether_dst.sh failed.

  24866  14:22:33 INFO | END ERROR
  ubuntu_kselftests_net.net:broadcast_ether_dst.sh
  ubuntu_kselftests_net.net:broadcast_ether_dst.sh timestamp=1760970153
  localtime=Oct 20 14:22:33

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/2129815/+subscriptions