Skip to content

Commit 6892412

Browse files
authored
Merge pull request #1266 from omarahmed1111/Fix-device-retain-release-tests
Fix device CTS tests for retain/release
2 parents 8da09d4 + 7606732 commit 6892412

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

test/conformance/device/urDeviceRelease.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ struct urDeviceReleaseTest : uur::urAllDevicesTest {};
88

99
TEST_F(urDeviceReleaseTest, Success) {
1010
for (auto device : devices) {
11-
ASSERT_SUCCESS(urDeviceRetain(device));
12-
1311
uint32_t prevRefCount = 0;
1412
ASSERT_SUCCESS(uur::GetObjectReferenceCount(device, prevRefCount));
1513

@@ -57,6 +55,8 @@ TEST_F(urDeviceReleaseTest, SuccessSubdevices) {
5755
ASSERT_SUCCESS(uur::GetObjectReferenceCount(sub_device, refCount));
5856

5957
ASSERT_GT(prevRefCount, refCount);
58+
59+
EXPECT_SUCCESS(urDeviceRelease(sub_device));
6060
}
6161
}
6262

test/conformance/device/urDeviceRetain.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ TEST_F(urDeviceRetainTest, Success) {
2020
/* If device is a root level device, the device reference counts should
2121
* remain unchanged */
2222
ASSERT_EQ(prevRefCount, refCount);
23-
24-
EXPECT_SUCCESS(urDeviceRelease(device));
2523
}
2624
}
2725

@@ -57,6 +55,7 @@ TEST_F(urDeviceRetainTest, SuccessSubdevices) {
5755
ASSERT_LT(prevRefCount, refCount);
5856

5957
EXPECT_SUCCESS(urDeviceRelease(sub_device));
58+
EXPECT_SUCCESS(urDeviceRelease(sub_device));
6059
}
6160
}
6261

0 commit comments

Comments
 (0)