Home | History | Annotate | Download | only in test

Lines Matching defs:files

17 } files[] = {
27 * Create a bunch of test files and record their atimes.
28 * For the atime preserve/change tests, the files must have
31 * for a second after creating the files. (Creating all of the files
39 static const int numfiles = sizeof(files) / sizeof(files[0]);
49 assertMakeFile(files[i].name, 0644, "a");
62 assertEqualInt(0, utime(files[i].name, &times));
67 assertEqualInt(0, stat(files[i].name, &st));
68 files[i].atime_sec = st.st_atime;
72 sleepUntilAfter(files[numfiles - 1].atime_sec);
81 /* Create all of the test files. */
89 if (st.st_atime == files[0].atime_sec) {
101 r = systemf("echo %s | %s -pd copy-no-a > copy-no-a.out 2>copy-no-a.err", files[1].name, testprog);
105 assertEqualInt(0, stat(files[1].name, &st));
107 assert(st.st_atime != files[1].atime_sec);
110 r = systemf("echo %s | %s -o > archive-no-a.out 2>archive-no-a.err", files[2].name, testprog);
113 assertEqualInt(0, stat(files[2].name, &st));
115 assert(st.st_atime != files[2].atime_sec);
125 files[3].name, testprog);
129 assertEqualInt(0, stat(files[3].name, &st));
131 assertEqualInt(st.st_atime, files[3].atime_sec);
135 files[4].name, testprog);
138 assertEqualInt(0, stat(files[4].name, &st));
140 assertEqualInt(st.st_atime, files[4].atime_sec);