1 /* Test for bug in fflush synchronization behavior. */
10 static void prepare (void);
11 #define PREPARE(argc, argv) prepare ()
14 #define TEST_FUNCTION do_test ()
15 static int do_test (void);
16 #include "../test-skeleton.c"
22 int fd
= create_temp_file ("bug-mmap-fflush.", &fname
);
25 /* We don't need the descriptor. */
37 snprintf (buffer
, sizeof (buffer
), "echo 'From foo@bar.com' > %s", fname
);
39 f
= fopen (fname
, "r");
40 fseek (f
, 0, SEEK_END
);
42 fseek (f
, 0, SEEK_SET
);
44 snprintf (buffer
, sizeof (buffer
), "echo 'From bar@baz.edu' >> %s", fname
);
46 fseek (f
, o
, SEEK_SET
);
47 if (fgets (buffer
, 1024, f
) == NULL
)
49 if (strncmp (buffer
, "From ", 5) != 0)