summaryrefslogtreecommitdiffstats
path: root/src/tests/files-tests.c
diff options
context:
space:
mode:
authorNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>2014-02-12 10:12:04 -0500
committerJakub Hrozek <jhrozek@redhat.com>2014-05-02 10:58:19 +0200
commitb0d759c9a604add0573c04b1a4e88e1605e1fdc0 (patch)
tree15c83ce34cd254a30cc42c212123b7f194c21677 /src/tests/files-tests.c
parentb9afd88065ecdb9c2cafb2ee767bd61585b31b8f (diff)
downloadsssd-b0d759c9a604add0573c04b1a4e88e1605e1fdc0.tar.gz
sssd-b0d759c9a604add0573c04b1a4e88e1605e1fdc0.tar.xz
sssd-b0d759c9a604add0573c04b1a4e88e1605e1fdc0.zip
Make DEBUG macro invocations variadic
Use a script to update DEBUG macro invocations to use it as a variadic macro, supplying format string and its arguments directly, instead of wrapping them in parens. This script was used to update the code (identical to commit a3c8390d19593b1e5277d95bfb4ab206d4785150): grep -rwl --include '*.[hc]' DEBUG . | while read f; do mv "$f"{,.orig} perl -e \ 'use strict; use File::Slurp; my $text=read_file(\*STDIN); $text=~s#(\bDEBUG\s*\([^(]+)\((.*?)\)\s*\)\s*;#$1$2);#gs; print $text;' < "$f.orig" > "$f" rm "$f.orig" done Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src/tests/files-tests.c')
-rw-r--r--src/tests/files-tests.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tests/files-tests.c b/src/tests/files-tests.c
index 5851a721f..8e1ac0c9d 100644
--- a/src/tests/files-tests.c
+++ b/src/tests/files-tests.c
@@ -64,14 +64,14 @@ static void teardown_files_test(void)
cmd = talloc_asprintf(test_ctx, "/bin/rm -rf %s\n", dir_path);
ret = system(cmd);
if (ret == -1) {
- DEBUG(1, ("Removing [%s] failed.\n", dir_path));
+ DEBUG(1, "Removing [%s] failed.\n", dir_path);
}
}
if (dst_path && test_ctx) {
cmd = talloc_asprintf(test_ctx, "/bin/rm -rf %s\n", dst_path);
ret = system(cmd);
if (ret == -1) {
- DEBUG(1, ("Removing [%s] failed.\n", dst_path));
+ DEBUG(1, "Removing [%s] failed.\n", dst_path);
}
}
@@ -109,7 +109,7 @@ START_TEST(test_remove_tree)
fail_unless(getcwd(origpath, PATH_MAX) == origpath, "Cannot getcwd\n");
fail_unless(errno == 0, "Cannot getcwd\n");
- DEBUG(5, ("About to delete %s\n", dir_path));
+ DEBUG(5, "About to delete %s\n", dir_path);
/* create a file */
ret = chdir(dir_path);
@@ -182,7 +182,7 @@ START_TEST(test_simple_copy)
fail_if(ret == -1, "Cannot chdir\n");
/* and finally copy.. */
- DEBUG(5, ("Will copy from '%s' to '%s'\n", dir_path, dst_path));
+ DEBUG(5, "Will copy from '%s' to '%s'\n", dir_path, dst_path);
ret = copy_tree(dir_path, dst_path, 0700, uid, gid);
fail_unless(ret == EOK, "copy_tree failed\n");
@@ -224,7 +224,7 @@ START_TEST(test_copy_symlink)
fail_if(ret == -1, "Cannot chdir\n");
/* and finally copy.. */
- DEBUG(5, ("Will copy from '%s' to '%s'\n", dir_path, dst_path));
+ DEBUG(5, "Will copy from '%s' to '%s'\n", dir_path, dst_path);
ret = copy_tree(dir_path, dst_path, 0700, uid, gid);
fail_unless(ret == EOK, "copy_tree failed\n");
@@ -262,7 +262,7 @@ START_TEST(test_copy_node)
fail_if(ret == -1, "Cannot chdir\n");
/* and finally copy.. */
- DEBUG(5, ("Will copy from '%s' to '%s'\n", dir_path, dst_path));
+ DEBUG(5, "Will copy from '%s' to '%s'\n", dir_path, dst_path);
ret = copy_tree(dir_path, dst_path, 0700, uid, gid);
fail_unless(ret == EOK, "copy_tree failed\n");