summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/utimes.cc
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-01-21 16:16:51 -0800
committergVisor bot <gvisor-bot@google.com>2020-01-21 17:28:57 -0800
commit2296b4734462b6eeef383ea58e2b1b0b1a214d76 (patch)
treed43601b814bef410fa660bad27acda667fa16d75 /test/syscalls/linux/utimes.cc
parent0693fb05d15dff29cba51988f19a8d5cea784162 (diff)
Change to standard types.
PiperOrigin-RevId: 290846481
Diffstat (limited to 'test/syscalls/linux/utimes.cc')
-rw-r--r--test/syscalls/linux/utimes.cc25
1 files changed, 13 insertions, 12 deletions
diff --git a/test/syscalls/linux/utimes.cc b/test/syscalls/linux/utimes.cc
index e7bae9c07..3a927a430 100644
--- a/test/syscalls/linux/utimes.cc
+++ b/test/syscalls/linux/utimes.cc
@@ -163,12 +163,12 @@ TEST(FutimesatTest, OnRelPath) {
TEST(FutimesatTest, InvalidNsec) {
auto f = ASSERT_NO_ERRNO_AND_VALUE(TempPath::CreateFile());
struct timeval times[4][2] = {{
- {0, 1}, // Valid
- {1, static_cast<int64>(1e7)} // Invalid
+ {0, 1}, // Valid
+ {1, static_cast<int64_t>(1e7)} // Invalid
},
{
- {1, static_cast<int64>(1e7)}, // Invalid
- {0, 1} // Valid
+ {1, static_cast<int64_t>(1e7)}, // Invalid
+ {0, 1} // Valid
},
{
{0, 1}, // Valid
@@ -288,14 +288,15 @@ TEST(UtimeTest, ZeroAtimeandMtime) {
TEST(UtimensatTest, InvalidNsec) {
auto f = ASSERT_NO_ERRNO_AND_VALUE(TempPath::CreateFile());
- struct timespec times[2][2] = {{
- {0, UTIME_OMIT}, // Valid
- {2, static_cast<int64>(1e10)} // Invalid
- },
- {
- {2, static_cast<int64>(1e10)}, // Invalid
- {0, UTIME_OMIT} // Valid
- }};
+ struct timespec times[2][2] = {
+ {
+ {0, UTIME_OMIT}, // Valid
+ {2, static_cast<int64_t>(1e10)} // Invalid
+ },
+ {
+ {2, static_cast<int64_t>(1e10)}, // Invalid
+ {0, UTIME_OMIT} // Valid
+ }};
for (unsigned int i = 0; i < sizeof(times) / sizeof(times[0]); i++) {
std::cout << "test:" << i << "\n";