Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for ExitError (0.29 sec)

  1. src/os/exec/exec_test.go

    		// resulting error should be an exec.ExitError without additional wrapping.
    		if _, ok := err.(*exec.ExitError); !ok {
    			t.Errorf("Wait error = %v; want *exec.ExitError", err)
    		}
    	})
    
    	// If Cancel returns ErrProcessDone but the process is not actually done
    	// (and has to be killed), Wait should report the usual SIGKILL ExitError,
    	// not the error from Cancel.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 20:13:53 UTC 2024
    - 48.4K bytes
    - Viewed (0)
  2. src/os/exec/exec.go

    		// set it to nil to prevent awaitGoroutines from blocking on it.
    		c.goroutineErr = nil
    	}
    
    	resultc <- ctxResult{err: err}
    }
    
    // An ExitError reports an unsuccessful exit by a command.
    type ExitError struct {
    	*os.ProcessState
    
    	// Stderr holds a subset of the standard error output from the
    	// Cmd.Output method if standard error was not otherwise being
    	// collected.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 20:13:53 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  3. src/os/pipe_test.go

    			}
    			if err := cmd.Run(); err == nil {
    				if !sig && dest < 3 {
    					t.Errorf("unexpected success of write to closed pipe %d sig %t in child", dest, sig)
    				}
    			} else if ee, ok := err.(*exec.ExitError); !ok {
    				t.Errorf("unexpected exec error type %T: %v", err, err)
    			} else if ws, ok := ee.Sys().(syscall.WaitStatus); !ok {
    				t.Errorf("unexpected wait status type %T: %v", ee.Sys(), ee.Sys())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 12.4K bytes
    - Viewed (0)
  4. pkg/volume/csi/csi_block_test.go

    	_, err = csiMapper.SetUpDevice()
    	if err == nil {
    		t.Errorf("test should fail, but no error occurred")
    	} else if reflect.TypeOf(transientError) != reflect.TypeOf(err) {
    		t.Fatalf("expected exitError type: %v got: %v (%v)", reflect.TypeOf(transientError), reflect.TypeOf(err), err)
    	}
    }
    
    func TestBlockMapperMapPodDevice(t *testing.T) {
    	plug, tmpDir := newTestPlugin(t, nil)
    	defer os.RemoveAll(tmpDir)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 11 06:07:40 UTC 2023
    - 26.5K bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/testcarchive/carchive_test.go

    func expectSignal(t *testing.T, err error, sig1, sig2 syscall.Signal) bool {
    	t.Helper()
    	if err == nil {
    		t.Error("test program succeeded unexpectedly")
    	} else if ee, ok := err.(*exec.ExitError); !ok {
    		t.Errorf("error (%v) has type %T; expected exec.ExitError", err, err)
    	} else if ws, ok := ee.Sys().(syscall.WaitStatus); !ok {
    		t.Errorf("error.Sys (%v) has type %T; expected syscall.WaitStatus", ee.Sys(), ee.Sys())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:43:51 UTC 2023
    - 34.8K bytes
    - Viewed (0)
  6. pkg/volume/iscsi/iscsi_util.go

    				counter++
    			}
    		}
    	}
    
    	return counter, nil
    }
    
    func ignoreExitCodes(err error, ignoredExitCodes ...int) error {
    	exitError, ok := err.(utilexec.ExitError)
    	if !ok {
    		return err
    	}
    	for _, code := range ignoredExitCodes {
    		if exitError.ExitStatus() == code {
    			klog.V(4).Infof("ignored iscsiadm exit code %d", code)
    			return nil
    		}
    	}
    	return err
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 22 12:53:01 UTC 2022
    - 34.1K bytes
    - Viewed (0)
  7. pkg/util/iptables/iptables.go

    	fullArgs := makeFullArgs(table, chain)
    
    	runner.mu.Lock()
    	defer runner.mu.Unlock()
    
    	out, err := runner.run(opCreateChain, fullArgs)
    	if err != nil {
    		if ee, ok := err.(utilexec.ExitError); ok {
    			if ee.Exited() && ee.ExitStatus() == 1 {
    				return true, nil
    			}
    		}
    		return false, fmt.Errorf("error creating chain %q: %v: %s", chain, err, out)
    	}
    	return false, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 19 01:20:51 UTC 2023
    - 28.6K bytes
    - Viewed (0)
  8. src/os/exec/lp_windows_test.go

    						// cmd.exe disagrees. Probably the test case is wrong?
    						t.Fatalf("%v\n\tresolved to %s\n\twant %s", cmd, gotAbs, wantAbs)
    					}
    				} else if tt.wantErr == nil {
    					if ee, ok := err.(*exec.ExitError); ok && len(ee.Stderr) > 0 {
    						t.Fatalf("%v: %v\n%s", cmd, err, ee.Stderr)
    					}
    					t.Fatalf("%v: %v", cmd, err)
    				}
    			}
    
    			got, err := exec.LookPath(tt.searchFor)
    			if filepath.IsAbs(got) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 13 19:38:12 UTC 2023
    - 16.3K bytes
    - Viewed (0)
  9. src/testing/testing_test.go

    		cmd.Env = append(cmd.Environ(), "GO_WANT_HELPER_PROCESS=1")
    		out, err := cmd.CombinedOutput()
    		t.Logf("%v:\n%s", cmd, out)
    		if _, ok := err.(*exec.ExitError); !ok {
    			t.Fatal(err)
    		}
    
    		// Because the outer subtests (and TestRunningTests itself) are marked as
    		// parallel, their test functions return (and are no longer “running”)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 19:10:41 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  10. misc/ios/go_ios_exec.go

    		err = runOnDevice(appdir)
    	} else {
    		err = runOnSimulator(appdir)
    	}
    	if err != nil {
    		// If the lldb driver completed with an exit code, use that.
    		if err, ok := err.(*exec.ExitError); ok {
    			if ws, ok := err.Sys().(interface{ ExitStatus() int }); ok {
    				return ws.ExitStatus(), nil
    			}
    		}
    		return 1, err
    	}
    	return 0, nil
    }
    
    func runOnSimulator(appdir string) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 23.4K bytes
    - Viewed (0)
Back to top