/*
Copyright (C) 2016 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <errno.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <talloc.h>
#include <popt.h>
#include "limits.h"
struct inotify_test_ctx {
char *filename;
char *dirname;
int ncb;
int threshold;
/* if the cb receives flags not in this set, test fails */
};
struct tevent_timer *te,
struct timeval t,
void *ptr)
{
fail();
}
{
return NULL;
}
return NULL;
}
return NULL;
}
return ctx;
}
{
int fd;
return 1;
}
return 1;
}
if (fd == -1) {
return 1;
}
return 0;
}
{
return 1;
}
return 1;
}
return 1;
}
return 1;
}
return 0;
}
{
struct inotify_test_ctx);
int ret;
return 1;
}
return 0;
}
{
struct inotify_test_ctx);
int ret;
return 1;
}
return 1;
}
return 0;
}
struct tevent_timer *te,
struct timeval t,
void *ptr)
{
struct inotify_test_ctx);
FILE *f;
if (f == NULL) {
return;
}
fflush(f);
fclose(f);
}
{
fail();
}
}
void *pvt)
{
struct inotify_test_ctx);
return EOK;
}
void *pvt)
{
struct inotify_test_ctx);
return EOK;
}
return EOK;
}
/* Test that running two modifications fires the callback twice */
{
struct inotify_test_ctx);
return;
}
return;
}
}
struct tevent_timer *te,
struct timeval t,
void *ptr)
{
struct inotify_test_ctx);
FILE *f;
int fd;
int ret;
if (fd == -1) {
return;
}
if (f == NULL) {
return;
}
fflush(f);
fclose(f);
if (ret == -1) {
return;
}
}
{
struct inotify_test_ctx);
return;
}
}
struct tevent_timer *te,
struct timeval t,
void *ptr)
{
struct inotify_test_ctx);
FILE *f;
int ret;
if (ret == -1) {
return;
}
if (f == NULL) {
return;
}
fflush(f);
fclose(f);
}
{
struct inotify_test_ctx);
return;
}
}
{
struct inotify_test_ctx);
return;
}
}
struct tevent_timer *te,
struct timeval t,
void *ptr)
{
struct inotify_test_ctx);
int ret;
if (ret == -1) {
return;
}
}
struct tevent_timer *te,
struct timeval t,
void *ptr)
{
struct inotify_test_ctx);
/* tests that no more callbacks were issued and exactly one
* was caught for both requests
*/
return;
}
fail();
}
{
struct inotify_test_ctx);
return;
}
return;
}
return;
}
}
{
int opt;
};
};
/* Set debug level to invalid value so we can decide if -d 0 was used. */
switch(opt) {
default:
return 1;
}
}
}