refactor tests
Some checks failed
Blockstorage/repertory/pipeline/head This commit looks good
BlockStorage/repertory/pipeline/head There was a failure building this commit

This commit is contained in:
2025-09-20 16:39:18 -05:00
parent 0c7532e28b
commit 52e673a9ee

View File

@@ -23,9 +23,9 @@
#include "fixtures/drive_fixture.hpp"
namespace {
using repertory::utils::time::NANOS_PER_SECOND;
namespace {
void get_times_ns(const std::string &path, long long &at_ns, long long &mt_ns) {
struct stat st_unix{};
ASSERT_EQ(0, ::stat(path.c_str(), &st_unix));
@@ -47,7 +47,7 @@ void get_times_ns(const std::string &path, long long &at_ns, long long &mt_ns) {
#endif // defined(__APPLE__)
}
[[nodiscard]] auto ts_make(time_t sec, long nsec) -> timespec {
[[nodiscard]] auto ts_make(time_t sec, long long nsec) -> timespec {
return timespec{
.tv_sec = sec,
.tv_nsec = nsec,
@@ -226,7 +226,7 @@ TYPED_TEST(fuse_test, utimens_invalid_nsec_returns_einval) {
auto src = this->create_file_and_test(name);
auto spec = std::array<timespec, 2U>{
ts_make(0, 1000000000L),
ts_make(0, static_cast<long long>(NANOS_PER_SECOND)),
ts_make(0, 0),
};
@@ -318,7 +318,7 @@ TYPED_TEST(fuse_test, futimens_invalid_nsec_returns_einval) {
auto spec = std::array<timespec, 2U>{
ts_make(0, 0),
ts_make(0, 1000000000L),
ts_make(0, static_cast<long long>(NANOS_PER_SECOND)),
};
errno = 0;