Lines Matching defs:files
36 } files[] = {
46 * Create a bunch of test files and record their atimes.
47 * For the atime preserve/change tests, the files must have
50 * for a second after creating the files. (Creating all of the files
58 static const int numfiles = sizeof(files) / sizeof(files[0]);
68 assertMakeFile(files[i].name, 0644, "a");
81 assertEqualInt(0, utime(files[i].name, ×));
86 assertEqualInt(0, stat(files[i].name, &st));
87 files[i].atime_sec = st.st_atime;
91 sleepUntilAfter(files[numfiles - 1].atime_sec);
100 /* Create all of the test files. */
108 if (st.st_atime == files[0].atime_sec) {
120 r = systemf("echo %s | %s -pd copy-no-a > copy-no-a.out 2>copy-no-a.err", files[1].name, testprog);
124 assertEqualInt(0, stat(files[1].name, &st));
126 assert(st.st_atime != files[1].atime_sec);
129 r = systemf("echo %s | %s -o > archive-no-a.out 2>archive-no-a.err", files[2].name, testprog);
132 assertEqualInt(0, stat(files[2].name, &st));
134 assert(st.st_atime != files[2].atime_sec);
144 files[3].name, testprog);
148 assertEqualInt(0, stat(files[3].name, &st));
150 assertEqualInt(st.st_atime, files[3].atime_sec);
154 files[4].name, testprog);
157 assertEqualInt(0, stat(files[4].name, &st));
159 assertEqualInt(st.st_atime, files[4].atime_sec);