Commit e6773a9
committed
osdc/Striper: relax assert in assemble_result() for raw buffers
The previous commit uncovered an old bug, introduced in commit
9867804 ("Striper: Add function 'assemble_result(CephContext *cct,
char *buffer, size_t len)' in StripedReadResult."). The buffer is
allowed to be NULL when assemble_result() is called -- it becomes
a problem only if some data was read.
Strengthen ZeroLengthRead and ZeroLengthWrite tests to cover both
a bogus pointer and a NULL pointer for buffer.
Signed-off-by: Ilya Dryomov <[email protected]>1 parent 1484480 commit e6773a9
2 files changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
488 | | - | |
489 | | - | |
| 488 | + | |
490 | 489 | | |
491 | 490 | | |
492 | 491 | | |
493 | 492 | | |
494 | 493 | | |
| 494 | + | |
| 495 | + | |
495 | 496 | | |
496 | 497 | | |
497 | 498 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8683 | 8683 | | |
8684 | 8684 | | |
8685 | 8685 | | |
8686 | | - | |
| 8686 | + | |
| 8687 | + | |
| 8688 | + | |
8687 | 8689 | | |
| 8690 | + | |
| 8691 | + | |
8688 | 8692 | | |
8689 | 8693 | | |
8690 | 8694 | | |
| |||
8736 | 8740 | | |
8737 | 8741 | | |
8738 | 8742 | | |
| 8743 | + | |
| 8744 | + | |
8739 | 8745 | | |
8740 | 8746 | | |
8741 | 8747 | | |
| |||
0 commit comments