tmt icon indicating copy to clipboard operation
tmt copied to clipboard

Unable to run `chcon` in Windows Subsystem for Linux

Open J-PC opened this issue 6 months ago • 4 comments

TMT fails to run "chcon" on files when the provisioning type is virtual or container in WSL. The problem is that the code detects Selinux with /proc/filesystems. "selinuxfs" appears in the output, but in WSL, selinux is disabled, although this appears to be due to WSL mounting some selinux related items. TMT should check the status of selinux by checking the status of the /sys/fs/selinux/enforce file, for example.

J-PC avatar Jun 03 '25 12:06 J-PC

Triage meeting summary: Should be an easy fix to switch the detection to use /sys/fs/selinux/enforce instead.

psss avatar Jun 04 '25 09:06 psss

@therazix It will be some time until I'll get to a windows computer - do you think you can check this one out?

martinhoyer avatar Jun 23 '25 00:06 martinhoyer

@therazix, this seems to be quite trivial, low-hanging fruit, proposing for the next sprint, what do you say?

psss avatar Nov 19 '25 08:11 psss

@therazix, this seems to be quite trivial, low-hanging fruit, proposing for the next sprint, what do you say?

Yes, I agree.

therazix avatar Nov 19 '25 08:11 therazix