diff options
| author | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
| commit | 1ac731c529cd4d6adbce134754b51ff7d822b145 (patch) | |
| tree | 143ab3f35ca5f3b69f583c84e6964b17139c2ec1 /tools/perf/tests/thread-maps-share.c | |
| parent | 07b4c950f27bef0362dc6ad7ee713aab61d58149 (diff) | |
| parent | 54116d442e001e1b6bd482122043b1870998a1f3 (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 6.6 merge window.
Diffstat (limited to 'tools/perf/tests/thread-maps-share.c')
| -rw-r--r-- | tools/perf/tests/thread-maps-share.c | 28 | 
1 files changed, 14 insertions, 14 deletions
diff --git a/tools/perf/tests/thread-maps-share.c b/tools/perf/tests/thread-maps-share.c index 84edd82c519e..858e725318a9 100644 --- a/tools/perf/tests/thread-maps-share.c +++ b/tools/perf/tests/thread-maps-share.c @@ -43,12 +43,12 @@ static int test__thread_maps_share(struct test_suite *test __maybe_unused, int s  			leader && t1 && t2 && t3 && other);  	maps = leader->maps; -	TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&maps->refcnt), 4); +	TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(maps__refcnt(maps)), 4);  	/* test the maps pointer is shared */ -	TEST_ASSERT_VAL("maps don't match", maps == t1->maps); -	TEST_ASSERT_VAL("maps don't match", maps == t2->maps); -	TEST_ASSERT_VAL("maps don't match", maps == t3->maps); +	TEST_ASSERT_VAL("maps don't match", RC_CHK_ACCESS(maps) == RC_CHK_ACCESS(t1->maps)); +	TEST_ASSERT_VAL("maps don't match", RC_CHK_ACCESS(maps) == RC_CHK_ACCESS(t2->maps)); +	TEST_ASSERT_VAL("maps don't match", RC_CHK_ACCESS(maps) == RC_CHK_ACCESS(t3->maps));  	/*  	 * Verify the other leader was created by previous call. @@ -71,25 +71,25 @@ static int test__thread_maps_share(struct test_suite *test __maybe_unused, int s  	machine__remove_thread(machine, other_leader);  	other_maps = other->maps; -	TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&other_maps->refcnt), 2); +	TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(maps__refcnt(other_maps)), 2); -	TEST_ASSERT_VAL("maps don't match", other_maps == other_leader->maps); +	TEST_ASSERT_VAL("maps don't match", RC_CHK_ACCESS(other_maps) == RC_CHK_ACCESS(other_leader->maps));  	/* release thread group */ -	thread__put(leader); -	TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&maps->refcnt), 3); - -	thread__put(t1); -	TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&maps->refcnt), 2); +	thread__put(t3); +	TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(maps__refcnt(maps)), 3);  	thread__put(t2); -	TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&maps->refcnt), 1); +	TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(maps__refcnt(maps)), 2); -	thread__put(t3); +	thread__put(t1); +	TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(maps__refcnt(maps)), 1); + +	thread__put(leader);  	/* release other group  */  	thread__put(other_leader); -	TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&other_maps->refcnt), 1); +	TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(maps__refcnt(other_maps)), 1);  	thread__put(other);  |