Re: git: 811e0a31acaf - main - fusefs tests: handle -Wdeprecated* issues with GoogleTest 1.14.0
- Reply: Enji Cooper : "Re: git: 811e0a31acaf - main - fusefs tests: handle -Wdeprecated* issues with GoogleTest 1.14.0"
- In reply to: Enji Cooper : "git: 811e0a31acaf - main - fusefs tests: handle -Wdeprecated* issues with GoogleTest 1.14.0"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 10 Aug 2023 14:52:14 UTC
In message <202308100232.37A2WgNG040490@gitrepo.freebsd.org>, Enji Cooper write s: > The branch main has been updated by ngie: > > URL: https://cgit.FreeBSD.org/src/commit/?id=811e0a31acafd6ab21f89bec8ba0fb8c > 09f258d2 > > commit 811e0a31acafd6ab21f89bec8ba0fb8c09f258d2 > Author: Enji Cooper <ngie@FreeBSD.org> > AuthorDate: 2023-08-08 13:42:07 +0000 > Commit: Enji Cooper <ngie@FreeBSD.org> > CommitDate: 2023-08-10 09:32:33 +0000 > > fusefs tests: handle -Wdeprecated* issues with GoogleTest 1.14.0 > > `INSTANTIATE_TEST_CASE_P` has been replaced with `INSTANTIATE_TEST_SUITE_ > P`. > Replace all uses of the former macro with the latter macro. > > While here, address the fact that the latter macro doesn't permit some > of the constructions that the former macro did, e.g., empty parameters, > etc. > > MFC after: 2 weeks > Reviewed by: asomers > Differential Revision: https://reviews.freebsd.org/D41398 > --- > tests/sys/fs/fusefs/bmap.cc | 2 +- > tests/sys/fs/fusefs/cache.cc | 2 +- > tests/sys/fs/fusefs/dev_fuse_poll.cc | 2 +- > tests/sys/fs/fusefs/fallocate.cc | 4 ++-- > tests/sys/fs/fusefs/io.cc | 4 ++-- > tests/sys/fs/fusefs/last_local_modify.cc | 2 +- > tests/sys/fs/fusefs/mount.cc | 6 +++--- > tests/sys/fs/fusefs/read.cc | 4 ++-- > tests/sys/fs/fusefs/write.cc | 6 +++--- > 9 files changed, 16 insertions(+), 16 deletions(-) > > diff --git a/tests/sys/fs/fusefs/bmap.cc b/tests/sys/fs/fusefs/bmap.cc > index 9d97d1c08ca5..3191ac657de9 100644 > --- a/tests/sys/fs/fusefs/bmap.cc > +++ b/tests/sys/fs/fusefs/bmap.cc > @@ -253,6 +253,6 @@ TEST_P(BmapEof, eof) > leak(fd); > } > > -INSTANTIATE_TEST_CASE_P(BE, BmapEof, > +INSTANTIATE_TEST_SUITE_P(BE, BmapEof, > Values(1, 2, 3) > ); > diff --git a/tests/sys/fs/fusefs/cache.cc b/tests/sys/fs/fusefs/cache.cc > index cf9476a0a853..429b54c7ba75 100644 > --- a/tests/sys/fs/fusefs/cache.cc > +++ b/tests/sys/fs/fusefs/cache.cc > @@ -197,7 +197,7 @@ TEST_P(Cache, truncate_by_surprise_invalidates_cache) > leak(fd); > } > > -INSTANTIATE_TEST_CASE_P(Cache, Cache, > +INSTANTIATE_TEST_SUITE_P(Cache, Cache, > Combine( > /* Test every combination that: > * - does not cache at least one of entries and attrs > diff --git a/tests/sys/fs/fusefs/dev_fuse_poll.cc b/tests/sys/fs/fusefs/dev_f > use_poll.cc > index de1b9a6b5f3f..4777f9818c60 100644 > --- a/tests/sys/fs/fusefs/dev_fuse_poll.cc > +++ b/tests/sys/fs/fusefs/dev_fuse_poll.cc > @@ -98,7 +98,7 @@ TEST_P(DevFusePoll, destroy) > m_mock->unmount(); > } > > -INSTANTIATE_TEST_CASE_P(PM, DevFusePoll, > +INSTANTIATE_TEST_SUITE_P(PM, DevFusePoll, > ::testing::Values("BLOCKING", "KQ", "POLL", "SELECT")); > > static void* statter(void* arg) { > diff --git a/tests/sys/fs/fusefs/fallocate.cc b/tests/sys/fs/fusefs/fallocate > .cc > index d10abfba3807..166f9ca7ff3a 100644 > --- a/tests/sys/fs/fusefs/fallocate.cc > +++ b/tests/sys/fs/fusefs/fallocate.cc > @@ -493,8 +493,8 @@ TEST_P(FspacectlCache, clears_cache) > leak(fd); > } > > -INSTANTIATE_TEST_CASE_P(FspacectlCache, FspacectlCache, > - Values(Uncached, Writethrough, Writeback), > +INSTANTIATE_TEST_SUITE_P(FspacectlCache, FspacectlCache, > + Values(Uncached, Writethrough, Writeback) > ); > > /* > diff --git a/tests/sys/fs/fusefs/io.cc b/tests/sys/fs/fusefs/io.cc > index d08dea99ff47..fe3237d39c95 100644 > --- a/tests/sys/fs/fusefs/io.cc > +++ b/tests/sys/fs/fusefs/io.cc > @@ -509,14 +509,14 @@ TEST_P(Io, resize_a_valid_buffer_while_extending) > close(m_test_fd); > } > > -INSTANTIATE_TEST_CASE_P(Io, Io, > +INSTANTIATE_TEST_SUITE_P(Io, Io, > Combine(Bool(), /* async read */ > Values(0x1000, 0x10000, 0x20000), /* m_maxwrite */ > Values(Uncached, Writethrough, Writeback, WritebackAsync) > ) > ); > > -INSTANTIATE_TEST_CASE_P(Io, IoCacheable, > +INSTANTIATE_TEST_SUITE_P(Io, IoCacheable, > Combine(Bool(), /* async read */ > Values(0x1000, 0x10000, 0x20000), /* m_maxwrite */ > Values(Writethrough, Writeback, WritebackAsync) > diff --git a/tests/sys/fs/fusefs/last_local_modify.cc b/tests/sys/fs/fusefs/l > ast_local_modify.cc > index dd0d9c740355..537187a6bfb7 100644 > --- a/tests/sys/fs/fusefs/last_local_modify.cc > +++ b/tests/sys/fs/fusefs/last_local_modify.cc > @@ -506,7 +506,7 @@ TEST_P(LastLocalModify, vfs_vget) > } > > > -INSTANTIATE_TEST_CASE_P(LLM, LastLocalModify, > +INSTANTIATE_TEST_SUITE_P(LLM, LastLocalModify, > Values( > "VOP_ALLOCATE", > "VOP_COPY_FILE_RANGE", > diff --git a/tests/sys/fs/fusefs/mount.cc b/tests/sys/fs/fusefs/mount.cc > index 06ebe7fedebc..db06068e4eb8 100644 > --- a/tests/sys/fs/fusefs/mount.cc > +++ b/tests/sys/fs/fusefs/mount.cc > @@ -192,11 +192,11 @@ TEST_P(UpdateErr, update) > EXPECT_TRUE((newflags ^ statbuf.f_flags) & flag); > } > > -INSTANTIATE_TEST_CASE_P(Mount, UpdateOk, > +INSTANTIATE_TEST_SUITE_P(Mount, UpdateOk, > ::testing::Values("MNT_RDONLY", "MNT_NOEXEC", "MNT_NOSUID", "MN > T_NOATIME", > "MNT_SUIDDIR") > ); > > -INSTANTIATE_TEST_CASE_P(Mount, UpdateErr, > - ::testing::Values( "MNT_USER"); > +INSTANTIATE_TEST_SUITE_P(Mount, UpdateErr, > + ::testing::Values( "MNT_USER") > ); > diff --git a/tests/sys/fs/fusefs/read.cc b/tests/sys/fs/fusefs/read.cc > index f1f485d0b736..72e09d355ad3 100644 > --- a/tests/sys/fs/fusefs/read.cc > +++ b/tests/sys/fs/fusefs/read.cc > @@ -1314,7 +1314,7 @@ TEST_P(ReadAhead, readahead) { > free(contents); > } > > -INSTANTIATE_TEST_CASE_P(RA, ReadAhead, > +INSTANTIATE_TEST_SUITE_P(RA, ReadAhead, > Values(tuple<bool, int>(false, 0), > tuple<bool, int>(false, 1), > tuple<bool, int>(false, 2), > @@ -1362,4 +1362,4 @@ TEST_P(TimeGran, atime_during_setattr) > leak(fd); > } > > -INSTANTIATE_TEST_CASE_P(TG, TimeGran, Range(0u, 10u)); > +INSTANTIATE_TEST_SUITE_P(TG, TimeGran, Range(0u, 10u)); > diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc > index a217e285a76b..c8cb7d08f474 100644 > --- a/tests/sys/fs/fusefs/write.cc > +++ b/tests/sys/fs/fusefs/write.cc > @@ -616,7 +616,7 @@ TEST_P(WriteRlimitFsize, rlimit_fsize_truncate) > leak(fd); > } > > -INSTANTIATE_TEST_CASE_P(W, WriteRlimitFsize, > +INSTANTIATE_TEST_SUITE_P(W, WriteRlimitFsize, > Values(0, O_DIRECT) > ); > > @@ -724,7 +724,7 @@ TEST_P(WriteEofDuringVnopStrategy, eof_during_vop_strateg > y) > > } > > -INSTANTIATE_TEST_CASE_P(W, WriteEofDuringVnopStrategy, > +INSTANTIATE_TEST_SUITE_P(W, WriteEofDuringVnopStrategy, > Values(1, 2, 3) > ); > > @@ -1546,7 +1546,7 @@ TEST_P(TimeGran, timestamps_during_setattr) > leak(fd); > } > > -INSTANTIATE_TEST_CASE_P(RA, TimeGran, Range(0u, 10u)); > +INSTANTIATE_TEST_SUITE_P(RA, TimeGran, Range(0u, 10u)); > > /* > * Without direct_io, writes should be committed to cache > Probably precipitated by the local revert of 28f6c2f29280 due to its build failure, this causes the following build failure. -- bmap --- /opt/src/git-src/tests/sys/fs/fusefs/bmap.cc:256:26: error: unknown type name 'BE' INSTANTIATE_TEST_SUITE_P(BE, BmapEof, ^ /opt/src/git-src/tests/sys/fs/fusefs/bmap.cc:256:37: error: parameter type 'BmapEof' is an abstract class INSTANTIATE_TEST_SUITE_P(BE, BmapEof, ^ /opt/src/git-src/tests/sys/