Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestStartOnWindowsWithBadFileFormat failing on Nano in CI #17919

Closed
stephentoub opened this issue Jul 25, 2016 · 2 comments
Closed

TestStartOnWindowsWithBadFileFormat failing on Nano in CI #17919

stephentoub opened this issue Jul 25, 2016 · 2 comments
Assignees
Milestone

Comments

@stephentoub
Copy link
Member

This test has been consistently failing for the last several runs, e.g.
http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_winnano16_debug_tst/66/consoleText
http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_winnano16_debug_tst/65/consoleText
http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_winnano16_debug_tst/64/consoleText

TestUserCredentialsPropertiesOnWindows: NetUserAdd failed: The account already exists
   System.Diagnostics.Tests.ProcessTests.TestStartOnWindowsWithBadFileFormat [FAIL]
      Assert+WrapperXunitException : File path: D:\j\workspace\outerloop_win---7180cb44\src\System.Diagnostics.Process\tests\ProcessTests.cs. Line: 737
      ---- Assert.NotEqual() Failure
      Expected: Not 0
      Actual:   0
      Stack Trace:
            at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber)
            at Assert.NotEqual[T](T expected, T actual, String path, Int32 line)
            at System.Diagnostics.Tests.ProcessTests.TestStartOnWindowsWithBadFileFormat()
         ----- Inner Stack Trace -----
            at Assert.NotEqual[T](T expected, T actual, String path, Int32 line)
@Priya91
Copy link
Contributor

Priya91 commented Aug 19, 2016

Tested on Windows Nano with a native program to test CreateProcessW win32 api with a bad file name, the windows api returns error code 0, the bug is on the win api.

// CPPCreateProcessW.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

#include <windows.h>
#include <stdio.h>
#include <tchar.h>

int wmain(int argc, WCHAR *argv[])
{
    STARTUPINFO si;
    PROCESS_INFORMATION pi;

    ZeroMemory(&si, sizeof(si));
    si.cb = sizeof(si);
    ZeroMemory(&pi, sizeof(pi));

    if (argc != 2)
    {
        printf("Usage: %s [cmdline]\n", argv[0]);
        return 1;
    }

    // Start the child process. 
    if (!CreateProcessW(NULL,   // No module name (use command line)
        argv[1],        // Command line
        NULL,           // Process handle not inheritable
        NULL,           // Thread handle not inheritable
        FALSE,          // Set handle inheritance to FALSE
        0,              // No creation flags
        NULL,           // Use parent's environment block
        NULL,           // Use parent's starting directory 
        &si,            // Pointer to STARTUPINFO structure
        &pi)           // Pointer to PROCESS_INFORMATION structure
        )
    {
        printf("CreateProcess failed (%d).\n", GetLastError());
        return 1;
    }

    printf("Process Id: %d\n", pi.dwProcessId);
    // Wait until child process exits.
    WaitForSingleObject(pi.hProcess, INFINITE);

    // Close process and thread handles. 
    CloseHandle(pi.hProcess);
    CloseHandle(pi.hThread);

    return 0;
}

gives output,

[dci-nanotp5-1]: PS C:\Users\dotnet-bot\Documents\processtest\Debug> .\CPPCreateProcessW.exe "TestStartOnWindowsWithBadFileFormat_734.txt"
CreateProcess failed (0).

@Priya91
Copy link
Contributor

Priya91 commented Aug 25, 2016

This bug is tracked by Windows team internally, and the fix on corefx, would be to upgrade to the next version of Nano Server upon release. So closing this bug.

@Priya91 Priya91 closed this as completed Aug 25, 2016
@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 1.0.x milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants