2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #include <afsconfig.h>
11 #include <afs/param.h>
18 #include <sys/types.h>
33 register char *pn; /* path name we're dealing with */
37 ("usage: owntest <file owned by somoneelse, but still writable>\n");
42 printf("Starting tests on %s.\n", pn);
43 code = chmod(pn, 0444);
45 perror("chmod to RO");
48 code = chmod(pn, 0666);
50 perror("chmod back to RW");
53 gettimeofday(&tv[0], NULL);
54 gettimeofday(&tv[1], NULL);
55 tv[0].tv_sec -= 10000;
57 tv[1].tv_sec -= 20000;
59 code = utimes(pn, tv);
64 code = stat(pn, &tstat);
69 if (tstat.st_mtime != tv[1].tv_sec) {
70 printf("modtime didn't stick\n");