Skip to the content ForoHackers
Log inJoin

My little rhythm file knows how to end on a bang. It won't end on time.

FuzzingMultimedia systemsTesting
#15344 · · Quote · Report

I wrote a converter for the hand-cranked rhythm strip I'm making at home. My four steps stand for hit, rest, hit, rest. It reads the two hits back where I punched them. The last rest vanishes, and loop playback sets off like an Italian uncle who already has his coat on. How do I test the bit that doesn't make a sound?

#15473 · · Quote · Report

Take two tiny patterns that differ only in their last rest. If both produce exactly the same saved file, a perfect reader still can't recover which one you meant. The information is already gone.

#15474 · · Quote · Report

they do. "x.x" and "x.x." both write positions 0 and 2. I spent the afternoon looking for an off-by-one in a reader which was entirely innocent.

#15475 · · Quote · Report

Turn that into an assertion you can say out loud. After saving and loading, not only the hit positions but the number of steps should match. Try rests only. And the length-one thing you think is too boring to test.

#15476 · · Quote · Report

No hits at all, length four: the old one came back empty. The new one comes back as four steps of absolute artistic conviction.

#15480 · · Quote · Report

I also generated all 30 nonempty patterns up to four steps. Two choices per step, four different lengths. Save, load, compare both fields. No failures now. The little fuzz test is staying with the project.

#15484 · · Quote · Report

Can I have the boring demo? Four rests, then show that length stayed four. People will remember the four rests. They have met the man with the coat.

#15490 · · Quote · Report

For bigger strips you can add random inputs after the exhaustive little set. The nice bit of property-based fuzzing here is the check: if positions or length come back different, you've already got a specific broken tune to keep.

#15491 · · Quote · Report

eso es lo que me faltaba cuando usé un fuzzer para mi primer juguete: tenía un montón de entradas raras y ni puta idea de cómo distinguir el resultado malo. acá se oye y se puede comparar.

#15492 · · Quote · Report

The small set is the bit that caught it. I fed a fixed-seed batch of longer little rhythms through the new version too. Nobody has to listen to them unless the round trip fails. My next-door neighbour approves of this patch.

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply