Re: [PATCH v2 3/3] pack-bitmap: add loading corrupt bitmap_index test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2025年5月23日 08:31,Taylor Blau <me@xxxxxxxxxxxx> 写道:
> But the (elided) code below isn't quite what I was thinking. I think the
> "write garbage data" part is fine as-is and can continue to be written
> in shell. We have lots of examples of using dd to write garbage data
> into files (see for e.g., the "corrupt_data()" function in t5319).
> 
> What I was thinking is the test helper would print (via some new mode,
> or bolted onto "list-commits") line-delimited output like the following:
> 
>    $COMMIT_OID $BITMAP_OFFSET $FLAGS $XOR_OFFSET
> 
> or similar. Then you could use the output of that to determine the
> location (replacing everything up to the actual "printf | dd
> of=$bitmap ...", which is the most fragile in my opinion).

Agreed, I would add a `test-tool bitmap dump-entries` helper which dumps
the output you suggest.

> I think the above scenario (writing a test that would have leaked memory
> otherwise behind a SANITIZE_LEAK prerequisite) is reasonable.

I will submit patch v3 with better structure and cover letter soon.

Thanks,
Lidong






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux