From 4551f5f0dbb4971633c8aeae3d29a7437da5316d Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 26 Nov 2019 08:07:55 +0100 Subject: untar: Properly make parent path Close #3823. --- testsuites/libtests/Makefile.am | 8 +++--- testsuites/libtests/tar01/home/abc/def/test_script | 2 ++ testsuites/libtests/tar01/home/test_script | 2 -- testsuites/libtests/tar01/init.c | 30 +++++++++++----------- 4 files changed, 21 insertions(+), 21 deletions(-) create mode 100755 testsuites/libtests/tar01/home/abc/def/test_script delete mode 100755 testsuites/libtests/tar01/home/test_script (limited to 'testsuites/libtests') diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am index 9af8098062..a22e153c30 100644 --- a/testsuites/libtests/Makefile.am +++ b/testsuites/libtests/Makefile.am @@ -1288,9 +1288,9 @@ endif tar01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_tar01) \ $(support_includes) $(test_includes) -I$(top_srcdir)/include tar01_LDADD = $(RTEMS_ROOT)cpukit/librtemscpu.a $(RTEMS_ROOT)cpukit/libz.a $(LDADD) -tar01.tar: Makefile +tar01.tar: $(srcdir)/tar01/home/test_file $(srcdir)/tar01/home/abc/def/test_script $(srcdir)/tar01/symlink @rm -f $@ - $(AM_V_GEN)$(PAX) -w -f $@ -s ,$(srcdir)/tar01/,, $(srcdir)/tar01/home $(srcdir)/tar01/symlink + $(AM_V_GEN)$(PAX) -w -f $@ -s ,$(srcdir)/tar01/,, $+ tar01-tar.c: tar01.tar $(AM_V_GEN)$(BIN2C) -C $< $@ tar01-tar.h: tar01.tar @@ -1327,9 +1327,9 @@ tar02_SOURCES = tar02/init.c ../psxtests/psxfile01/test_cat.c \ tar02-tar.c tar02-tar.h tar02_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_tar02) \ $(support_includes) $(test_includes) -I$(top_srcdir)/include -tar02.tar: Makefile +tar02.tar: $(srcdir)/tar01/home/test_file $(srcdir)/tar01/home/abc/def/test_script $(srcdir)/tar01/symlink @rm -f $@ - $(AM_V_GEN)$(PAX) -w -f $@ -s ,$(srcdir)/tar01/,, $(srcdir)/tar01/home $(srcdir)/tar01/symlink + $(AM_V_GEN)$(PAX) -w -f $@ -s ,$(srcdir)/tar01/,, $+ tar02-tar.c: tar02.tar $(AM_V_GEN)$(BIN2C) -C $< $@ tar02-tar.h: tar02.tar diff --git a/testsuites/libtests/tar01/home/abc/def/test_script b/testsuites/libtests/tar01/home/abc/def/test_script new file mode 100755 index 0000000000..884924820b --- /dev/null +++ b/testsuites/libtests/tar01/home/abc/def/test_script @@ -0,0 +1,2 @@ +#! joel +ls -las /dev diff --git a/testsuites/libtests/tar01/home/test_script b/testsuites/libtests/tar01/home/test_script deleted file mode 100755 index 884924820b..0000000000 --- a/testsuites/libtests/tar01/home/test_script +++ /dev/null @@ -1,2 +0,0 @@ -#! joel -ls -las /dev diff --git a/testsuites/libtests/tar01/init.c b/testsuites/libtests/tar01/init.c index 8891911288..371ea71920 100644 --- a/testsuites/libtests/tar01/init.c +++ b/testsuites/libtests/tar01/init.c @@ -85,9 +85,9 @@ void test_untar_from_memory(void) test_cat( "/home/test_file", 0, 0 ); /******************/ - printf( "========= /home/test_script =========\n" ); - test_cat( "/home/test_script", 0, 0 ); - test_untar_check_mode("/home/test_script", 0755); + printf( "========= /home/abc/def/test_script =========\n" ); + test_cat( "/home/abc/def/test_script", 0, 0 ); + test_untar_check_mode("/home/abc/def/test_script", 0755); /******************/ printf( "========= /symlink =========\n" ); @@ -133,9 +133,9 @@ void test_untar_from_file(void) test_cat( "/dest/home/test_file", 0, 0 ); /******************/ - printf( "========= /dest/home/test_script =========\n" ); - test_cat( "/dest/home/test_script", 0, 0 ); - test_untar_check_mode("/dest/home/test_script", 0755); + printf( "========= /dest/home/abc/def/test_script =========\n" ); + test_cat( "/dest/home/abc/def/test_script", 0, 0 ); + test_untar_check_mode("/dest/home/abc/def/test_script", 0755); /******************/ printf( "========= /dest/symlink =========\n" ); @@ -179,9 +179,9 @@ void test_untar_chunks_from_memory(void) test_cat( "/dest2/home/test_file", 0, 0 ); /******************/ - printf( "========= /dest2/home/test_script =========\n" ); - test_cat( "/dest2/home/test_script", 0, 0 ); - test_untar_check_mode("/dest2/home/test_script", 0755); + printf( "========= /dest2/home/abc/def/test_script =========\n" ); + test_cat( "/dest2/home/abc/def/test_script", 0, 0 ); + test_untar_check_mode("/dest2/home/abc/def/test_script", 0755); /******************/ printf( "========= /dest2/symlink =========\n" ); @@ -225,9 +225,9 @@ void test_untar_unzip_tgz(void) test_cat( "/dest3/home/test_file", 0, 0 ); /******************/ - printf( "========= /dest3/home/test_script =========\n" ); - test_cat( "/dest3/home/test_script", 0, 0 ); - test_untar_check_mode("/dest3/home/test_script", 0755); + printf( "========= /dest3/home/abc/def/test_script =========\n" ); + test_cat( "/dest3/home/abc/def/test_script", 0, 0 ); + test_untar_check_mode("/dest3/home/abc/def/test_script", 0755); /******************/ printf( "========= /dest3/symlink =========\n" ); @@ -275,9 +275,9 @@ void test_untar_unzip_txz(void) test_cat( "/dest4/home/test_file", 0, 0 ); /******************/ - printf( "========= /dest4/home/test_script =========\n" ); - test_cat( "/dest4/home/test_script", 0, 0 ); - test_untar_check_mode("/dest4/home/test_script", 0755); + printf( "========= /dest4/home/abc/def/test_script =========\n" ); + test_cat( "/dest4/home/abc/def/test_script", 0, 0 ); + test_untar_check_mode("/dest4/home/abc/def/test_script", 0755); /******************/ printf( "========= /dest4/symlink =========\n" ); -- cgit v1.2.3