File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ static int header_to_raw(mtar_raw_header_t *rh, const mtar_header_t *h) {
141141 memset (rh , 0 , sizeof (* rh ));
142142
143143 /* Store size in ASCII octal digits or base-256 formats */
144- if (sizeof (mtar_size_t ) <= 4 || filesize <= (mtar_size_t )0777777777777LL ) {
144+ if (sizeof (mtar_size_t ) <= 4 || filesize <= (mtar_size_t )077777777777LL ) {
145145#ifdef _MSC_VER
146146 sprintf (rh -> size , "%llo" , h -> size );
147147#else
Original file line number Diff line number Diff line change @@ -189,7 +189,10 @@ BOOST_AUTO_TEST_CASE(continue_write_tar_file)
189189 CHECK_EQUAL_COLLECTIONS (result_64bit_vector, vector_64bit);
190190}
191191
192- // This test case is disabled by default because it needs 70 GiB of storage
192+ // Boost test only supports disabling was only introduced in 1.59
193+ #if BOOST_VERSION >= 105900
194+ // This test case is disabled by default because it needs 10 GiB of storage
195+ // Enable with ./storage-tests --run_test=tar/write_huge_tar_file
193196BOOST_AUTO_TEST_CASE (write_huge_tar_file, *boost::unit_test::disabled ())
194197{
195198 TemporaryFile tmp{TEST_DATA_DIR " /tar_huge_write_test.tar" };
@@ -202,7 +205,7 @@ BOOST_AUTO_TEST_CASE(write_huge_tar_file, *boost::unit_test::disabled())
202205 reference_checksum += value;
203206 return value++;
204207 };
205- std::uint64_t num_elements = (70ULL * 1024ULL * 1024ULL * 1024ULL ) / sizeof (std::uint64_t );
208+ std::uint64_t num_elements = (10ULL * 1024ULL * 1024ULL * 1024ULL ) / sizeof (std::uint64_t );
206209 writer.WriteStreaming <std::uint64_t >(
207210 " huge_data" ,
208211 boost::make_function_input_iterator (encode_function, boost::infinite ()),
@@ -219,5 +222,6 @@ BOOST_AUTO_TEST_CASE(write_huge_tar_file, *boost::unit_test::disabled())
219222
220223 BOOST_CHECK_EQUAL (checksum, reference_checksum);
221224}
225+ #endif
222226
223227BOOST_AUTO_TEST_SUITE_END ()
You can’t perform that action at this time.
0 commit comments