Skip to content

Commit 610177e

Browse files
committed
Add kitchen test to check if GDM is using X11 session type
1 parent bb9d87c commit 610177e

File tree

1 file changed

+24
-0
lines changed
  • cookbooks/aws-parallelcluster-platform/test/controls

1 file changed

+24
-0
lines changed

cookbooks/aws-parallelcluster-platform/test/controls/dcv_spec.rb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,3 +318,27 @@
318318
end
319319
end
320320
end
321+
322+
control 'tag:config_dcv_xorg_running_with_x11_session_type' do
323+
title 'Check that Xorg is running and GDM is using X11 session type (not Wayland)'
324+
only_if do
325+
!os_properties.on_docker? &&
326+
instance.head_node? &&
327+
instance.dcv_installed? &&
328+
node['cluster']['dcv_enabled'] == "head_node" &&
329+
instance.graphic? &&
330+
instance.nvidia_installed? &&
331+
instance.dcv_gpu_accel_supported?
332+
end
333+
334+
describe 'Xorg process should be running' do
335+
subject { command('pidof Xorg || pidof X') }
336+
its('exit_status') { should eq 0 }
337+
its('stdout') { should_not be_empty }
338+
end
339+
340+
describe 'GDM should be using X11 session type, not Wayland' do
341+
subject { command("loginctl show-session $(loginctl | grep gdm | awk '{print $1}') -p Type 2>/dev/null | grep -i x11") }
342+
its('exit_status') { should eq 0 }
343+
end
344+
end

0 commit comments

Comments
 (0)