Last active
March 1, 2020 04:20
-
-
Save NickZ/58e87d6beaf6473a61da6856802154da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import time | |
import sys | |
#takes an argument with the vmname. Use a guest using the 18.04 image, not the 16.04 image. | |
#like `python trigger_1170.py intrigued-stag` | |
#otherwise uses primary | |
vmname = "primary" | |
if len(sys.argv) < 2: | |
print("Using primary") | |
else: | |
vmname = sys.argv[1] | |
# This command does not trigger the bug | |
#command = ['multipass', 'exec', str(vmname), '--', 'echo', 'hello'] | |
# This does! | |
command = ['multipass', 'exec', str(vmname), '--', 'sudo', '-i', 'env', 'printenv', 'HOME'] | |
# This may take a few iterations, but the bug will eventually be triggered | |
while True: | |
print("testing output...") | |
print(str(subprocess.check_output(command))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment