Changeset 1c6c3e1d in mainline for uspace/lib/dispcfg/test/dispcfg.c
- Timestamp:
- 2023-10-22T17:55:33Z (15 months ago)
- Branches:
- ticket/834-toolchain-update
- Children:
- 350ec74
- Parents:
- 315d487 (diff), 133461c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/dispcfg/test/dispcfg.c
r315d487 r1c6c3e1d 52 52 dispcfg_t *dispcfg = NULL; 53 53 test_response_t resp; 54 55 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 56 57 // FIXME This causes this test to be non-reentrant! 58 rc = loc_server_register(test_dispcfg_server); 59 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 60 61 rc = loc_service_register(test_dispcfg_svc, &sid); 62 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 63 64 rc = dispcfg_open(test_dispcfg_svc, NULL, NULL, &dispcfg); 65 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 66 PCUT_ASSERT_NOT_NULL(dispcfg); 67 68 dispcfg_close(dispcfg); 69 rc = loc_service_unregister(sid); 70 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 54 loc_srv_t *srv; 55 56 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 57 58 // FIXME This causes this test to be non-reentrant! 59 rc = loc_server_register(test_dispcfg_server, &srv); 60 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 61 62 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 63 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 64 65 rc = dispcfg_open(test_dispcfg_svc, NULL, NULL, &dispcfg); 66 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 67 PCUT_ASSERT_NOT_NULL(dispcfg); 68 69 dispcfg_close(dispcfg); 70 rc = loc_service_unregister(srv, sid); 71 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 72 loc_server_unregister(srv); 71 73 } 72 74 … … 79 81 dispcfg_seat_list_t *list; 80 82 test_response_t resp; 81 82 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 83 84 // FIXME This causes this test to be non-reentrant! 85 rc = loc_server_register(test_dispcfg_server); 86 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 87 88 rc = loc_service_register(test_dispcfg_svc, &sid); 83 loc_srv_t *srv; 84 85 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 86 87 // FIXME This causes this test to be non-reentrant! 88 rc = loc_server_register(test_dispcfg_server, &srv); 89 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 90 91 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 89 92 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 90 93 … … 101 104 102 105 dispcfg_close(dispcfg); 103 rc = loc_service_unregister(sid); 104 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 106 rc = loc_service_unregister(srv, sid); 107 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 108 loc_server_unregister(srv); 105 109 } 106 110 … … 113 117 dispcfg_seat_list_t *list; 114 118 test_response_t resp; 115 116 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 117 118 // FIXME This causes this test to be non-reentrant! 119 rc = loc_server_register(test_dispcfg_server); 120 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 121 122 rc = loc_service_register(test_dispcfg_svc, &sid); 119 loc_srv_t *srv; 120 121 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 122 123 // FIXME This causes this test to be non-reentrant! 124 rc = loc_server_register(test_dispcfg_server, &srv); 125 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 126 127 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 123 128 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 124 129 … … 147 152 dispcfg_free_seat_list(list); 148 153 dispcfg_close(dispcfg); 149 rc = loc_service_unregister(sid); 150 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 154 rc = loc_service_unregister(srv, sid); 155 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 156 loc_server_unregister(srv); 151 157 } 152 158 … … 160 166 dispcfg_seat_info_t *info; 161 167 test_response_t resp; 162 163 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 164 165 // FIXME This causes this test to be non-reentrant! 166 rc = loc_server_register(test_dispcfg_server); 167 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 168 169 rc = loc_service_register(test_dispcfg_svc, &sid); 168 loc_srv_t *srv; 169 170 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 171 172 // FIXME This causes this test to be non-reentrant! 173 rc = loc_server_register(test_dispcfg_server, &srv); 174 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 175 176 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 170 177 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 171 178 … … 184 191 185 192 dispcfg_close(dispcfg); 186 rc = loc_service_unregister(sid); 187 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 193 rc = loc_service_unregister(srv, sid); 194 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 195 loc_server_unregister(srv); 188 196 } 189 197 … … 197 205 dispcfg_seat_info_t *info; 198 206 test_response_t resp; 199 200 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 201 202 // FIXME This causes this test to be non-reentrant! 203 rc = loc_server_register(test_dispcfg_server); 204 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 205 206 rc = loc_service_register(test_dispcfg_svc, &sid); 207 loc_srv_t *srv; 208 209 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 210 211 // FIXME This causes this test to be non-reentrant! 212 rc = loc_server_register(test_dispcfg_server, &srv); 213 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 214 215 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 207 216 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 208 217 … … 228 237 dispcfg_free_seat_info(info); 229 238 dispcfg_close(dispcfg); 230 rc = loc_service_unregister(sid); 231 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 239 rc = loc_service_unregister(srv, sid); 240 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 241 loc_server_unregister(srv); 232 242 } 233 243 … … 240 250 sysarg_t seat_id; 241 251 test_response_t resp; 242 243 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 244 245 // FIXME This causes this test to be non-reentrant! 246 rc = loc_server_register(test_dispcfg_server); 247 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 248 249 rc = loc_service_register(test_dispcfg_svc, &sid); 252 loc_srv_t *srv; 253 254 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 255 256 // FIXME This causes this test to be non-reentrant! 257 rc = loc_server_register(test_dispcfg_server, &srv); 258 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 259 260 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 250 261 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 251 262 … … 266 277 267 278 dispcfg_close(dispcfg); 268 rc = loc_service_unregister(sid); 269 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 279 rc = loc_service_unregister(srv, sid); 280 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 281 loc_server_unregister(srv); 270 282 } 271 283 … … 278 290 sysarg_t seat_id; 279 291 test_response_t resp; 280 281 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 282 283 // FIXME This causes this test to be non-reentrant! 284 rc = loc_server_register(test_dispcfg_server); 285 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 286 287 rc = loc_service_register(test_dispcfg_svc, &sid); 292 loc_srv_t *srv; 293 294 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 295 296 // FIXME This causes this test to be non-reentrant! 297 rc = loc_server_register(test_dispcfg_server, &srv); 298 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 299 300 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 288 301 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 289 302 … … 304 317 305 318 dispcfg_close(dispcfg); 306 rc = loc_service_unregister(sid); 307 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 319 rc = loc_service_unregister(srv, sid); 320 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 321 loc_server_unregister(srv); 308 322 } 309 323 … … 316 330 sysarg_t seat_id; 317 331 test_response_t resp; 318 319 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 320 321 // FIXME This causes this test to be non-reentrant! 322 rc = loc_server_register(test_dispcfg_server); 323 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 324 325 rc = loc_service_register(test_dispcfg_svc, &sid); 332 loc_srv_t *srv; 333 334 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 335 336 // FIXME This causes this test to be non-reentrant! 337 rc = loc_server_register(test_dispcfg_server, &srv); 338 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 339 340 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 326 341 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 327 342 … … 340 355 341 356 dispcfg_close(dispcfg); 342 rc = loc_service_unregister(sid); 343 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 357 rc = loc_service_unregister(srv, sid); 358 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 359 loc_server_unregister(srv); 344 360 } 345 361 … … 352 368 sysarg_t seat_id; 353 369 test_response_t resp; 354 355 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 356 357 // FIXME This causes this test to be non-reentrant! 358 rc = loc_server_register(test_dispcfg_server); 359 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 360 361 rc = loc_service_register(test_dispcfg_svc, &sid); 370 loc_srv_t *srv; 371 372 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 373 374 // FIXME This causes this test to be non-reentrant! 375 rc = loc_server_register(test_dispcfg_server, &srv); 376 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 377 378 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 362 379 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 363 380 … … 376 393 377 394 dispcfg_close(dispcfg); 378 rc = loc_service_unregister(sid); 379 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 395 rc = loc_service_unregister(srv, sid); 396 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 397 loc_server_unregister(srv); 380 398 } 381 399 … … 389 407 sysarg_t seat_id; 390 408 test_response_t resp; 391 392 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 393 394 // FIXME This causes this test to be non-reentrant! 395 rc = loc_server_register(test_dispcfg_server); 396 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 397 398 rc = loc_service_register(test_dispcfg_svc, &sid); 409 loc_srv_t *srv; 410 411 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 412 413 // FIXME This causes this test to be non-reentrant! 414 rc = loc_server_register(test_dispcfg_server, &srv); 415 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 416 417 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 399 418 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 400 419 … … 415 434 416 435 dispcfg_close(dispcfg); 417 rc = loc_service_unregister(sid); 418 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 436 rc = loc_service_unregister(srv, sid); 437 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 438 loc_server_unregister(srv); 419 439 } 420 440 … … 428 448 sysarg_t seat_id; 429 449 test_response_t resp; 430 431 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 432 433 // FIXME This causes this test to be non-reentrant! 434 rc = loc_server_register(test_dispcfg_server); 435 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 436 437 rc = loc_service_register(test_dispcfg_svc, &sid); 450 loc_srv_t *srv; 451 452 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 453 454 // FIXME This causes this test to be non-reentrant! 455 rc = loc_server_register(test_dispcfg_server, &srv); 456 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 457 458 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 438 459 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 439 460 … … 454 475 455 476 dispcfg_close(dispcfg); 456 rc = loc_service_unregister(sid); 457 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 477 rc = loc_service_unregister(srv, sid); 478 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 479 loc_server_unregister(srv); 458 480 } 459 481 … … 466 488 sysarg_t svc_id; 467 489 test_response_t resp; 468 469 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 470 471 // FIXME This causes this test to be non-reentrant! 472 rc = loc_server_register(test_dispcfg_server); 473 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 474 475 rc = loc_service_register(test_dispcfg_svc, &sid); 490 loc_srv_t *srv; 491 492 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 493 494 // FIXME This causes this test to be non-reentrant! 495 rc = loc_server_register(test_dispcfg_server, &srv); 496 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 497 498 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 476 499 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 477 500 … … 490 513 491 514 dispcfg_close(dispcfg); 492 rc = loc_service_unregister(sid); 493 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 515 rc = loc_service_unregister(srv, sid); 516 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 517 loc_server_unregister(srv); 494 518 } 495 519 … … 502 526 sysarg_t svc_id; 503 527 test_response_t resp; 504 505 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 506 507 // FIXME This causes this test to be non-reentrant! 508 rc = loc_server_register(test_dispcfg_server); 509 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 510 511 rc = loc_service_register(test_dispcfg_svc, &sid); 528 loc_srv_t *srv; 529 530 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 531 532 // FIXME This causes this test to be non-reentrant! 533 rc = loc_server_register(test_dispcfg_server, &srv); 534 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 535 536 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 512 537 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 513 538 … … 526 551 527 552 dispcfg_close(dispcfg); 528 rc = loc_service_unregister(sid); 529 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 553 rc = loc_service_unregister(srv, sid); 554 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 555 loc_server_unregister(srv); 530 556 } 531 557 … … 539 565 sysarg_t seat_id; 540 566 test_response_t resp; 541 542 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 543 544 // FIXME This causes this test to be non-reentrant! 545 rc = loc_server_register(test_dispcfg_server); 546 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 547 548 rc = loc_service_register(test_dispcfg_svc, &sid); 567 loc_srv_t *srv; 568 569 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 570 571 // FIXME This causes this test to be non-reentrant! 572 rc = loc_server_register(test_dispcfg_server, &srv); 573 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 574 575 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 549 576 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 550 577 … … 563 590 564 591 dispcfg_close(dispcfg); 565 rc = loc_service_unregister(sid); 566 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 592 rc = loc_service_unregister(srv, sid); 593 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 594 loc_server_unregister(srv); 567 595 } 568 596 … … 576 604 sysarg_t seat_id; 577 605 test_response_t resp; 578 579 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 580 581 // FIXME This causes this test to be non-reentrant! 582 rc = loc_server_register(test_dispcfg_server); 583 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 584 585 rc = loc_service_register(test_dispcfg_svc, &sid); 606 loc_srv_t *srv; 607 608 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 609 610 // FIXME This causes this test to be non-reentrant! 611 rc = loc_server_register(test_dispcfg_server, &srv); 612 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 613 614 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 586 615 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 587 616 … … 612 641 dispcfg_free_dev_list(list); 613 642 dispcfg_close(dispcfg); 614 rc = loc_service_unregister(sid); 615 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 643 rc = loc_service_unregister(srv, sid); 644 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 645 loc_server_unregister(srv); 616 646 } 617 647 … … 623 653 dispcfg_t *dispcfg = NULL; 624 654 test_response_t resp; 625 626 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 627 628 // FIXME This causes this test to be non-reentrant! 629 rc = loc_server_register(test_dispcfg_server); 630 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 631 632 rc = loc_service_register(test_dispcfg_svc, &sid); 655 loc_srv_t *srv; 656 657 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 658 659 // FIXME This causes this test to be non-reentrant! 660 rc = loc_server_register(test_dispcfg_server, &srv); 661 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 662 663 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 633 664 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 634 665 … … 659 690 dispcfg_close(dispcfg); 660 691 661 rc = loc_service_unregister(sid); 662 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 692 rc = loc_service_unregister(srv, sid); 693 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 694 loc_server_unregister(srv); 663 695 } 664 696 … … 670 702 dispcfg_t *dispcfg = NULL; 671 703 test_response_t resp; 672 673 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 674 675 // FIXME This causes this test to be non-reentrant! 676 rc = loc_server_register(test_dispcfg_server); 677 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 678 679 rc = loc_service_register(test_dispcfg_svc, &sid); 704 loc_srv_t *srv; 705 706 async_set_fallback_port_handler(test_dispcfg_conn, &resp); 707 708 // FIXME This causes this test to be non-reentrant! 709 rc = loc_server_register(test_dispcfg_server, &srv); 710 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 711 712 rc = loc_service_register(srv, test_dispcfg_svc, &sid); 680 713 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 681 714 … … 706 739 dispcfg_close(dispcfg); 707 740 708 rc = loc_service_unregister(sid); 709 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 741 rc = loc_service_unregister(srv, sid); 742 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 743 loc_server_unregister(srv); 710 744 } 711 745
Note:
See TracChangeset
for help on using the changeset viewer.