diff options
-rw-r--r-- | Makefile | 4 | ||||
-rwxr-xr-x | scripts/check-qemu-install | 32 |
2 files changed, 34 insertions, 2 deletions
@@ -41,7 +41,7 @@ test-interfaces: checkiso .PHONY: test-vpp .ONESHELL: test-vpp: checkiso - scripts/check-qemu-install --debug --configd --match="vpp" --smoketest --uefi --cpu 4 --memory 8 build/live-image-amd64.hybrid.iso + scripts/check-qemu-install --debug --configd --match="vpp" --smoketest --uefi --cpu 4 --memory 8 --huge-page-size 2M --huge-page-count 1600 build/live-image-amd64.hybrid.iso .PHONY: testc .ONESHELL: @@ -51,7 +51,7 @@ testc: checkiso .PHONY: testcvpp .ONESHELL: testcvpp: checkiso - scripts/check-qemu-install --debug --configd --match="vpp" --cpu 4 --memory 8 --configtest build/live-image-amd64.hybrid.iso $(filter-out $@,$(MAKECMDGOALS)) + scripts/check-qemu-install --debug --configd --match="vpp" --cpu 4 --memory 8 --huge-page-size 2M --huge-page-count 1600 --configtest build/live-image-amd64.hybrid.iso $(filter-out $@,$(MAKECMDGOALS)) .PHONY: testraid .ONESHELL: diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index e673e3e3..8d6dbece 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -101,6 +101,8 @@ parser.add_argument('--vyconf', help='Execute testsuite with vyconfd', action='s default=False) parser.add_argument('--no-vpp', help='Execute testsuite without VPP tests', action='store_true', default=False) +parser.add_argument('--huge-page-size', help='Huge page size (e.g., 2M, 1G)', type=str) +parser.add_argument('--huge-page-count', help='Number of huge pages to allocate', type=int) args = parser.parse_args() @@ -413,6 +415,22 @@ try: exit(1) ################################################# + # Configure boot options if required + ################################################# + if args.huge_page_size and args.huge_page_count: + c.sendline('configure') + c.expect(cfg_mode_prompt) + c.sendline(f'set system option kernel memory hugepage-size {args.huge_page_size} hugepage-count {args.huge_page_count}') + c.expect(cfg_mode_prompt) + c.sendline('set system option kernel disable-mitigations') + c.expect(cfg_mode_prompt) + c.sendline('commit') + c.expect(cfg_mode_prompt) + c.sendline('save') + c.expect(cfg_mode_prompt) + c.sendline('exit') + c.expect(op_mode_prompt) + ################################################# # Installing into VyOS system ################################################# log.info('Starting installer') @@ -528,6 +546,14 @@ try: loginVM(c, log) + ################################################# + # Boot options require a reboot + ################################################# + if args.huge_page_size and args.huge_page_count: + log.info('Rebooting to apply kernel boot options') + c.sendline('reboot now') + loginVM(c, log) + ################################################ # Always load the WiFi simulation module ################################################ @@ -572,6 +598,12 @@ try: c.expect(op_mode_prompt) c.sendline('show system memory') c.expect(op_mode_prompt) + c.sendline('show system memory detail | no-more') + c.expect(op_mode_prompt) + c.sendline('show configuration commands | match kernel') + c.expect(op_mode_prompt) + c.sendline('cat /proc/cmdline') + c.expect(op_mode_prompt) c.sendline('show version all | grep -e "vpp" -e "vyos-1x"') c.expect(op_mode_prompt) |