/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 2013 by Delphix. All rights reserved.
*/
#include <utime.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <strings.h>
#include <errno.h>
#include <fcntl.h>
#include <libgen.h>
#define ST_ATIME 0
typedef struct timetest {
int type;
char *name;
} timetest_t;
extern int errno;
/*
* DESCRIPTION:
* Verify time will be changed correctly after each operation.
*
* STRATEGY:
* 1. Define time test array.
* 2. Loop through each item in this array.
* 3. Verify the time is changed after each operation.
*
*/
static int
{
return (-1);
}
return (-1);
}
switch (what) {
case ST_ATIME:
return (0);
case ST_CTIME:
return (0);
case ST_MTIME:
return (0);
default:
return (-1);
}
}
static int
{
return (-1);
}
return (-1);
}
return (1);
}
return (ret);
}
static int
{
return (-1);
}
return (-1);
}
return (1);
}
return (ret);
}
static int
{
int ret = 0;
char *dname;
return (-1);
}
/*
* Figure out source file directory name, and create
* the link file in the same directory.
*/
return (1);
}
return (ret);
}
static int
{
return (-1);
}
return (1);
}
return (ret);
}
static int
{
int ret = 0;
return (-1);
}
/*
* Times of the file are set to the current time
*/
return (1);
}
return (ret);
}
static int
{
int ret = 0;
return (-1);
}
return (1);
}
return (ret);
}
static int
{
int ret = 0;
return (-1);
}
return (1);
}
return (ret);
}
static void
cleanup(void)
{
}
}
};
/* ARGSUSED */
int
{
/*
* Get the environment variable values.
*/
for (i = 0; i < sizeof (penv) / sizeof (char *); i++) {
return (1);
}
}
/*
* If the test file is exists, remove it first.
*/
}
ret = 0;
return (1);
}
for (i = 0; i < NCOMMAND; i++) {
/*
* Get original time before operating.
*/
if (ret != 0) {
return (1);
}
/*
* Sleep 2 seconds, then invoke command on given file
*/
(void) sleep(2);
/*
* Get time after operating.
*/
if (ret != 0) {
return (1);
}
return (1);
} else {
}
}
return (0);
}