A lightweight mechanism to provide an *instant kickstart* to a Go web server instance upon changing any Go source files under the project directory (and its subdirectories).

syscall_solaris_test.go 692B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2017 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // +build solaris
  5. package unix_test
  6. import (
  7. "os/exec"
  8. "testing"
  9. "golang.org/x/sys/unix"
  10. )
  11. func TestStatvfs(t *testing.T) {
  12. if err := unix.Statvfs("", nil); err == nil {
  13. t.Fatal(`Statvfs("") expected failure`)
  14. }
  15. statvfs := unix.Statvfs_t{}
  16. if err := unix.Statvfs("/", &statvfs); err != nil {
  17. t.Errorf(`Statvfs("/") failed: %v`, err)
  18. }
  19. if t.Failed() {
  20. mount, err := exec.Command("mount").CombinedOutput()
  21. if err != nil {
  22. t.Logf("mount: %v\n%s", err, mount)
  23. } else {
  24. t.Logf("mount: %s", mount)
  25. }
  26. }
  27. }