diff --git a/libutils/file_lib.c b/libutils/file_lib.c index 271ae627..dd25bf40 100644 --- a/libutils/file_lib.c +++ b/libutils/file_lib.c @@ -1569,6 +1569,19 @@ SMART_SYSCALLS_UNUSED static bool FileSparseCopyShoveling(int sd, const char *sr assert(total_bytes_written != NULL); assert(last_write_was_a_hole != NULL); + Log(LOG_LEVEL_INFO, "ENT-13508: Debugging HP-UX is always a joy :)"); + + struct stat sb; + if (fstat(sd, &sb) == -1) { + Log(LOG_LEVEL_ERR, "ENT-13508: fstat on source %s: %s", dst_name, GetErrorStr()); + } + Log(LOG_LEVEL_INFO, "ENT-13508: fstat on source %s = %jd Bytes", dst_name, (intmax_t)sb.st_size); + + if (fstat(dd, &sb) == -1) { + Log(LOG_LEVEL_ERR, "ENT-13508: fstat on dest %s: %s", dst_name, GetErrorStr()); + } + Log(LOG_LEVEL_INFO, "ENT-13508: fstat on dest %s = %jd Bytes", dst_name, (intmax_t)sb.st_size); + const size_t buf_size = blk_size; void *buf = xmalloc(buf_size); @@ -1606,6 +1619,7 @@ SMART_SYSCALLS_UNUSED static bool FileSparseCopyShoveling(int sd, const char *sr } free(buf); + Log(LOG_LEVEL_INFO, "ENT-13508: Total read from %s is %zu Bytes", src_name, n_read_total); *total_bytes_written = n_read_total; return retval; } diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index 3ba73816..b739e9b9 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -46,42 +46,6 @@ libtest_la_SOURCES = cmockery.c cmockery.h schema.h test.c test.h libtest_la_LIBADD = ../../libutils/libutils.la ../../libcompat/libcompat.la $(PCRE_LIBS) $(OPENSSL_LIBS) $(SYSTEMD_LOGGING_LIBS) $(LIBYAML_LIBS) check_PROGRAMS = \ - cleanup_test \ - condition_macros_test \ - csv_writer_test \ - set_test \ - csv_parser_test \ - env_file_test \ - alloc_test \ - string_writer_test \ - file_writer_test \ - fsattrs_test \ - xml_writer_test \ - sequence_test \ - json_test \ - misc_lib_test \ - string_lib_test \ - thread_test \ - file_lib_test \ - file_lock_test \ - map_test \ - path_test \ - logging_timestamp_test \ - refcount_test \ - list_test \ - buffer_test \ - ipaddress_test \ - rb-tree-test \ - queue_test \ - stack_test \ - threaded_queue_test \ - threaded_deque_test \ - threaded_stack_test \ - version_comparison_test \ - ring_buffer_test \ - libcompat_test \ - definitions_test \ - glob_lib_test \ string_sequence_test if WITH_PCRE2