diff options
author | Colin Walters <walters@verbum.org> | 2023-03-16 18:31:03 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2023-03-16 18:31:03 -0400 |
commit | 813c439352297622e74a288aadf3cd700d19bc2f (patch) | |
tree | 93c878af891a6964bdcbcb19c4b4b5edb6359fe2 | |
parent | 12fac1ed99821f773893e1caded6e0f0ec96a053 (diff) | |
download | ostree-813c439352297622e74a288aadf3cd700d19bc2f.tar.gz |
tests: Set size on fileinfo
Closes: https://github.com/ostreedev/ostree/issues/2827
-rw-r--r-- | tests/test-basic-c.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test-basic-c.c b/tests/test-basic-c.c index 99e1c547..7a6b8ee7 100644 --- a/tests/test-basic-c.c +++ b/tests/test-basic-c.c @@ -176,10 +176,12 @@ static gboolean hi_content_stream_new (GInputStream **out_stream, GError **error) { static const char hi[] = "hi"; - g_autoptr(GMemoryInputStream) hi_memstream = (GMemoryInputStream*)g_memory_input_stream_new_from_data (hi, sizeof(hi)-1, NULL); + const size_t len = sizeof(hi)-1; + g_autoptr(GMemoryInputStream) hi_memstream = (GMemoryInputStream*)g_memory_input_stream_new_from_data (hi, len, NULL); g_autoptr(GFileInfo) finfo = g_file_info_new (); g_file_info_set_attribute_uint32 (finfo, "standard::type", G_FILE_TYPE_REGULAR); g_file_info_set_attribute_boolean (finfo, "standard::is-symlink", FALSE); + g_file_info_set_size (finfo, len); g_file_info_set_attribute_uint32 (finfo, "unix::uid", 0); g_file_info_set_attribute_uint32 (finfo, "unix::gid", 0); g_file_info_set_attribute_uint32 (finfo, "unix::mode", S_IFREG|0644); |