git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: add ovstest to .gitignore
[sliver-openvswitch.git]
/
tests
/
test-lockfile.c
diff --git
a/tests/test-lockfile.c
b/tests/test-lockfile.c
index
b37fd22
..
80cc5a8
100644
(file)
--- a/
tests/test-lockfile.c
+++ b/
tests/test-lockfile.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2009, 2010, 2011, 2012 Nicira, Inc.
+ * Copyright (c) 2009, 2010, 2011, 2012
, 2014
Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-28,6
+28,7
@@
#include "timeval.h"
#include "util.h"
#include "vlog.h"
#include "timeval.h"
#include "util.h"
#include "vlog.h"
+#include "ovstest.h"
struct test {
const char *name;
struct test {
const char *name;
@@
-96,7
+97,6
@@
do_fork(void)
{
switch (fork()) {
case 0:
{
switch (fork()) {
case 0:
- time_postfork();
lockfile_postfork();
return CHILD;
lockfile_postfork();
return CHILD;
@@
-267,19
+267,18
@@
static const struct test tests[] = {
#undef TEST
};
#undef TEST
};
-int
-main(int argc, char *argv[])
+static void
+
test_lockfile_
main(int argc, char *argv[])
{
{
- extern struct vlog_module VLM_lockfile;
size_t i;
set_program_name(argv[0]);
size_t i;
set_program_name(argv[0]);
- vlog_set_levels(&VLM_lockfile, VLF_ANY_FACILITY, VLL_ERR);
+ vlog_set_pattern(VLF_CONSOLE, "%c|%p|%m");
+ vlog_set_levels(NULL, VLF_SYSLOG, VLL_OFF);
if (argc != 2) {
ovs_fatal(0, "exactly one argument required; use \"%s help\" for help",
program_name);
if (argc != 2) {
ovs_fatal(0, "exactly one argument required; use \"%s help\" for help",
program_name);
- return 1;
}
for (i = 0; tests[i].name; i++) {
}
for (i = 0; tests[i].name; i++) {
@@
-311,3
+310,4
@@
main(int argc, char *argv[])
argv[1], program_name);
}
argv[1], program_name);
}
+OVSTEST_REGISTER("test-lockfile", test_lockfile_main);