Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP4:RebuildFactoryUpdates
rmw
tests-fail-after-epochalypse.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File tests-fail-after-epochalypse.patch of Package rmw
diff -Naur rmw-0.9.2/src/purging_rmw.c rmw-0.9.3-dev/src/purging_rmw.c --- rmw-0.9.2/src/purging_rmw.c 2024-03-18 07:23:03.000000000 -0500 +++ rmw-0.9.3-dev/src/purging_rmw.c 2024-10-20 21:45:46.000000000 -0500 @@ -61,7 +61,7 @@ trim_whitespace(time_prev); close_file(&fp, file, __func__); - if ((st_time_var->now - atoi(time_prev)) < SECONDS_IN_A_DAY) + if ((st_time_var->now - atoll(time_prev)) < SECONDS_IN_A_DAY) return false; } diff -Naur rmw-0.9.2/src/time_rmw.c rmw-0.9.3-dev/src/time_rmw.c --- rmw-0.9.2/src/time_rmw.c 2024-03-18 07:23:03.000000000 -0500 +++ rmw-0.9.3-dev/src/time_rmw.c 2024-10-20 21:45:46.000000000 -0500 @@ -32,9 +32,17 @@ time_t time_t_now) { struct tm result; - localtime_r(&time_t_now, &result); + if (localtime_r(&time_t_now, &result) == NULL) + { + fputs + ("Error: localtime_r() failed for time_t value beyond 32-bit limit.\n", + stderr); + exit(EXIT_FAILURE); + } strftime(tm_str, len, format, &result); trim_whitespace(tm_str); + + return; } /*! @@ -64,6 +72,7 @@ init_time_vars(st_time *x) { x->now = time(NULL); + // x->now = 0x80000000; set_which_deletion_date(x->t_fmt); diff -Naur rmw-0.9.2/test/meson.build rmw-0.9.3-dev/test/meson.build --- rmw-0.9.2/test/meson.build 2024-03-18 07:23:03.000000000 -0500 +++ rmw-0.9.3-dev/test/meson.build 2024-10-20 21:45:46.000000000 -0500 @@ -3,6 +3,16 @@ env: 'RMW_FAKE_MEDIA_ROOT=true' ) +# The tests must be configured with 'b_sanitize=none' for this to work +# unless faketime has been built with sanitizer +faketime = find_program('faketime', required : false) +if faketime.found() + add_test_setup( + 'epochalypse', + exe_wrapper : [faketime, '-f', '+14y'] + ) +endif + test_cases = [ 'strings_rmw', 'utils_rmw',
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor