mirror of
https://github.com/microsoft/WSL.git
synced 2025-12-10 17:47:59 -06:00
Spelling (#13289)
* link: report them to the Microsoft Security Response Center (MSRC) Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * link: Microsoft Security Response Center Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: , or Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: adapters Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: at Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: attaching them to the bug, please send them to wsl-gh-logs@microsoft.com with the github issue number in the subject, and include a link to your github issue comment in the message body. Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: disk Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: effect Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: for the file Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: for the mount to be available Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: grandchild Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: last pid Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: nonexistent Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: on which the... Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: path Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: pseudo Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: script Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: service, the Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: session Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: strip Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: that a Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: that the Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: the first one we find in the test Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: to which Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: waitpid Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: whether Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: while the relay was being set up, Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: with an Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: without specifying Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --------- Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Co-authored-by: Ben Hillis <benhillis@gmail.com>
This commit is contained in:
parent
4867250d11
commit
6d18bf5074
6
.github/policies/resourceManagement.yml
vendored
6
.github/policies/resourceManagement.yml
vendored
@ -181,7 +181,7 @@ configuration:
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The scipt will output the path of the log file once done.
|
The script will output the path of the log file once done.
|
||||||
|
|
||||||
|
|
||||||
Once completed please upload the output files to this GitHub issue.
|
Once completed please upload the output files to this GitHub issue.
|
||||||
@ -190,7 +190,7 @@ configuration:
|
|||||||
See [Collect WSL logs (recommended method)](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method).
|
See [Collect WSL logs (recommended method)](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method).
|
||||||
|
|
||||||
|
|
||||||
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue.
|
If you choose to email these logs instead of attaching them to the bug, please send them to wsl-gh-logs@microsoft.com with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body.
|
||||||
|
|
||||||
|
|
||||||
Thank you!
|
Thank you!
|
||||||
@ -226,7 +226,7 @@ configuration:
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The scipt will output the path of the log file once done.
|
The script will output the path of the log file once done.
|
||||||
|
|
||||||
|
|
||||||
Once completed please upload the output files to this GitHub issue.
|
Once completed please upload the output files to this GitHub issue.
|
||||||
|
|||||||
@ -68,7 +68,7 @@ The script will output the path of the log file once done.
|
|||||||
|
|
||||||
### Collect WSL logs (recommended method)
|
### Collect WSL logs (recommended method)
|
||||||
|
|
||||||
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue.
|
If you choose to email these logs instead of attaching them to the bug, please send them to wsl-gh-logs@microsoft.com with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body.
|
||||||
|
|
||||||
To collect WSL logs, download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an administrative powershell prompt:
|
To collect WSL logs, download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an administrative powershell prompt:
|
||||||
|
|
||||||
|
|||||||
@ -10,11 +10,11 @@ If you believe you have found a security vulnerability in any Microsoft-owned re
|
|||||||
|
|
||||||
**Please do not report security vulnerabilities through public GitHub issues.**
|
**Please do not report security vulnerabilities through public GitHub issues.**
|
||||||
|
|
||||||
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
|
Instead, please [report them to the Microsoft Security Response Center (MSRC)](https://aka.ms/opensource/security/create-report).
|
||||||
|
|
||||||
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
|
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
|
||||||
|
|
||||||
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
|
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [Microsoft Security Response Center](https://aka.ms/opensource/security/msrc).
|
||||||
|
|
||||||
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
|
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
|
||||||
|
|
||||||
|
|||||||
@ -82,7 +82,7 @@ When started, the virtual machine will boot into the provided kernel, and then e
|
|||||||
|
|
||||||
- An entropy buffer, to seed the virtual machine's entropy
|
- An entropy buffer, to seed the virtual machine's entropy
|
||||||
- Information about the GPU drivers shares to mount, if any
|
- Information about the GPU drivers shares to mount, if any
|
||||||
- Wether [wslg](https://github.com/microsoft/wslg) is enabled
|
- Whether [wslg](https://github.com/microsoft/wslg) is enabled
|
||||||
|
|
||||||
After applying all the configuration requested by [wslservice.exe](wslservice.exe.md), the virtual machine is ready to start Linux distributions.
|
After applying all the configuration requested by [wslservice.exe](wslservice.exe.md), the virtual machine is ready to start Linux distributions.
|
||||||
|
|
||||||
|
|||||||
@ -1100,7 +1100,7 @@ Error code: {}</value>
|
|||||||
<value>Failed to query networking mode</value>
|
<value>Failed to query networking mode</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MessageMismatchedKernelModulesError" xml:space="preserve">
|
<data name="MessageMismatchedKernelModulesError" xml:space="preserve">
|
||||||
<value>Customised kernel modules were supplied without a specifying a customised kernel. Please see https://aka.ms/wslcustomkernel for more information.</value>
|
<value>Customised kernel modules were supplied without specifying a customised kernel. Please see https://aka.ms/wslcustomkernel for more information.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MessageDnsTunnelingDisabled" xml:space="preserve">
|
<data name="MessageDnsTunnelingDisabled" xml:space="preserve">
|
||||||
<value>Due to a current compatibility issue with Global Secure Access Client, DNS Tunneling is disabled.</value>
|
<value>Due to a current compatibility issue with Global Secure Access Client, DNS Tunneling is disabled.</value>
|
||||||
|
|||||||
@ -1100,7 +1100,7 @@ Error code: {}</value>
|
|||||||
<value>Failed to query networking mode</value>
|
<value>Failed to query networking mode</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MessageMismatchedKernelModulesError" xml:space="preserve">
|
<data name="MessageMismatchedKernelModulesError" xml:space="preserve">
|
||||||
<value>Customised kernel modules were supplied without a specifying a customised kernel. Please see https://aka.ms/wslcustomkernel for more information.</value>
|
<value>Customised kernel modules were supplied without specifying a customised kernel. Please see https://aka.ms/wslcustomkernel for more information.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MessageDnsTunnelingDisabled" xml:space="preserve">
|
<data name="MessageDnsTunnelingDisabled" xml:space="preserve">
|
||||||
<value>Due to a current compatibility issue with Global Secure Access Client, DNS Tunneling is disabled.</value>
|
<value>Due to a current compatibility issue with Global Secure Access Client, DNS Tunneling is disabled.</value>
|
||||||
|
|||||||
@ -835,8 +835,8 @@ try
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Run the Plan 9 server. This requires a DrvFs mount for the socket file,
|
// Run the Plan 9 server. This requires a DrvFs mount for the socket file,
|
||||||
// so either fstab or automount must be enabled to have a chance the mount
|
// so either fstab or automount must be enabled to have a chance for the
|
||||||
// exists.
|
// mount to be available.
|
||||||
//
|
//
|
||||||
// N.B. Failure to start the server is non-fatal.
|
// N.B. Failure to start the server is non-fatal.
|
||||||
//
|
//
|
||||||
|
|||||||
@ -64,7 +64,7 @@ void ListenThread(sockaddr_vm hvSocketAddress, int listenSocket)
|
|||||||
|
|
||||||
// Connect to the actual socket address and set up a relay.
|
// Connect to the actual socket address and set up a relay.
|
||||||
//
|
//
|
||||||
// N.B. During the time setting up the relay the server may have
|
// N.B. While the relay was being set up, the server may have
|
||||||
// stopped listening.
|
// stopped listening.
|
||||||
sockaddr* socketAddress;
|
sockaddr* socketAddress;
|
||||||
int socketAddressSize;
|
int socketAddressSize;
|
||||||
|
|||||||
@ -3168,8 +3168,8 @@ Routine Description:
|
|||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
MessageFd - Supplies a file descriptor to the socket the message was received
|
MessageFd - Supplies a file descriptor to the socket on which the message was
|
||||||
on. This is used for operations that require responses, for example a
|
received. This is used for operations that require responses, for example a
|
||||||
VHD eject request.
|
VHD eject request.
|
||||||
|
|
||||||
Buffer - Supplies the message.
|
Buffer - Supplies the message.
|
||||||
@ -3802,7 +3802,7 @@ Routine Description:
|
|||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
Pth - Supplies the path to the block device.
|
Path - Supplies the path to the block device.
|
||||||
|
|
||||||
Return Value:
|
Return Value:
|
||||||
|
|
||||||
|
|||||||
@ -143,7 +143,7 @@ public:
|
|||||||
gsl::span<std::byte> Span()
|
gsl::span<std::byte> Span()
|
||||||
{
|
{
|
||||||
// In case the structure is padded,
|
// In case the structure is padded,
|
||||||
// make sure that the message is a least the size of the structure.
|
// make sure that the message is at least the size of the structure.
|
||||||
|
|
||||||
const int64_t diff = sizeof(TMessage) - m_buffer.size();
|
const int64_t diff = sizeof(TMessage) - m_buffer.size();
|
||||||
if (diff > 0)
|
if (diff > 0)
|
||||||
|
|||||||
@ -45,7 +45,7 @@ std::vector<std::wstring> GetUserLanguages(bool impersonate)
|
|||||||
{
|
{
|
||||||
if (g_runningInService)
|
if (g_runningInService)
|
||||||
{
|
{
|
||||||
// N.B. If we're in the service the locale needs to be queried every time since different users
|
// N.B. If we're in the service, the locale needs to be queried every time since different users
|
||||||
// can have different language configurations.
|
// can have different language configurations.
|
||||||
std::optional<wil::unique_coreverttoself_call> revert;
|
std::optional<wil::unique_coreverttoself_call> revert;
|
||||||
if (impersonate)
|
if (impersonate)
|
||||||
|
|||||||
@ -545,7 +545,7 @@ private:
|
|||||||
&BufferSize);
|
&BufferSize);
|
||||||
} while (Result == ERROR_BUFFER_OVERFLOW);
|
} while (Result == ERROR_BUFFER_OVERFLOW);
|
||||||
|
|
||||||
THROW_LAST_ERROR_IF_MSG((Result != ERROR_SUCCESS), "GetAdpatersAddresses");
|
THROW_LAST_ERROR_IF_MSG((Result != ERROR_SUCCESS), "GetAdaptersAddresses");
|
||||||
m_buffer.resize(BufferSize);
|
m_buffer.resize(BufferSize);
|
||||||
auto AddressBuffer = (PIP_ADAPTER_ADDRESSES)m_buffer.data();
|
auto AddressBuffer = (PIP_ADAPTER_ADDRESSES)m_buffer.data();
|
||||||
std::vector<IpAdapterAddress> addresses;
|
std::vector<IpAdapterAddress> addresses;
|
||||||
|
|||||||
@ -484,7 +484,7 @@ public:
|
|||||||
HRESULT AttachDisk(_In_ LPCWSTR Disk, _In_ ULONG Flags);
|
HRESULT AttachDisk(_In_ LPCWSTR Disk, _In_ ULONG Flags);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Detach a passthrough a disk from the utility VM.
|
/// Detach a passthrough disk from the utility VM.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
HRESULT DetachDisk(_In_ LPCWSTR Disk, _Out_ int* Result, _Out_ int* Step);
|
HRESULT DetachDisk(_In_ LPCWSTR Disk, _Out_ int* Result, _Out_ int* Step);
|
||||||
|
|
||||||
|
|||||||
@ -411,7 +411,7 @@ int AuxvAtExecfn(PLXT_ARGS Args)
|
|||||||
LxtCheckResult(LxtWaitPidPoll(ChildPid, LXT_RESULT_SUCCESS));
|
LxtCheckResult(LxtWaitPidPoll(ChildPid, LXT_RESULT_SUCCESS));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Run the binary an empty command line.
|
// Run the binary with an empty command line.
|
||||||
//
|
//
|
||||||
|
|
||||||
LxtCheckErrno(ChildPid = fork());
|
LxtCheckErrno(ChildPid = fork());
|
||||||
@ -516,7 +516,7 @@ int AuxvAtExecfn(PLXT_ARGS Args)
|
|||||||
LxtCheckResult(LxtWaitPidPoll(ChildPid, LXT_RESULT_SUCCESS));
|
LxtCheckResult(LxtWaitPidPoll(ChildPid, LXT_RESULT_SUCCESS));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Run the script an empty command line.
|
// Run the script with an empty command line.
|
||||||
//
|
//
|
||||||
|
|
||||||
LxtCheckErrno(ChildPid = fork());
|
LxtCheckErrno(ChildPid = fork());
|
||||||
|
|||||||
@ -72,7 +72,7 @@ int GetPtSerialNumFromDeviceString(const char PtsNameString[])
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This routine will parse the PTS (Psedu Terminal Slave) device name and
|
This routine will parse the PTS (Pseudo Terminal Slave) device name and
|
||||||
retrieve the Serial Number from the string.
|
retrieve the Serial Number from the string.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|||||||
@ -1027,7 +1027,7 @@ Return Value:
|
|||||||
LxtCheckErrnoZeroSuccess(connect(ClientSocket, (struct sockaddr*)&Address, sizeof(Address)));
|
LxtCheckErrnoZeroSuccess(connect(ClientSocket, (struct sockaddr*)&Address, sizeof(Address)));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Tell the parent the process is running inside the execve'd binary.
|
// Tell the parent that the process is running inside the execve'd binary.
|
||||||
//
|
//
|
||||||
|
|
||||||
LxtCheckResult(LxtSendMessage(ClientSocket, "execve"));
|
LxtCheckResult(LxtSendMessage(ClientSocket, "execve"));
|
||||||
@ -1106,7 +1106,7 @@ Return Value:
|
|||||||
LxtCheckEqual(Sid, getpgid(0), "%d");
|
LxtCheckEqual(Sid, getpgid(0), "%d");
|
||||||
|
|
||||||
//
|
//
|
||||||
// Tell the parent the new session was created.
|
// Tell the parent that a new session was created.
|
||||||
//
|
//
|
||||||
|
|
||||||
LxtCheckErrnoZeroSuccess(kill(getppid(), SIGUSR1));
|
LxtCheckErrnoZeroSuccess(kill(getppid(), SIGUSR1));
|
||||||
|
|||||||
@ -3403,7 +3403,7 @@ Return Value:
|
|||||||
|
|
||||||
//
|
//
|
||||||
// When using the current time, there is a slight chance of this test
|
// When using the current time, there is a slight chance of this test
|
||||||
// failing when the time the file was set to and the time when the check
|
// failing when the time set for the file and the time when the check
|
||||||
// is done straddle midnight.
|
// is done straddle midnight.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|||||||
@ -320,7 +320,7 @@ int SetGetAffinityNp(PLXT_ARGS Args)
|
|||||||
|
|
||||||
//
|
//
|
||||||
// N.B Affinity cannot be validated because its not guaranteed for it to
|
// N.B Affinity cannot be validated because its not guaranteed for it to
|
||||||
// take affect.
|
// take effect.
|
||||||
//
|
//
|
||||||
|
|
||||||
LxtLogInfo("Current Affinity: %08x", *(uint32_t*)&Set);
|
LxtLogInfo("Current Affinity: %08x", *(uint32_t*)&Set);
|
||||||
|
|||||||
@ -1486,7 +1486,7 @@ Arguments:
|
|||||||
|
|
||||||
Flag - Supplies the flag to toggle.
|
Flag - Supplies the flag to toggle.
|
||||||
|
|
||||||
IsFlagEnabled - Supplies the state the flag should be set to.
|
IsFlagEnabled - Supplies the state to which the flag should be set.
|
||||||
|
|
||||||
Response - Supplies a pointer to receive the response errno.
|
Response - Supplies a pointer to receive the response errno.
|
||||||
|
|
||||||
|
|||||||
@ -29,8 +29,8 @@ Abstract:
|
|||||||
|
|
||||||
#define WAITPID_DEFAULT_WAIT_TIMEOUT_US 100000
|
#define WAITPID_DEFAULT_WAIT_TIMEOUT_US 100000
|
||||||
#define WAITPID_DEFAULT_WAIT_COUNT 20
|
#define WAITPID_DEFAULT_WAIT_COUNT 20
|
||||||
#define WAIDPID_THREADGROUP_LEADER_UID 1044
|
#define WAITPID_THREADGROUP_LEADER_UID 1044
|
||||||
#define WAIDPID_PTHREAD_UID 1055
|
#define WAITPID_PTHREAD_UID 1055
|
||||||
|
|
||||||
bool g_VmMode = false;
|
bool g_VmMode = false;
|
||||||
|
|
||||||
@ -719,7 +719,7 @@ Return Value:
|
|||||||
|
|
||||||
int Result;
|
int Result;
|
||||||
LxtLogInfo("WaitPid child tid %d", gettid());
|
LxtLogInfo("WaitPid child tid %d", gettid());
|
||||||
LxtCheckErrno(LxtSetUid(WAIDPID_PTHREAD_UID));
|
LxtCheckErrno(LxtSetUid(WAITPID_PTHREAD_UID));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Enter a very long sleep, this will be interrupted when the threadgroup
|
// Enter a very long sleep, this will be interrupted when the threadgroup
|
||||||
@ -785,7 +785,7 @@ Return Value:
|
|||||||
//
|
//
|
||||||
|
|
||||||
sleep(1);
|
sleep(1);
|
||||||
LxtCheckErrno(LxtSetUid(WAIDPID_THREADGROUP_LEADER_UID));
|
LxtCheckErrno(LxtSetUid(WAITPID_THREADGROUP_LEADER_UID));
|
||||||
_exit(ExpectedStatus);
|
_exit(ExpectedStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -794,7 +794,7 @@ Return Value:
|
|||||||
LxtCheckEqual(SigInfo.si_code, CLD_EXITED, "%d");
|
LxtCheckEqual(SigInfo.si_code, CLD_EXITED, "%d");
|
||||||
LxtCheckEqual(SigInfo.si_status, ExpectedStatus, "%d");
|
LxtCheckEqual(SigInfo.si_status, ExpectedStatus, "%d");
|
||||||
LxtCheckEqual(SigInfo.si_pid, ChildPid, "%d");
|
LxtCheckEqual(SigInfo.si_pid, ChildPid, "%d");
|
||||||
LxtCheckEqual(SigInfo.si_uid, WAIDPID_THREADGROUP_LEADER_UID, "%d");
|
LxtCheckEqual(SigInfo.si_uid, WAITPID_THREADGROUP_LEADER_UID, "%d");
|
||||||
|
|
||||||
//
|
//
|
||||||
// Wait for a specific child.
|
// Wait for a specific child.
|
||||||
@ -1006,7 +1006,7 @@ Return Value:
|
|||||||
ChildPid = -1;
|
ChildPid = -1;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create a child process, that in turn creates a granchild process
|
// Create a child process, that in turn creates a grandchild process
|
||||||
// with CLONE_PARENT.
|
// with CLONE_PARENT.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|||||||
@ -2680,7 +2680,7 @@ class NetworkTests
|
|||||||
{.guiApplications = true, .networkingMode = wsl::core::NetworkingMode::Mirrored, .hostAddressLoopback = true}));
|
{.guiApplications = true, .networkingMode = wsl::core::NetworkingMode::Mirrored, .hostAddressLoopback = true}));
|
||||||
WaitForMirroredStateInLinux();
|
WaitForMirroredStateInLinux();
|
||||||
|
|
||||||
// We list the IPv4 addresses mirrored in Linux and use in the test the first one we find
|
// We list the IPv4 addresses mirrored in Linux and use the first one we find in the test
|
||||||
std::vector<InterfaceState> interfaceStates = GetAllInterfaceStates();
|
std::vector<InterfaceState> interfaceStates = GetAllInterfaceStates();
|
||||||
std::wstring ipAddress;
|
std::wstring ipAddress;
|
||||||
|
|
||||||
@ -2760,7 +2760,7 @@ class NetworkTests
|
|||||||
{.guiApplications = true, .networkingMode = wsl::core::NetworkingMode::Mirrored, .hostAddressLoopback = true}));
|
{.guiApplications = true, .networkingMode = wsl::core::NetworkingMode::Mirrored, .hostAddressLoopback = true}));
|
||||||
WaitForMirroredStateInLinux();
|
WaitForMirroredStateInLinux();
|
||||||
|
|
||||||
// We list the IPv4 addresses mirrored in Linux and use in the test the first one we find
|
// We list the IPv4 addresses mirrored in Linux and use the first one we find in the test
|
||||||
std::vector<InterfaceState> interfaceStates = GetAllInterfaceStates();
|
std::vector<InterfaceState> interfaceStates = GetAllInterfaceStates();
|
||||||
std::wstring ipAddress;
|
std::wstring ipAddress;
|
||||||
|
|
||||||
@ -3650,7 +3650,7 @@ class NetworkTests
|
|||||||
return std::find(v6State.Routes.begin(), v6State.Routes.end(), route) != v6State.Routes.end();
|
return std::find(v6State.Routes.begin(), v6State.Routes.end(), route) != v6State.Routes.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reads from the file until the substring is found, a timeout is reached or ReadFile returns an error
|
// Reads from the file until the substring is found, a timeout is reached, or ReadFile returns an error
|
||||||
// Returns true on success, false otherwise
|
// Returns true on success, false otherwise
|
||||||
static bool FindSubstring(wil::unique_handle& file, const std::string& substr, std::string& output)
|
static bool FindSubstring(wil::unique_handle& file, const std::string& substr, std::string& output)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -227,7 +227,7 @@ class UnitTests
|
|||||||
CreateUser(LXSST_TEST_USERNAME, &TestUid, &TestGid);
|
CreateUser(LXSST_TEST_USERNAME, &TestUid, &TestGid);
|
||||||
auto userCleanup = wil::scope_exit([]() { LxsstuLaunchWsl(L"userdel " LXSST_TEST_USERNAME); });
|
auto userCleanup = wil::scope_exit([]() { LxsstuLaunchWsl(L"userdel " LXSST_TEST_USERNAME); });
|
||||||
|
|
||||||
auto validateUserSesssion = [&]() {
|
auto validateUserSession = [&]() {
|
||||||
// verify that the user service is running
|
// verify that the user service is running
|
||||||
const std::wstring isServiceActiveCmd =
|
const std::wstring isServiceActiveCmd =
|
||||||
std::format(L"-u {} systemctl is-active user@{}.service ; exit 0", LXSST_TEST_USERNAME, TestUid);
|
std::format(L"-u {} systemctl is-active user@{}.service ; exit 0", LXSST_TEST_USERNAME, TestUid);
|
||||||
@ -260,7 +260,7 @@ class UnitTests
|
|||||||
|
|
||||||
// Validate user sessions state with gui apps disabled.
|
// Validate user sessions state with gui apps disabled.
|
||||||
{
|
{
|
||||||
validateUserSesssion();
|
validateUserSession();
|
||||||
|
|
||||||
auto [out, err] = LxsstuLaunchWslAndCaptureOutput(std::format(L"echo $DISPLAY", LXSST_TEST_USERNAME));
|
auto [out, err] = LxsstuLaunchWslAndCaptureOutput(std::format(L"echo $DISPLAY", LXSST_TEST_USERNAME));
|
||||||
VERIFY_ARE_EQUAL(out, L"\n");
|
VERIFY_ARE_EQUAL(out, L"\n");
|
||||||
@ -270,7 +270,7 @@ class UnitTests
|
|||||||
{
|
{
|
||||||
WslConfigChange config(LxssGenerateTestConfig({.guiApplications = true}));
|
WslConfigChange config(LxssGenerateTestConfig({.guiApplications = true}));
|
||||||
|
|
||||||
validateUserSesssion();
|
validateUserSession();
|
||||||
auto [out, err] = LxsstuLaunchWslAndCaptureOutput(std::format(L"echo $DISPLAY", LXSST_TEST_USERNAME));
|
auto [out, err] = LxsstuLaunchWslAndCaptureOutput(std::format(L"echo $DISPLAY", LXSST_TEST_USERNAME));
|
||||||
VERIFY_ARE_EQUAL(out, L":0\n");
|
VERIFY_ARE_EQUAL(out, L":0\n");
|
||||||
}
|
}
|
||||||
@ -2608,7 +2608,7 @@ Error code: Wsl/InstallDistro/WSL_E_DISTRO_NOT_FOUND
|
|||||||
{
|
{
|
||||||
WSL2_TEST_ONLY();
|
WSL2_TEST_ONLY();
|
||||||
|
|
||||||
// Get the kernel version and stip off everything after the first dash.
|
// Get the kernel version and strip off everything after the first dash.
|
||||||
std::wstring kernelVersion{TEXT(KERNEL_VERSION)};
|
std::wstring kernelVersion{TEXT(KERNEL_VERSION)};
|
||||||
auto position = kernelVersion.find_first_of(L"-");
|
auto position = kernelVersion.find_first_of(L"-");
|
||||||
if (position != kernelVersion.npos)
|
if (position != kernelVersion.npos)
|
||||||
@ -3585,10 +3585,10 @@ localhostForwarding=true
|
|||||||
validateUidChange(L"testuser", Uid, L"The operation completed successfully. \r\n", L"", 0);
|
validateUidChange(L"testuser", Uid, L"The operation completed successfully. \r\n", L"", 0);
|
||||||
validateUidChange(L"root", 0, L"The operation completed successfully. \r\n", L"", 0);
|
validateUidChange(L"root", 0, L"The operation completed successfully. \r\n", L"", 0);
|
||||||
|
|
||||||
const std::wstring invalidUser = L"DoesntExist";
|
const std::wstring invalidUser = L"Nonexistent";
|
||||||
validateUidChange(invalidUser, 0, L"", L"/usr/bin/id: \u2018" + invalidUser + L"\u2019: no such user\n", 1);
|
validateUidChange(invalidUser, 0, L"", L"/usr/bin/id: \u2018" + invalidUser + L"\u2019: no such user\n", 1);
|
||||||
|
|
||||||
auto [out, _] = LxsstuLaunchWslAndCaptureOutput(L"--manage doesntexist --set-default-user root", -1);
|
auto [out, _] = LxsstuLaunchWslAndCaptureOutput(L"--manage nonexistent --set-default-user root", -1);
|
||||||
|
|
||||||
VERIFY_ARE_EQUAL(
|
VERIFY_ARE_EQUAL(
|
||||||
out, L"There is no distribution with the supplied name.\r\nError code: Wsl/Service/WSL_E_DISTRO_NOT_FOUND\r\n");
|
out, L"There is no distribution with the supplied name.\r\nError code: Wsl/Service/WSL_E_DISTRO_NOT_FOUND\r\n");
|
||||||
@ -5203,7 +5203,7 @@ Error code: Wsl/InstallDistro/WSL_E_DISTRO_NOT_FOUND\r\n",
|
|||||||
"Name": "{}",
|
"Name": "{}",
|
||||||
"FriendlyName": "DebianFriendlyName",
|
"FriendlyName": "DebianFriendlyName",
|
||||||
"Amd64Url": {{
|
"Amd64Url": {{
|
||||||
"Url": "file://doesnotexist",
|
"Url": "file://nonexistent",
|
||||||
"Sha256": ""
|
"Sha256": ""
|
||||||
}}
|
}}
|
||||||
}},
|
}},
|
||||||
@ -5211,7 +5211,7 @@ Error code: Wsl/InstallDistro/WSL_E_DISTRO_NOT_FOUND\r\n",
|
|||||||
"Name": "dummy",
|
"Name": "dummy",
|
||||||
"FriendlyName": "dummy",
|
"FriendlyName": "dummy",
|
||||||
"Amd64Url": {{
|
"Amd64Url": {{
|
||||||
"Url": "file://doesnotexist",
|
"Url": "file://nonexistent",
|
||||||
"Sha256": ""
|
"Sha256": ""
|
||||||
}}
|
}}
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -27,7 +27,7 @@ logs_rules:
|
|||||||
|
|
||||||
See [Collect WSL logs (recommended method)](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method).
|
See [Collect WSL logs (recommended method)](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method).
|
||||||
|
|
||||||
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.
|
If you choose to email these logs instead of attaching them to the bug, please send them to wsl-gh-logs@microsoft.com with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body, and reply with '/emailed-logs'.
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user