summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/flock.cc
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2019-03-05 13:53:36 -0800
committerShentubot <shentubot@google.com>2019-03-05 13:54:38 -0800
commitbd46185e24e03b93ac551a5ddfffb06975f157c8 (patch)
tree7a9ad36b72a017e4e960408a0e9e1743aaf32d8e /test/syscalls/linux/flock.cc
parentdcb634ce73f51a1c32e1632d5b5011b3cf56a862 (diff)
Add NoRandomSave to tests with correctness DisableSave
Tests using DisableSave because a portion of the test is *incompatible* with S/R clearly cannot use random S/R, as the saves may occur in the DisableSave critical section. Most such tests already have NoRandomSave. Add it to the rest. PiperOrigin-RevId: 236914708 Change-Id: Iee1cf044cfa7cb8d5aba21ddc130926218210c48
Diffstat (limited to 'test/syscalls/linux/flock.cc')
-rw-r--r--test/syscalls/linux/flock.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/syscalls/linux/flock.cc b/test/syscalls/linux/flock.cc
index fb93c8034..1388d3839 100644
--- a/test/syscalls/linux/flock.cc
+++ b/test/syscalls/linux/flock.cc
@@ -431,7 +431,7 @@ TEST_F(FlockTest, TestDupFdFollowedByLock) {
// NOTE: These blocking tests are not perfect. Unfortunantely it's very hard to
// determine if a thread was actually blocked in the kernel so we're forced
// to use timing.
-TEST_F(FlockTest, BlockingLockNoBlockingForSharedLocks) {
+TEST_F(FlockTest, BlockingLockNoBlockingForSharedLocks_NoRandomSave) {
// This test will verify that although LOCK_NB isn't specified
// two different fds can obtain shared locks without blocking.
ASSERT_THAT(flock(test_file_fd_.get(), LOCK_SH), SyscallSucceeds());
@@ -471,7 +471,7 @@ TEST_F(FlockTest, BlockingLockNoBlockingForSharedLocks) {
EXPECT_THAT(flock(test_file_fd_.get(), LOCK_UN), SyscallSucceeds());
}
-TEST_F(FlockTest, BlockingLockFirstSharedSecondExclusive) {
+TEST_F(FlockTest, BlockingLockFirstSharedSecondExclusive_NoRandomSave) {
// This test will verify that if someone holds a shared lock any attempt to
// obtain an exclusive lock will result in blocking.
ASSERT_THAT(flock(test_file_fd_.get(), LOCK_SH), SyscallSucceeds());
@@ -508,7 +508,7 @@ TEST_F(FlockTest, BlockingLockFirstSharedSecondExclusive) {
EXPECT_THAT(flock(test_file_fd_.get(), LOCK_UN), SyscallSucceeds());
}
-TEST_F(FlockTest, BlockingLockFirstExclusiveSecondShared) {
+TEST_F(FlockTest, BlockingLockFirstExclusiveSecondShared_NoRandomSave) {
// This test will verify that if someone holds an exclusive lock any attempt
// to obtain a shared lock will result in blocking.
ASSERT_THAT(flock(test_file_fd_.get(), LOCK_EX), SyscallSucceeds());
@@ -545,7 +545,7 @@ TEST_F(FlockTest, BlockingLockFirstExclusiveSecondShared) {
EXPECT_THAT(flock(test_file_fd_.get(), LOCK_UN), SyscallSucceeds());
}
-TEST_F(FlockTest, BlockingLockFirstExclusiveSecondExclusive) {
+TEST_F(FlockTest, BlockingLockFirstExclusiveSecondExclusive_NoRandomSave) {
// This test will verify that if someone holds an exclusive lock any attempt
// to obtain another exclusive lock will result in blocking.
ASSERT_THAT(flock(test_file_fd_.get(), LOCK_EX), SyscallSucceeds());