Skip to content
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

Test driver crashes if special characters are present #84

Open
dz0ny opened this issue Feb 3, 2025 · 0 comments
Open

Test driver crashes if special characters are present #84

dz0ny opened this issue Feb 3, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@dz0ny
Copy link

dz0ny commented Feb 3, 2025

Describe the bug

A simple character in the output crashes the driver.

vm # qemu-kvm: terminating on signal 15 from pid 1046 (/nix/store/y027d3bvlaizbri04c1bzh28hqd6lj01-python3-3.11.7/bin/python3.11)
(finished: cleanup, in 0.03 seconds)
Traceback (most recent call last):
additionally exposed symbols:
    vm,
    vlan1,
    start_all, test_script, machines, vlans, driver, log, os, create_machine, subtest, run_tests, join_all, retry, serial_stdout_off, serial_stdout_on, polling_condition, Machine
  File "/nix/store/ifkgyf5n4i9sb23ic96l1g1r33zf0fag-nixos-test-driver-1.1/bin/.nixos-test-driver-wrapped", line 9, in <module>
    sys.exit(main())
             ^^^^^^
  File "/nix/store/ifkgyf5n4i9sb23ic96l1g1r33zf0fag-nixos-test-driver-1.1/lib/python3.11/site-packages/test_driver/__init__.py", line 126, in main
    driver.run_tests()
  File "/nix/store/ifkgyf5n4i9sb23ic96l1g1r33zf0fag-nixos-test-driver-1.1/lib/python3.11/site-packages/test_driver/driver.py", line 159, in run_tests
    self.test_script()
  File "/nix/store/ifkgyf5n4i9sb23ic96l1g1r33zf0fag-nixos-test-driver-1.1/lib/python3.11/site-packages/test_driver/driver.py", line 151, in test_script
    exec(self.tests, symbols, None)
  File "<string>", line 3, in <module>
  File "/nix/store/ifkgyf5n4i9sb23ic96l1g1r33zf0fag-nixos-test-driver-1.1/lib/python3.11/site-packages/test_driver/machine.py", line 703, in succeed
    (status, out) = self.execute(command, timeout=timeout)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/ifkgyf5n4i9sb23ic96l1g1r33zf0fag-nixos-test-driver-1.1/lib/python3.11/site-packages/test_driver/machine.py", line 642, in execute
    rc = int(self._next_newline_closed_block_from_shell().strip())
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'Created symlink /etc/systemd/system/sockets.target.wants/pareto-core.socket → /etc/systemd/system/pareto-core.socket.'

To Reproduce

Activate systemd unit under Ubuntu VM.

Expected behavior

Should be able to parse and pass any string via test driver.

System information

Operating System: Linux
Machine Type: 4x16
Architecture: amd64

Additional context

https://github.com/ParetoSecurity/pareto-core/actions/runs/13114941839/job/36586854338?pr=77#step:5:1636

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant