File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
tests/integration_tests/functional Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+ # SPDX-License-Identifier: Apache-2.0
3+
4+ """Test kernel commandline behavior."""
5+
6+ from framework .microvm import Serial
7+
8+
9+ def test_init_params (test_microvm_with_api ):
10+ """Correct propagation of boot args to the kernel's command line.
11+
12+ Test that init's parameters (the ones present after "--") do not get
13+ altered or misplaced.
14+
15+ @type: functional
16+ """
17+ vm = test_microvm_with_api
18+ vm .jailer .daemonize = False
19+ vm .spawn ()
20+ vm .memory_monitor = None
21+
22+ # We will override the init with /bin/cat so that we try to read the
23+ # Ubuntu version from the /etc/issue file.
24+ vm .basic_config (
25+ vcpu_count = 1 ,
26+ boot_args = 'console=ttyS0 reboot=k panic=1 pci=off'
27+ ' init=/bin/cat -- /etc/issue' ,
28+ )
29+
30+ vm .start ()
31+ serial = Serial (vm )
32+ serial .open ()
33+ # If the string does not show up, the test will fail.
34+ serial .rx (token = 'Ubuntu 18.04 LTS' )
You can’t perform that action at this time.
0 commit comments