File: constants.py

package info (click to toggle)
lava 2020.12-5%2Bdeb11u2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 27,008 kB
  • sloc: python: 71,795; javascript: 16,803; sh: 1,276; makefile: 327
file content (161 lines) | stat: -rw-r--r-- 4,806 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# Copyright (C) 2014-2019 Linaro Limited
#
# Author: Remi Duraffort <remi.duraffort@linaro.org>
#
# This file is part of LAVA.
#
# LAVA is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LAVA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along
# with this program; if not, see <http://www.gnu.org/licenses>.

# Overrides are only supported when and as declared in the comments for
# each constant.

# Retry at most 5 times
MAX_RETRY = 5

# size of u-boot header to be removed from ramdisks, in bytes.
UBOOT_DEFAULT_HEADER_LENGTH = 64

# Ramdisk default filenames
RAMDISK_FNAME = "ramdisk.cpio"

# Size of the chunks when copying file
FILE_DOWNLOAD_CHUNK_SIZE = 32768

# Size of the chunks when downloading over http
HTTP_DOWNLOAD_CHUNK_SIZE = 32768

# Size of the chunks when downloading over scp
SCP_DOWNLOAD_CHUNK_SIZE = 32768

# dispatcher temporary directory
# This is distinct from the TFTP daemon directory
# Files here are for download using the Apache /tmp alias.
DISPATCHER_DOWNLOAD_DIR = "/var/lib/lava/dispatcher/tmp"

# Distinctive prompt characters which can
# help distinguish status messages from shell prompts.
DISTINCTIVE_PROMPT_CHARACTERS = "\\:"

# LAVA Coordinator setup and finalize timeout
LAVA_MULTINODE_SYSTEM_TIMEOUT = 90

# Default Action timeout
ACTION_TIMEOUT = 30

# Android tmp directory
ANDROID_TMP_DIR = "/data/local/tmp"

# LXC protocol name
LXC_PROTOCOL = "lava-lxc"

# LXC container path
LXC_PATH = "/var/lib/lxc"

# LXC finalize timeout
LAVA_LXC_TIMEOUT = 90

# LXC templates with mirror option
LXC_TEMPLATE_WITH_MIRROR = ["debian", "ubuntu"]

# LXC default packages
LXC_DEFAULT_PACKAGES = "systemd,systemd-sysv"

# LAVA home in LXC
LAVA_LXC_HOME = "/lava-lxc"

# mount point for download directory when postprocessing images (e.g. within
# docker containers)
LAVA_DOWNLOADS = "/lava-downloads"

# Timeout used by the vland protocol when waiting for vland to
# respond to the api.create_vlan request, in seconds.
VLAND_DEPLOY_TIMEOUT = 120

# bootloader default timeout for commands
BOOTLOADER_DEFAULT_CMD_TIMEOUT = 90

# kernel boot monitoring
# Some successful kernel builds end the boot with this string
KERNEL_FREE_UNUSED_MSG = r"Freeing unused kernel memory"
# Some successful kernel builds end the boot with this string
KERNEL_FREE_INIT_MSG = r"Freeing init memory"
# exception
KERNEL_EXCEPTION_MSG = r"-+\[ cut here \]-+\s+(.*\s+-+\[ end trace (\w*) \]-+)"
# stack trace
KERNEL_TRACE_MSG = r"Stack:\s+(.*\s+-+\[ end trace (\w*) \]-+)"
# unhandled fault
KERNEL_FAULT_MSG = r"(Unhandled fault.*)\r\n"
# panic
KERNEL_PANIC_MSG = r"Kernel panic - (.*) end Kernel panic"

# Login incorrect message
LOGIN_INCORRECT_MSG = "Login incorrect"
# Login incorrect message
LOGIN_TIMED_OUT_MSG = "Login timed out"

# qemu installer size limit in Mb
# (i.e. size * 1024 * 1024)
INSTALLER_IMAGE_MAX_SIZE = 8 * 1024  # 8Gb
INSTALLER_QUIET_MSG = "Loading initial ramdisk"

# List of DD output prompts for notifying completion of secondary deployment
DD_PROMPTS = [r"[0-9]+\+[0-9]+ records out", r"[0-9]+ bytes \(.*\) copied"]

# fallback UEFI menu label class
DEFAULT_UEFI_LABEL_CLASS = r"a-zA-Z0-9\s\:"

# Set a default newline separator for pexpect, override as necessary
LINE_SEPARATOR = "\n"
# other newline separators
UEFI_LINE_SEPARATOR = "\r\n"

# valid characters in components of a test definition name
# excludes whitespace and punctuation (except hyphen and underscore)
DEFAULT_TESTDEF_NAME_CLASS = r"^[\w\d\_\-]+$"

# Limit repetitive messages
METADATA_MESSAGE_LIMIT = 8192

# Versatile Express autorun interrupt character
VEXPRESS_AUTORUN_INTERRUPT_CHARACTER = " "

# sys class kvm path
SYS_CLASS_KVM = "/sys/class/misc/kvm"

# default reboot commands
REBOOT_COMMAND_LIST = ["reboot", "reboot -n", "reboot -nf"]

# XNBD server timeout (nbd deploy / xnbd protocol)
XNBD_SYSTEM_TIMEOUT = 10000

# XNBD port range min, default 55000
XNBD_PORT_RANGE_MIN = 55000

# XNBD port range max, default 56000
XNBD_PORT_RANGE_MAX = 56000

# Default size limit for tftp in bytes (4Gb)
TFTP_SIZE_LIMIT = 4 * 1024 * 1024 * 1024

# udev rules directory
UDEV_RULES_DIR = "/etc/udev/rules.d/"

UDEV_RULE_FILENAME = UDEV_RULES_DIR + "99-lava-dispatcher-host.rules"

# Services which allow alternative IP's and ports
VALID_DISPATCHER_IP_PROTOCOLS = ["http", "nfs", "tftp"]

# worker daemon data directory
WORKER_DIR = "/var/lib/lava/dispatcher/worker"