Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
From: "Gix, Brian" <brian.gix@intel.com>
To: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Cc: "eu@felipetonello.com" <eu@felipetonello.com>,
	"marcel@holtmann.org" <marcel@holtmann.org>
Subject: [RFC]  Persistent but intermitant unit/test-midi failure
Date: Mon, 18 May 2020 17:01:11 +0000
Message-ID: <e8b0e1ed518d5b5875c66aa5af9e7e60019a9890.camel@intel.com> (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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=e8b0e1ed518d5b5875c66aa5af9e7e60019a9890.camel@intel.com \
    --to=brian.gix@intel.com \
    --cc=eu@felipetonello.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

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

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 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/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org
	public-inbox-index linux-bluetooth

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git