Example #1
0
        //
        // Run out of memory test, eventually terminates the SIP due
        // to fail fast.
        //
        internal void RunTestAsProcess(Parameters !config, string test)
        {
            Process p = null;

            //
            // Create a subprocess run of "memstress -testparameter"
            //
            string[] args = new string[3];
            args[0] = "memstress";
            args[1] = test;
            args[2] = "-noprocess";

            Console.WriteLine("Creating subprocess memstress {0} -noprocess", test);

            try {
                p = ProcessLauncher.CreateSubProcess(config, args);
            }
            catch (Exception e) {
                Console.WriteLine("Exception from CreateSubProcess: " + e.Message);
                return;
            }

            if (p == null)
            {
                Console.WriteLine("Error creating process");
                return;
            }

            Console.WriteLine("Process returned with ExitCode={0}", p.ExitCode);
        }