Pids used to be a 16-bit value but that's no longer the case. Assume
they are an unsigned 32-bit value now.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
This is needed on Debian 11 because without it the TestBot ORM (Object
Relational Mapper) rejects pids with more than 5 digits. But in Debian
11 'sysctl -n kernel.pid_max' returns 4194304 (probably because of the
newer kernel, 5.10 vs 4.19 for Debian 10).
So the important part is the VMs.pm patch but it's better to keep the
database schema consistent with it by applying update46.sql.
---
testbot/ddl/update46.sql | 4 ++++
testbot/ddl/winetestbot.sql | 2 +-
testbot/lib/WineTestBot/VMs.pm | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
create mode 100644 testbot/ddl/update46.sql
diff --git a/testbot/ddl/update46.sql b/testbot/ddl/update46.sql
new file mode 100644
index 000000000..f24130b06
--- /dev/null
+++ b/testbot/ddl/update46.sql
@@ -0,0 +1,4 @@
+USE winetestbot;
+
+ALTER TABLE VMs
+ MODIFY ChildPid INT UNSIGNED NULL;
diff --git a/testbot/ddl/winetestbot.sql b/testbot/ddl/winetestbot.sql
index 3b5cda757..2d085247c 100644
--- a/testbot/ddl/winetestbot.sql
+++ b/testbot/ddl/winetestbot.sql
@@ -52,7 +52,7 @@ CREATE TABLE VMs
MissionCaps VARCHAR(512) NOT NULL,
Status ENUM('dirty', 'reverting', 'sleeping', 'idle', 'running', 'off', 'offline', 'maintenance') NOT NULL,
Errors INT(2) NULL,
- ChildPid INT(5) NULL,
+ ChildPid INT UNSIGNED NULL,
ChildDeadline DATETIME NULL,
VirtURI VARCHAR(64) NOT NULL,
VirtDomain VARCHAR(32) NOT NULL,
diff --git a/testbot/lib/WineTestBot/VMs.pm b/testbot/lib/WineTestBot/VMs.pm
index 2cc6c678d..0b11d8170 100644
--- a/testbot/lib/WineTestBot/VMs.pm
+++ b/testbot/lib/WineTestBot/VMs.pm
@@ -760,7 +760,7 @@ my @PropertyDescriptors = (
CreateBasicPropertyDescriptor("MissionCaps", "Mission Capabilities", !1, !1, "A", 512),
CreateEnumPropertyDescriptor("Status", "Current status", !1, 1, ['dirty', 'reverting', 'sleeping', 'idle', 'running', 'off', 'offline', 'maintenance']),
CreateBasicPropertyDescriptor("Errors", "Errors", !1, !1, "N", 2),
- CreateBasicPropertyDescriptor("ChildPid", "Child process id", !1, !1, "N", 5),
+ CreateBasicPropertyDescriptor("ChildPid", "Child process id", !1, !1, "N", 10),
CreateBasicPropertyDescriptor("ChildDeadline", "Child Deadline", !1, !1, "DT", 19),
CreateBasicPropertyDescriptor("VirtURI", "LibVirt URI of the VM", !1, 1, "A", 64),
CreateBasicPropertyDescriptor("VirtDomain", "LibVirt Domain for the VM", !1, 1, "A", 32),
--
2.30.2