← Back to team overview

kubuntu-council team mailing list archive

[Merge] ~cnihelton/ubuntu-manual-tests:update-wsl into ubuntu-manual-tests:main

 

Carlos Nihelton has proposed merging ~cnihelton/ubuntu-manual-tests:update-wsl into ubuntu-manual-tests:main.

Commit message:
Updates WSL test cases:

- fix reference to x11-utils package when aiming to install x11-apps
- adds a check for unexpected users being created automatically
- asserts that X11 and Wayland apps can run


Requested reviews:
  Tim Andersson (andersson123)

For more details, see:
https://code.launchpad.net/~cnihelton/ubuntu-manual-tests/+git/ubuntu-manual-tests/+merge/465894

Motivation for the changes are two fold:

1. The instructions recommend installing x11-utils to run xclock, which comes from x11-apps instead.

2. A recent bug reported afffecting Noble shown that when we have a default user created by cloud-init by default, WSLg fails to run Wayland applications, but succeed in running X11 apps, so our test cases wouldn't ever detect that.
-- 
Your team Ubuntu Testcase Admins is subscribed to branch ubuntu-manual-tests:main.
diff --git a/testcases/image/1739_WSL Import and run b/testcases/image/1739_WSL Import and run
index 39c54a1..356380a 100644
--- a/testcases/image/1739_WSL Import and run
+++ b/testcases/image/1739_WSL Import and run
@@ -39,7 +39,7 @@ TestUbuntuWSL    Stopped         2
 	</dt>
 		<dd>Verify that	you're inside the WSL instance and running the right distribution. For example run:
 <pre>
-# lsb_release -a
+$ lsb_release -a
 No LSB modules are available.
 Distributor ID: Ubuntu
 Description:    Ubuntu 20.04.3 LTS
@@ -48,9 +48,26 @@ Codename:       focal
 </pre>
 		</dd>
 
-	<dt>Since the image	has been installed directly and not with the distro launcher, you're logged in a root by default and have to create a first user manually.
+    <dt>Wait for cloud-init to finish its job, if it's present in the system (cloud-init is only present in recent releases):
 <pre>
-# adduser ubuntu
+$ which cloud-init && cloud-init status --wait
+/usr/bin/cloud-init
+
+status: disabled
+</pre></dt>
+
+  <dt>Since the image	has been installed directly and not with the distro launcher, you're logged in a root by default and have to create a first user manually. But first, verify that there is no other user already created by default:
+<pre>
+$ id 1000
+id: '1000': no such user: No such file or directory
+$ id ubuntu
+id: 'ubuntu': no such user
+$ egrep ':100[0-9]:' /etc/passwd        # should output nothing.
+</pre>
+		</dt>
+    <dt>Create a new user named 'ubuntu':
+<pre>
+$ adduser ubuntu
 Adding user `ubuntu' ...
 Adding new group `ubuntu' (1000) ...
 Adding new user `ubuntu' (1000) with group `ubuntu' ...
@@ -72,12 +89,12 @@ Is the information correct? [Y/n]
 
 	<dt>Add the newly created user to the sudo group:
 <pre>
-# usermod -aG sudo ubuntu
+$ usermod -aG sudo ubuntu
 </pre>
 	</dt>
 	<dd>Verify that you	can switch to the new user
 <pre>
-# su ubuntu
+$ su ubuntu
 To run a command as administrator (user &quot;root&quot;), use &quot;sudo &lt;command&gt;&quot;.
 See &quot;man sudo_root&quot; for details.
 $ whoami
@@ -133,23 +150,35 @@ $ hello
 Hello, world!
 </pre></dd>
 
-	<dt>Install and run a graphical application
+	<dt>Install and run graphical applications
 <pre>
-$ sudo apt install x11-utils
+$ sudo apt install x11-apps gtk-4-examples              # gtk-3-examples for focal
 [...]
 </pre>
 	</dt>
-		<dd>Start one of the graphical application from the x11-utils package, like xcalc for example:
+		<dd>Start one of the graphical application from the x11-apps package, like xcalc for example:
 <pre>
 $ xcalc
 (Wait a moment until the application starts and is displayed)
 </pre></dd>
 
+		<dd>Start the GTK demo application with the default backend:
+<pre>
+$ gtk4-demo
+(Wait a moment until the application starts and is displayed)
+</pre></dd>
+
+		<dd>Start the GTK demo application with the Wayland backend:
+<pre>
+$ GDK_BACKEND=wayland gtk4-demo
+(Wait a moment until the application starts and is displayed)
+</pre></dd>
+
 <dt>Exit WSL
 <pre>logout</pre></dt>
 	<dd>Check that your back to the PowerShell prompt</dd>
 
-	<dt>Uninstall the application
+	<dt>Unregister the distro instance
 <pre>
 > wsl.exe --unregister Ubuntu20.04.3
 </pre></dt>

Follow ups