| .. | .. |
|---|
| 30 | 30 | |
|---|
| 31 | 31 | fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize); |
|---|
| 32 | 32 | if (!fs_info) { |
|---|
| 33 | | - test_err("could not allocate fs_info"); |
|---|
| 33 | + test_std_err(TEST_ALLOC_FS_INFO); |
|---|
| 34 | 34 | return -ENOMEM; |
|---|
| 35 | 35 | } |
|---|
| 36 | 36 | |
|---|
| 37 | 37 | root = btrfs_alloc_dummy_root(fs_info); |
|---|
| 38 | 38 | if (IS_ERR(root)) { |
|---|
| 39 | | - test_err("could not allocate root"); |
|---|
| 39 | + test_std_err(TEST_ALLOC_ROOT); |
|---|
| 40 | 40 | ret = PTR_ERR(root); |
|---|
| 41 | 41 | goto out; |
|---|
| 42 | 42 | } |
|---|
| 43 | 43 | |
|---|
| 44 | 44 | path = btrfs_alloc_path(); |
|---|
| 45 | 45 | if (!path) { |
|---|
| 46 | | - test_err("could not allocate path"); |
|---|
| 46 | + test_std_err(TEST_ALLOC_PATH); |
|---|
| 47 | 47 | ret = -ENOMEM; |
|---|
| 48 | 48 | goto out; |
|---|
| 49 | 49 | } |
|---|
| 50 | 50 | |
|---|
| 51 | 51 | path->nodes[0] = eb = alloc_dummy_extent_buffer(fs_info, nodesize); |
|---|
| 52 | 52 | if (!eb) { |
|---|
| 53 | | - test_err("could not allocate dummy buffer"); |
|---|
| 53 | + test_std_err(TEST_ALLOC_EXTENT_BUFFER); |
|---|
| 54 | 54 | ret = -ENOMEM; |
|---|
| 55 | 55 | goto out; |
|---|
| 56 | 56 | } |
|---|
| .. | .. |
|---|
| 60 | 60 | key.type = BTRFS_EXTENT_CSUM_KEY; |
|---|
| 61 | 61 | key.offset = 0; |
|---|
| 62 | 62 | |
|---|
| 63 | | - setup_items_for_insert(root, path, &key, &value_len, value_len, |
|---|
| 64 | | - value_len + sizeof(struct btrfs_item), 1); |
|---|
| 63 | + setup_items_for_insert(root, path, &key, &value_len, 1); |
|---|
| 65 | 64 | item = btrfs_item_nr(0); |
|---|
| 66 | 65 | write_extent_buffer(eb, value, btrfs_item_ptr_offset(eb, 0), |
|---|
| 67 | 66 | value_len); |
|---|