Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
nexedi
libloc
Commits
37317e4f
Commit
37317e4f
authored
4 years ago
by
Michael Tremer
Browse files
Options
Download
Email Patches
Plain Diff
Enable debug logging for all tests
Signed-off-by:
Michael Tremer
<
michael.tremer@ipfire.org
>
parent
3b4f1368
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
0 deletions
+28
-0
src/test-as.c
src/test-as.c
+4
-0
src/test-country.c
src/test-country.c
+4
-0
src/test-database.c
src/test-database.c
+4
-0
src/test-libloc.c
src/test-libloc.c
+4
-0
src/test-network.c
src/test-network.c
+4
-0
src/test-signature.c
src/test-signature.c
+4
-0
src/test-stringpool.c
src/test-stringpool.c
+4
-0
No files found.
src/test-as.c
View file @
37317e4f
...
...
@@ -17,6 +17,7 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <loc/libloc.h>
#include <loc/database.h>
...
...
@@ -32,6 +33,9 @@ int main(int argc, char** argv) {
if
(
err
<
0
)
exit
(
EXIT_FAILURE
);
// Enable debug logging
loc_set_log_priority
(
ctx
,
LOG_DEBUG
);
// Create a database
struct
loc_writer
*
writer
;
err
=
loc_writer_new
(
ctx
,
&
writer
,
NULL
,
NULL
);
...
...
This diff is collapsed.
Click to expand it.
src/test-country.c
View file @
37317e4f
...
...
@@ -19,6 +19,7 @@
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <loc/libloc.h>
#include <loc/country.h>
...
...
@@ -47,6 +48,9 @@ int main(int argc, char** argv) {
if
(
err
<
0
)
exit
(
EXIT_FAILURE
);
// Enable debug logging
loc_set_log_priority
(
ctx
,
LOG_DEBUG
);
// Create a database
struct
loc_writer
*
writer
;
err
=
loc_writer_new
(
ctx
,
&
writer
,
NULL
,
NULL
);
...
...
This diff is collapsed.
Click to expand it.
src/test-database.c
View file @
37317e4f
...
...
@@ -22,6 +22,7 @@
#include <ctype.h>
#include <errno.h>
#include <unistd.h>
#include <syslog.h>
#include <loc/libloc.h>
#include <loc/database.h>
...
...
@@ -66,6 +67,9 @@ int main(int argc, char** argv) {
if
(
err
<
0
)
exit
(
EXIT_FAILURE
);
// Enable debug logging
loc_set_log_priority
(
ctx
,
LOG_DEBUG
);
// Try opening an empty file
err
=
attempt_to_open
(
ctx
,
"/dev/null"
);
if
(
err
==
0
)
...
...
This diff is collapsed.
Click to expand it.
src/test-libloc.c
View file @
37317e4f
...
...
@@ -22,6 +22,7 @@
#include <ctype.h>
#include <errno.h>
#include <unistd.h>
#include <syslog.h>
#include <loc/libloc.h>
...
...
@@ -32,6 +33,9 @@ int main(int argc, char** argv) {
if
(
err
<
0
)
exit
(
EXIT_FAILURE
);
// Enable debug logging
loc_set_log_priority
(
ctx
,
LOG_DEBUG
);
printf
(
"version %s
\n
"
,
VERSION
);
loc_unref
(
ctx
);
...
...
This diff is collapsed.
Click to expand it.
src/test-network.c
View file @
37317e4f
...
...
@@ -19,6 +19,7 @@
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <loc/libloc.h>
#include <loc/database.h>
...
...
@@ -33,6 +34,9 @@ int main(int argc, char** argv) {
if
(
err
<
0
)
exit
(
EXIT_FAILURE
);
// Enable debug logging
loc_set_log_priority
(
ctx
,
LOG_DEBUG
);
struct
loc_network_tree
*
tree
;
err
=
loc_network_tree_new
(
ctx
,
&
tree
);
if
(
err
)
{
...
...
This diff is collapsed.
Click to expand it.
src/test-signature.c
View file @
37317e4f
...
...
@@ -22,6 +22,7 @@
#include <ctype.h>
#include <errno.h>
#include <unistd.h>
#include <syslog.h>
#include <loc/libloc.h>
#include <loc/database.h>
...
...
@@ -55,6 +56,9 @@ int main(int argc, char** argv) {
if
(
err
<
0
)
exit
(
EXIT_FAILURE
);
// Enable debug logging
loc_set_log_priority
(
ctx
,
LOG_DEBUG
);
// Create an empty database
struct
loc_writer
*
writer
;
err
=
loc_writer_new
(
ctx
,
&
writer
,
private_key1
,
private_key2
);
...
...
This diff is collapsed.
Click to expand it.
src/test-stringpool.c
View file @
37317e4f
...
...
@@ -24,6 +24,7 @@
#include <errno.h>
#include <unistd.h>
#include <time.h>
#include <syslog.h>
#include <loc/libloc.h>
#include <loc/stringpool.h>
...
...
@@ -54,6 +55,9 @@ int main(int argc, char** argv) {
if
(
err
<
0
)
exit
(
EXIT_FAILURE
);
// Enable debug logging
loc_set_log_priority
(
ctx
,
LOG_DEBUG
);
// Create the stringpool
struct
loc_stringpool
*
pool
;
err
=
loc_stringpool_new
(
ctx
,
&
pool
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment