// Test that UDS can be created using overlay when parent directory is in lower
// layer only (b/134090485).
//
// Prerequisite: the directory where the socket file is created must not have
// been open for write before bind(2) is called.
Test that UDS can be created using overlay when parent directory is in lower
layer only (b/134090485).

the directory where the socket file is created must not have
been open for write before bind(2) is called.
// Test that UDS can be created using overlay when parent directory is in lower // layer only ( b / 134090485 ) . // // Prerequisite : the directory where the socket file is created must not have // been open for write before bind ( 2 ) is called .
func TestBindOverlay(t *testing.T) {
	if err := testutil.Pull("ubuntu:trusty"); err != nil {
		t.Fatal("docker pull failed:", err)
	}
	d := testutil.MakeDocker("bind-overlay-test")
	cmd := "nc -l -U /var/run/sock& sleep 1 && echo foobar-asdf | nc -U /var/run/sock"
	got, err := d.RunFg("ubuntu:trusty", "bash", "-c", cmd)
	if err != nil {
		t.Fatal("docker run failed:", err)
	}
	if want := "foobar-asdf"; !strings.Contains(got, want) {
		t.Fatalf("docker run output is missing %q: %s", want, got)
	}
	defer d.CleanUp()
}
func TestBindOverlay ( t * testing . T ) { if err := testutil . Pull ( " " ) ; err != nil { t . Fatal ( " " , err ) } d := testutil . MakeDocker ( " " ) cmd := " " got , err := d . RunFg ( " " , " " , " " , cmd ) if err != nil { t . Fatal ( " " , err ) } if want := " " ; ! strings . Contains ( got , want ) { t . Fatalf ( " " , want , got ) } defer d . CleanUp ( ) }
Test that UDS can be created using overlay when parent directory is in lower
layer only (b/134090485).
Test that UDS can be created using overlay when parent directory is in lower layer only ( b / 134090485 ) .