qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

tests: Use &error_abort where appropriate

Receiving the error in a local variable only to assert there is none
is less clear than passing &error_abort. Clean up.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200630090351.1247703-5-armbru@redhat.com>

+59 -145
+2 -3
tests/check-qobject.c
··· 9 9 10 10 #include "qemu/osdep.h" 11 11 #include "block/qdict.h" 12 + #include "qapi/error.h" 12 13 #include "qapi/qmp/qbool.h" 13 14 #include "qapi/qmp/qdict.h" 14 15 #include "qapi/qmp/qlist.h" ··· 213 214 214 215 static void qobject_is_equal_dict_test(void) 215 216 { 216 - Error *local_err = NULL; 217 217 QDict *dict_0, *dict_1, *dict_cloned; 218 218 QDict *dict_different_key, *dict_different_value, *dict_different_null_key; 219 219 QDict *dict_longer, *dict_shorter, *dict_nested; ··· 276 276 dict_different_null_key, dict_longer, dict_shorter, 277 277 dict_nested); 278 278 279 - dict_crumpled = qobject_to(QDict, qdict_crumple(dict_1, &local_err)); 280 - g_assert(!local_err); 279 + dict_crumpled = qobject_to(QDict, qdict_crumple(dict_1, &error_abort)); 281 280 check_equal(dict_crumpled, dict_nested); 282 281 283 282 qdict_flatten(dict_nested);
+2 -5
tests/check-qom-proplist.c
··· 419 419 g_assert(dobj->bv == true); 420 420 g_assert(dobj->av == DUMMY_PLATYPUS); 421 421 422 - user_creatable_del("dev0", &err); 423 - g_assert(err == NULL); 424 - error_free(err); 422 + user_creatable_del("dev0", &error_abort); 425 423 426 424 object_unref(OBJECT(dobj)); 427 425 ··· 485 483 val = object_property_get_enum(OBJECT(dobj), 486 484 "av", 487 485 "DummyAnimal", 488 - &err); 489 - g_assert(err == NULL); 486 + &error_abort); 490 487 g_assert(val == DUMMY_PLATYPUS); 491 488 492 489 /* A bad enum type name */
+3 -9
tests/test-logging.c
··· 113 113 QemuLogFile *logfile; 114 114 QemuLogFile *logfile2; 115 115 gchar const *dir = data; 116 - Error *err = NULL; 117 116 g_autofree gchar *file_path = NULL; 118 117 g_autofree gchar *file_path1 = NULL; 119 118 FILE *orig_fd; ··· 132 131 * Test that even if an open file handle is changed, 133 132 * our handle remains valid due to RCU. 134 133 */ 135 - qemu_set_log_filename(file_path, &err); 136 - g_assert(!err); 134 + qemu_set_log_filename(file_path, &error_abort); 137 135 rcu_read_lock(); 138 136 logfile = atomic_rcu_read(&qemu_logfile); 139 137 orig_fd = logfile->fd; ··· 142 140 fflush(logfile->fd); 143 141 144 142 /* Change the logfile and ensure that the handle is still valid. */ 145 - qemu_set_log_filename(file_path1, &err); 146 - g_assert(!err); 143 + qemu_set_log_filename(file_path1, &error_abort); 147 144 logfile2 = atomic_rcu_read(&qemu_logfile); 148 145 g_assert(logfile->fd == orig_fd); 149 146 g_assert(logfile2->fd != logfile->fd); ··· 156 153 { 157 154 FILE *logfile; 158 155 gchar const *dir = data; 159 - Error *err = NULL; 160 156 g_autofree gchar *file_path = NULL; 161 157 162 158 file_path = g_build_filename(dir, "qemu_test_logfile_lock0.log", NULL); ··· 166 162 * that even if an open file handle is closed, 167 163 * our handle remains valid for use due to RCU. 168 164 */ 169 - qemu_set_log_filename(file_path, &err); 165 + qemu_set_log_filename(file_path, &error_abort); 170 166 logfile = qemu_log_lock(); 171 167 g_assert(logfile); 172 168 fprintf(logfile, "%s 1st write to file\n", __func__); ··· 180 176 fprintf(logfile, "%s 2nd write to file\n", __func__); 181 177 fflush(logfile); 182 178 qemu_log_unlock(logfile); 183 - 184 - g_assert(!err); 185 179 } 186 180 187 181 /* Remove a directory and all its entries (non-recursive). */
+6 -16
tests/test-qemu-opts.c
··· 187 187 188 188 static void test_qemu_opt_get_bool(void) 189 189 { 190 - Error *err = NULL; 191 190 QemuOptsList *list; 192 191 QemuOpts *opts; 193 192 bool opt; ··· 210 209 opt = qemu_opt_get_bool(opts, "bool1", false); 211 210 g_assert(opt == false); 212 211 213 - qemu_opt_set_bool(opts, "bool1", true, &err); 214 - g_assert(!err); 212 + qemu_opt_set_bool(opts, "bool1", true, &error_abort); 215 213 216 214 /* now we have set bool1, should know about it */ 217 215 opt = qemu_opt_get_bool(opts, "bool1", false); 218 216 g_assert(opt == true); 219 217 220 218 /* having reset the value, opt should be the reset one not defval */ 221 - qemu_opt_set_bool(opts, "bool1", false, &err); 222 - g_assert(!err); 219 + qemu_opt_set_bool(opts, "bool1", false, &error_abort); 223 220 224 221 opt = qemu_opt_get_bool(opts, "bool1", true); 225 222 g_assert(opt == false); ··· 233 230 234 231 static void test_qemu_opt_get_number(void) 235 232 { 236 - Error *err = NULL; 237 233 QemuOptsList *list; 238 234 QemuOpts *opts; 239 235 uint64_t opt; ··· 256 252 opt = qemu_opt_get_number(opts, "number1", 5); 257 253 g_assert(opt == 5); 258 254 259 - qemu_opt_set_number(opts, "number1", 10, &err); 260 - g_assert(!err); 255 + qemu_opt_set_number(opts, "number1", 10, &error_abort); 261 256 262 257 /* now we have set number1, should know about it */ 263 258 opt = qemu_opt_get_number(opts, "number1", 5); 264 259 g_assert(opt == 10); 265 260 266 261 /* having reset it, the returned should be the reset one not defval */ 267 - qemu_opt_set_number(opts, "number1", 15, &err); 268 - g_assert(!err); 262 + qemu_opt_set_number(opts, "number1", 15, &error_abort); 269 263 270 264 opt = qemu_opt_get_number(opts, "number1", 5); 271 265 g_assert(opt == 15); ··· 367 361 368 362 static void test_qemu_opts_reset(void) 369 363 { 370 - Error *err = NULL; 371 364 QemuOptsList *list; 372 365 QemuOpts *opts; 373 366 uint64_t opt; ··· 390 383 opt = qemu_opt_get_number(opts, "number1", 5); 391 384 g_assert(opt == 5); 392 385 393 - qemu_opt_set_number(opts, "number1", 10, &err); 394 - g_assert(!err); 386 + qemu_opt_set_number(opts, "number1", 10, &error_abort); 395 387 396 388 /* now we have set number1, should know about it */ 397 389 opt = qemu_opt_get_number(opts, "number1", 5); ··· 406 398 407 399 static void test_qemu_opts_set(void) 408 400 { 409 - Error *err = NULL; 410 401 QemuOptsList *list; 411 402 QemuOpts *opts; 412 403 const char *opt; ··· 421 412 g_assert(opts == NULL); 422 413 423 414 /* implicitly create opts and set str3 value */ 424 - qemu_opts_set(list, NULL, "str3", "value", &err); 425 - g_assert(!err); 415 + qemu_opts_set(list, NULL, "str3", "value", &error_abort); 426 416 g_assert(!QTAILQ_EMPTY(&list->head)); 427 417 428 418 /* get the just created opts */
+32 -77
tests/test-replication.c
··· 139 139 140 140 static void prepare_imgs(void) 141 141 { 142 - Error *local_err = NULL; 143 - 144 142 make_temp(p_local_disk); 145 143 make_temp(s_local_disk); 146 144 make_temp(s_active_disk); ··· 148 146 149 147 /* Primary */ 150 148 bdrv_img_create(p_local_disk, "qcow2", NULL, NULL, NULL, IMG_SIZE, 151 - BDRV_O_RDWR, true, &local_err); 152 - g_assert(!local_err); 149 + BDRV_O_RDWR, true, &error_abort); 153 150 154 151 /* Secondary */ 155 152 bdrv_img_create(s_local_disk, "qcow2", NULL, NULL, NULL, IMG_SIZE, 156 - BDRV_O_RDWR, true, &local_err); 157 - g_assert(!local_err); 153 + BDRV_O_RDWR, true, &error_abort); 158 154 bdrv_img_create(s_active_disk, "qcow2", NULL, NULL, NULL, IMG_SIZE, 159 - BDRV_O_RDWR, true, &local_err); 160 - g_assert(!local_err); 155 + BDRV_O_RDWR, true, &error_abort); 161 156 bdrv_img_create(s_hidden_disk, "qcow2", NULL, NULL, NULL, IMG_SIZE, 162 - BDRV_O_RDWR, true, &local_err); 163 - g_assert(!local_err); 157 + BDRV_O_RDWR, true, &error_abort); 164 158 } 165 159 166 160 static void cleanup_imgs(void) ··· 179 173 BlockBackend *blk; 180 174 QemuOpts *opts; 181 175 QDict *qdict; 182 - Error *local_err = NULL; 183 176 char *cmdline; 184 177 185 178 cmdline = g_strdup_printf("driver=replication,mode=primary,node-name=xxx," ··· 193 186 qdict_set_default_str(qdict, BDRV_OPT_CACHE_DIRECT, "off"); 194 187 qdict_set_default_str(qdict, BDRV_OPT_CACHE_NO_FLUSH, "off"); 195 188 196 - blk = blk_new_open(NULL, NULL, qdict, BDRV_O_RDWR, &local_err); 189 + blk = blk_new_open(NULL, NULL, qdict, BDRV_O_RDWR, &error_abort); 197 190 g_assert(blk); 198 - g_assert(!local_err); 199 191 200 - monitor_add_blk(blk, P_ID, &local_err); 201 - g_assert(!local_err); 192 + monitor_add_blk(blk, P_ID, &error_abort); 202 193 203 194 qemu_opts_del(opts); 204 195 ··· 248 239 static void test_primary_start(void) 249 240 { 250 241 BlockBackend *blk = NULL; 251 - Error *local_err = NULL; 252 242 253 243 blk = start_primary(); 254 244 255 - replication_start_all(REPLICATION_MODE_PRIMARY, &local_err); 256 - g_assert(!local_err); 245 + replication_start_all(REPLICATION_MODE_PRIMARY, &error_abort); 257 246 258 247 /* read from 0 to IMG_SIZE */ 259 248 test_blk_read(blk, 0, 0, IMG_SIZE, 0, IMG_SIZE, true); ··· 266 255 267 256 static void test_primary_stop(void) 268 257 { 269 - Error *local_err = NULL; 270 258 bool failover = true; 271 259 272 260 start_primary(); 273 261 274 - replication_start_all(REPLICATION_MODE_PRIMARY, &local_err); 275 - g_assert(!local_err); 262 + replication_start_all(REPLICATION_MODE_PRIMARY, &error_abort); 276 263 277 - replication_stop_all(failover, &local_err); 278 - g_assert(!local_err); 264 + replication_stop_all(failover, &error_abort); 279 265 280 266 teardown_primary(); 281 267 } 282 268 283 269 static void test_primary_do_checkpoint(void) 284 270 { 285 - Error *local_err = NULL; 286 - 287 271 start_primary(); 288 272 289 - replication_start_all(REPLICATION_MODE_PRIMARY, &local_err); 290 - g_assert(!local_err); 273 + replication_start_all(REPLICATION_MODE_PRIMARY, &error_abort); 291 274 292 - replication_do_checkpoint_all(&local_err); 293 - g_assert(!local_err); 275 + replication_do_checkpoint_all(&error_abort); 294 276 295 277 teardown_primary(); 296 278 } 297 279 298 280 static void test_primary_get_error_all(void) 299 281 { 300 - Error *local_err = NULL; 301 - 302 282 start_primary(); 303 283 304 - replication_start_all(REPLICATION_MODE_PRIMARY, &local_err); 305 - g_assert(!local_err); 284 + replication_start_all(REPLICATION_MODE_PRIMARY, &error_abort); 306 285 307 - replication_get_error_all(&local_err); 308 - g_assert(!local_err); 286 + replication_get_error_all(&error_abort); 309 287 310 288 teardown_primary(); 311 289 } ··· 316 294 QDict *qdict; 317 295 BlockBackend *blk; 318 296 char *cmdline; 319 - Error *local_err = NULL; 320 297 321 298 /* add s_local_disk and forge S_LOCAL_DISK_ID */ 322 299 cmdline = g_strdup_printf("file.filename=%s,driver=qcow2," ··· 329 306 qdict_set_default_str(qdict, BDRV_OPT_CACHE_DIRECT, "off"); 330 307 qdict_set_default_str(qdict, BDRV_OPT_CACHE_NO_FLUSH, "off"); 331 308 332 - blk = blk_new_open(NULL, NULL, qdict, BDRV_O_RDWR, &local_err); 309 + blk = blk_new_open(NULL, NULL, qdict, BDRV_O_RDWR, &error_abort); 333 310 assert(blk); 334 - monitor_add_blk(blk, S_LOCAL_DISK_ID, &local_err); 335 - g_assert(!local_err); 311 + monitor_add_blk(blk, S_LOCAL_DISK_ID, &error_abort); 336 312 337 313 /* format s_local_disk with pattern "0x11" */ 338 314 test_blk_write(blk, 0x11, 0, IMG_SIZE, false); ··· 356 332 qdict_set_default_str(qdict, BDRV_OPT_CACHE_DIRECT, "off"); 357 333 qdict_set_default_str(qdict, BDRV_OPT_CACHE_NO_FLUSH, "off"); 358 334 359 - blk = blk_new_open(NULL, NULL, qdict, BDRV_O_RDWR, &local_err); 335 + blk = blk_new_open(NULL, NULL, qdict, BDRV_O_RDWR, &error_abort); 360 336 assert(blk); 361 - monitor_add_blk(blk, S_ID, &local_err); 362 - g_assert(!local_err); 337 + monitor_add_blk(blk, S_ID, &error_abort); 363 338 364 339 qemu_opts_del(opts); 365 340 ··· 420 395 static void test_secondary_start(void) 421 396 { 422 397 BlockBackend *top_blk, *local_blk; 423 - Error *local_err = NULL; 424 398 bool failover = true; 425 399 426 400 top_blk = start_secondary(); 427 - replication_start_all(REPLICATION_MODE_SECONDARY, &local_err); 428 - g_assert(!local_err); 401 + replication_start_all(REPLICATION_MODE_SECONDARY, &error_abort); 429 402 430 403 /* read from s_local_disk (0, IMG_SIZE) */ 431 404 test_blk_read(top_blk, 0x11, 0, IMG_SIZE, 0, IMG_SIZE, false); ··· 446 419 0, IMG_SIZE / 2, false); 447 420 448 421 /* unblock top_bs */ 449 - replication_stop_all(failover, &local_err); 450 - g_assert(!local_err); 422 + replication_stop_all(failover, &error_abort); 451 423 452 424 teardown_secondary(); 453 425 } ··· 456 428 static void test_secondary_stop(void) 457 429 { 458 430 BlockBackend *top_blk, *local_blk; 459 - Error *local_err = NULL; 460 431 bool failover = true; 461 432 462 433 top_blk = start_secondary(); 463 - replication_start_all(REPLICATION_MODE_SECONDARY, &local_err); 464 - g_assert(!local_err); 434 + replication_start_all(REPLICATION_MODE_SECONDARY, &error_abort); 465 435 466 436 /* write 0x22 to s_local_disk (IMG_SIZE / 2, IMG_SIZE) */ 467 437 local_blk = blk_by_name(S_LOCAL_DISK_ID); ··· 475 445 test_blk_write(top_blk, 0x33, 0, IMG_SIZE / 2, false); 476 446 477 447 /* do active commit */ 478 - replication_stop_all(failover, &local_err); 479 - g_assert(!local_err); 448 + replication_stop_all(failover, &error_abort); 480 449 481 450 /* read from s_local_disk (0, IMG_SIZE / 2) */ 482 451 test_blk_read(top_blk, 0x33, 0, IMG_SIZE / 2, ··· 493 462 static void test_secondary_continuous_replication(void) 494 463 { 495 464 BlockBackend *top_blk, *local_blk; 496 - Error *local_err = NULL; 497 465 498 466 top_blk = start_secondary(); 499 - replication_start_all(REPLICATION_MODE_SECONDARY, &local_err); 500 - g_assert(!local_err); 467 + replication_start_all(REPLICATION_MODE_SECONDARY, &error_abort); 501 468 502 469 /* write 0x22 to s_local_disk (IMG_SIZE / 2, IMG_SIZE) */ 503 470 local_blk = blk_by_name(S_LOCAL_DISK_ID); ··· 511 478 test_blk_write(top_blk, 0x33, 0, IMG_SIZE / 2, false); 512 479 513 480 /* do failover (active commit) */ 514 - replication_stop_all(true, &local_err); 515 - g_assert(!local_err); 481 + replication_stop_all(true, &error_abort); 516 482 517 483 /* it should ignore all requests from now on */ 518 484 519 485 /* start after failover */ 520 - replication_start_all(REPLICATION_MODE_PRIMARY, &local_err); 521 - g_assert(!local_err); 486 + replication_start_all(REPLICATION_MODE_PRIMARY, &error_abort); 522 487 523 488 /* checkpoint */ 524 - replication_do_checkpoint_all(&local_err); 525 - g_assert(!local_err); 489 + replication_do_checkpoint_all(&error_abort); 526 490 527 491 /* stop */ 528 - replication_stop_all(true, &local_err); 529 - g_assert(!local_err); 492 + replication_stop_all(true, &error_abort); 530 493 531 494 /* read from s_local_disk (0, IMG_SIZE / 2) */ 532 495 test_blk_read(top_blk, 0x33, 0, IMG_SIZE / 2, ··· 543 506 static void test_secondary_do_checkpoint(void) 544 507 { 545 508 BlockBackend *top_blk, *local_blk; 546 - Error *local_err = NULL; 547 509 bool failover = true; 548 510 549 511 top_blk = start_secondary(); 550 - replication_start_all(REPLICATION_MODE_SECONDARY, &local_err); 551 - g_assert(!local_err); 512 + replication_start_all(REPLICATION_MODE_SECONDARY, &error_abort); 552 513 553 514 /* write 0x22 to s_local_disk (IMG_SIZE / 2, IMG_SIZE) */ 554 515 local_blk = blk_by_name(S_LOCAL_DISK_ID); ··· 559 520 test_blk_read(top_blk, 0x11, IMG_SIZE / 2, 560 521 IMG_SIZE / 2, 0, IMG_SIZE, false); 561 522 562 - replication_do_checkpoint_all(&local_err); 563 - g_assert(!local_err); 523 + replication_do_checkpoint_all(&error_abort); 564 524 565 525 /* after checkpoint, read pattern 0x22 from s_local_disk */ 566 526 test_blk_read(top_blk, 0x22, IMG_SIZE / 2, 567 527 IMG_SIZE / 2, 0, IMG_SIZE, false); 568 528 569 529 /* unblock top_bs */ 570 - replication_stop_all(failover, &local_err); 571 - g_assert(!local_err); 530 + replication_stop_all(failover, &error_abort); 572 531 573 532 teardown_secondary(); 574 533 } 575 534 576 535 static void test_secondary_get_error_all(void) 577 536 { 578 - Error *local_err = NULL; 579 537 bool failover = true; 580 538 581 539 start_secondary(); 582 - replication_start_all(REPLICATION_MODE_SECONDARY, &local_err); 583 - g_assert(!local_err); 540 + replication_start_all(REPLICATION_MODE_SECONDARY, &error_abort); 584 541 585 - replication_get_error_all(&local_err); 586 - g_assert(!local_err); 542 + replication_get_error_all(&error_abort); 587 543 588 544 /* unblock top_bs */ 589 - replication_stop_all(failover, &local_err); 590 - g_assert(!local_err); 545 + replication_stop_all(failover, &error_abort); 591 546 592 547 teardown_secondary(); 593 548 }
+10 -23
tests/test-string-input-visitor.c
··· 53 53 54 54 v = visitor_input_test_init(data, "-42"); 55 55 56 - visit_type_int(v, NULL, &res, &err); 57 - g_assert(!err); 56 + visit_type_int(v, NULL, &res, &error_abort); 58 57 g_assert_cmpint(res, ==, value); 59 58 60 59 v = visitor_input_test_init(data, "not an int"); ··· 327 326 static void test_visitor_in_bool(TestInputVisitorData *data, 328 327 const void *unused) 329 328 { 330 - Error *err = NULL; 331 329 bool res = false; 332 330 Visitor *v; 333 331 334 332 v = visitor_input_test_init(data, "true"); 335 333 336 - visit_type_bool(v, NULL, &res, &err); 337 - g_assert(!err); 334 + visit_type_bool(v, NULL, &res, &error_abort); 338 335 g_assert_cmpint(res, ==, true); 339 336 340 337 v = visitor_input_test_init(data, "yes"); 341 338 342 - visit_type_bool(v, NULL, &res, &err); 343 - g_assert(!err); 339 + visit_type_bool(v, NULL, &res, &error_abort); 344 340 g_assert_cmpint(res, ==, true); 345 341 346 342 v = visitor_input_test_init(data, "on"); 347 343 348 - visit_type_bool(v, NULL, &res, &err); 349 - g_assert(!err); 344 + visit_type_bool(v, NULL, &res, &error_abort); 350 345 g_assert_cmpint(res, ==, true); 351 346 352 347 v = visitor_input_test_init(data, "false"); 353 348 354 - visit_type_bool(v, NULL, &res, &err); 355 - g_assert(!err); 349 + visit_type_bool(v, NULL, &res, &error_abort); 356 350 g_assert_cmpint(res, ==, false); 357 351 358 352 v = visitor_input_test_init(data, "no"); 359 353 360 - visit_type_bool(v, NULL, &res, &err); 361 - g_assert(!err); 354 + visit_type_bool(v, NULL, &res, &error_abort); 362 355 g_assert_cmpint(res, ==, false); 363 356 364 357 v = visitor_input_test_init(data, "off"); 365 358 366 - visit_type_bool(v, NULL, &res, &err); 367 - g_assert(!err); 359 + visit_type_bool(v, NULL, &res, &error_abort); 368 360 g_assert_cmpint(res, ==, false); 369 361 } 370 362 ··· 377 369 378 370 v = visitor_input_test_init(data, "3.14"); 379 371 380 - visit_type_number(v, NULL, &res, &err); 381 - g_assert(!err); 372 + visit_type_number(v, NULL, &res, &error_abort); 382 373 g_assert_cmpfloat(res, ==, value); 383 374 384 375 /* NaN and infinity has to be rejected */ ··· 399 390 const void *unused) 400 391 { 401 392 char *res = NULL, *value = (char *) "Q E M U"; 402 - Error *err = NULL; 403 393 Visitor *v; 404 394 405 395 v = visitor_input_test_init(data, value); 406 396 407 - visit_type_str(v, NULL, &res, &err); 408 - g_assert(!err); 397 + visit_type_str(v, NULL, &res, &error_abort); 409 398 g_assert_cmpstr(res, ==, value); 410 399 411 400 g_free(res); ··· 414 403 static void test_visitor_in_enum(TestInputVisitorData *data, 415 404 const void *unused) 416 405 { 417 - Error *err = NULL; 418 406 Visitor *v; 419 407 EnumOne i; 420 408 ··· 423 411 424 412 v = visitor_input_test_init(data, EnumOne_str(i)); 425 413 426 - visit_type_EnumOne(v, NULL, &res, &err); 427 - g_assert(!err); 414 + visit_type_EnumOne(v, NULL, &res, &error_abort); 428 415 g_assert_cmpint(i, ==, res); 429 416 } 430 417 }
+4 -12
tests/test-string-output-visitor.c
··· 71 71 const void *unused) 72 72 { 73 73 int64_t value = 42; 74 - Error *err = NULL; 75 74 char *str; 76 75 77 - visit_type_int(data->ov, NULL, &value, &err); 78 - g_assert(!err); 76 + visit_type_int(data->ov, NULL, &value, &error_abort); 79 77 80 78 str = visitor_get(data); 81 79 if (data->human) { ··· 120 118 static void test_visitor_out_bool(TestOutputVisitorData *data, 121 119 const void *unused) 122 120 { 123 - Error *err = NULL; 124 121 bool value = true; 125 122 char *str; 126 123 127 - visit_type_bool(data->ov, NULL, &value, &err); 128 - g_assert(!err); 124 + visit_type_bool(data->ov, NULL, &value, &error_abort); 129 125 130 126 str = visitor_get(data); 131 127 g_assert_cmpstr(str, ==, "true"); ··· 135 131 const void *unused) 136 132 { 137 133 double value = 3.14; 138 - Error *err = NULL; 139 134 char *str; 140 135 141 - visit_type_number(data->ov, NULL, &value, &err); 142 - g_assert(!err); 136 + visit_type_number(data->ov, NULL, &value, &error_abort); 143 137 144 138 str = visitor_get(data); 145 139 g_assert_cmpstr(str, ==, "3.140000"); ··· 150 144 { 151 145 char *string = (char *) "Q E M U"; 152 146 const char *string_human = "\"Q E M U\""; 153 - Error *err = NULL; 154 147 char *str; 155 148 156 - visit_type_str(data->ov, NULL, &string, &err); 157 - g_assert(!err); 149 + visit_type_str(data->ov, NULL, &string, &error_abort); 158 150 159 151 str = visitor_get(data); 160 152 if (data->human) {