Linux-Bluetooth Archive on
 help / color / Atom feed
From: "Gix, Brian" <>
To: "" <>
Cc: "" <>,
	"" <>
Subject: [RFC]  Persistent but intermitant unit/test-midi failure
Date: Mon, 18 May 2020 17:01:11 +0000
Message-ID: <> (raw)

This has bothered me for some time, so I did some investigation on it.

The unit test for Midi assert-fails perhaps 10% - 20% of the time.  Out of 100 or so test runs, I have isolated
*what* the failure is, but have no answer to *why* it fails.  I suspected that it my be the random buffer size
value passed to midi_write_init() in test_midi_writer, but even if I "de - randomize" it (pass a prior failing
sequence of values) it does not change the frequency of success or failure.

I have only seen the failures occur with 2 different buffers, specifically the packets 
sysex4_1 (5 octets)
sysex5_1 (1024 octets)

The 3 symptoms that appears to always be true on the fail case:

1. Fail always occurs on reception of a SND_SEQ_EVENT_SYSEX
2. Received buffer is always exactly 1 octet shorter than what was expected
3. The expected and received buffers are identical except for a missing 0xF7
   octet at the end of the received buffer.

That's all I have time for, and I might not know enough about MIDI to continue further. But it would be nice if
this intermitent Unit Test Failure was fixed.

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Bluetooth Archive on

Archives are clonable:
	git clone --mirror linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ \
	public-inbox-index linux-bluetooth

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone