@@ -553,59 +553,6 @@ func TestMkdev(t *testing.T) {
553
553
}
554
554
}
555
555
556
- // mktmpfifo creates a temporary FIFO and provides a cleanup function.
557
- func mktmpfifo (t * testing.T ) (* os.File , func ()) {
558
- err := unix .Mkfifo ("fifo" , 0666 )
559
- if err != nil {
560
- t .Fatalf ("mktmpfifo: failed to create FIFO: %v" , err )
561
- }
562
-
563
- f , err := os .OpenFile ("fifo" , os .O_RDWR , 0666 )
564
- if err != nil {
565
- os .Remove ("fifo" )
566
- t .Fatalf ("mktmpfifo: failed to open FIFO: %v" , err )
567
- }
568
-
569
- return f , func () {
570
- f .Close ()
571
- os .Remove ("fifo" )
572
- }
573
- }
574
-
575
- // utilities taken from os/os_test.go
576
-
577
- func touch (t * testing.T , name string ) {
578
- f , err := os .Create (name )
579
- if err != nil {
580
- t .Fatal (err )
581
- }
582
- if err := f .Close (); err != nil {
583
- t .Fatal (err )
584
- }
585
- }
586
-
587
- // chtmpdir changes the working directory to a new temporary directory and
588
- // provides a cleanup function. Used when PWD is read-only.
589
- func chtmpdir (t * testing.T ) func () {
590
- oldwd , err := os .Getwd ()
591
- if err != nil {
592
- t .Fatalf ("chtmpdir: %v" , err )
593
- }
594
- d , err := ioutil .TempDir ("" , "test" )
595
- if err != nil {
596
- t .Fatalf ("chtmpdir: %v" , err )
597
- }
598
- if err := os .Chdir (d ); err != nil {
599
- t .Fatalf ("chtmpdir: %v" , err )
600
- }
601
- return func () {
602
- if err := os .Chdir (oldwd ); err != nil {
603
- t .Fatalf ("chtmpdir: %v" , err )
604
- }
605
- os .RemoveAll (d )
606
- }
607
- }
608
-
609
556
func TestMountUnmount (t * testing.T ) {
610
557
// use an available fs
611
558
var buffer struct {
0 commit comments