Lines Matching defs:files
35 } files[] = {
45 * Create a bunch of test files and record their atimes.
46 * For the atime preserve/change tests, the files must have
49 * for a second after creating the files. (Creating all of the files
57 static const int numfiles = sizeof(files) / sizeof(files[0]);
67 assertMakeFile(files[i].name, 0644, "a");
80 assertEqualInt(0, utime(files[i].name, ×));
85 assertEqualInt(0, stat(files[i].name, &st));
86 files[i].atime_sec = st.st_atime;
90 sleepUntilAfter(files[numfiles - 1].atime_sec);
99 /* Create all of the test files. */
107 if (st.st_atime == files[0].atime_sec) {
119 r = systemf("echo %s | %s -pd copy-no-a > copy-no-a.out 2>copy-no-a.err", files[1].name, testprog);
123 assertEqualInt(0, stat(files[1].name, &st));
125 assert(st.st_atime != files[1].atime_sec);
128 r = systemf("echo %s | %s -o > archive-no-a.out 2>archive-no-a.err", files[2].name, testprog);
131 assertEqualInt(0, stat(files[2].name, &st));
133 assert(st.st_atime != files[2].atime_sec);
143 files[3].name, testprog);
147 assertEqualInt(0, stat(files[3].name, &st));
149 assertEqualInt(st.st_atime, files[3].atime_sec);
153 files[4].name, testprog);
156 assertEqualInt(0, stat(files[4].name, &st));
158 assertEqualInt(st.st_atime, files[4].atime_sec);