testsuites: Use the shared test_cat() declaration

The test declared test_cat() with an int offset and an int length.
The function takes an off_t offset and a size_t length.  On a target
with a 64-bit off_t the caller passes fewer bytes than the callee
reads.

Include test_support.h.  Delete the local declaration.

Close #5739.

Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This commit is contained in:
Sebastian Huber
2026-09-03 06:56:24 +02:00
parent d0ea465fc8
commit 43af0833d1
+1 -2
View File
@@ -69,6 +69,7 @@
#include <fcntl.h>
#include <unistd.h>
#include "test_support.h"
#include "tar01-tar.h"
#include "tar01-tar-gz.h"
#if HAVE_XZ
@@ -94,8 +95,6 @@ void test_untar_unzip_txz( void );
#define TARFILE_XZ_SIZE tar01_tar_xz_size
#endif
void test_cat( char *file, int offset_arg, int length );
static void test_untar_check_mode( const char *file, int mode )
{
struct stat sb;