From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Vesely Subject: Re: [PATCH libdrm 1/1] drmsltest: Check expected neighbours Date: Sun, 13 Aug 2017 22:44:18 -0400 Message-ID: <1502678658.9772.3.camel@rutgers.edu> References: <20170728142322.18783-1-jan.vesely@rutgers.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0300985249==" Return-path: Received: from mail-qt0-x243.google.com (mail-qt0-x243.google.com [IPv6:2607:f8b0:400d:c0d::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id B68D96E0B7 for ; Mon, 14 Aug 2017 02:44:51 +0000 (UTC) Received: by mail-qt0-x243.google.com with SMTP id c15so8594774qta.3 for ; Sun, 13 Aug 2017 19:44:51 -0700 (PDT) In-Reply-To: <20170728142322.18783-1-jan.vesely@rutgers.edu> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org Cc: Emil Velikov List-Id: dri-devel@lists.freedesktop.org --===============0300985249== Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-BJJMuU4LoqCILm7cyWUn" --=-BJJMuU4LoqCILm7cyWUn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2017-07-28 at 10:23 -0400, Jan Vesely wrote: > Fixes: 7d8c9464081634f053e16e5eac9655a12fae1dc4 > Signed-off-by: Jan Vesely ping. Emil, should I just drop this patch? another alternative is to remove the list implementation entirely, since nobody noticed when it got broken. Jan > --- >=20 > I thought I sent this out, but couldn't find it in sent mail. > This tests the behaviour set in 3b2ee2b5bfc0d68525fee936e51297a9b6c629f1 > more than 2 years ago >=20 > Jan >=20 >=20 > tests/drmsl.c | 28 ++++++++++++++++++++-------- > 1 file changed, 20 insertions(+), 8 deletions(-) >=20 > diff --git a/tests/drmsl.c b/tests/drmsl.c > index d0ac0efa..d1b59a86 100644 > --- a/tests/drmsl.c > +++ b/tests/drmsl.c > @@ -106,7 +106,9 @@ static double do_time(int size, int iter) > return usec; > } > =20 > -static void print_neighbors(void *list, unsigned long key) > +static void print_neighbors(void *list, unsigned long key, > + unsigned long expected_prev, > + unsigned long expected_next) > { > unsigned long prev_key =3D 0; > unsigned long next_key =3D 0; > @@ -119,6 +121,16 @@ static void print_neighbors(void *list, unsigned lon= g key) > &next_key, &next_value); > printf("Neighbors of %5lu: %d %5lu %5lu\n", > key, retval, prev_key, next_key); > + if (prev_key !=3D expected_prev) { > + fprintf(stderr, "Unexpected neighbor: %5lu. Expected: %5lu\n", > + prev_key, expected_prev); > + exit(1); > + } > + if (next_key !=3D expected_next) { > + fprintf(stderr, "Unexpected neighbor: %5lu. Expected: %5lu\n", > + next_key, expected_next); > + exit(1); > + } > } > =20 > int main(void) > @@ -138,13 +150,13 @@ int main(void) > print(list); > printf("\n=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n\n"); > =20 > - print_neighbors(list, 0); > - print_neighbors(list, 50); > - print_neighbors(list, 51); > - print_neighbors(list, 123); > - print_neighbors(list, 200); > - print_neighbors(list, 213); > - print_neighbors(list, 256); > + print_neighbors(list, 0, 0, 50); > + print_neighbors(list, 50, 0, 50); > + print_neighbors(list, 51, 50, 123); > + print_neighbors(list, 123, 50, 123); > + print_neighbors(list, 200, 123, 213); > + print_neighbors(list, 213, 123, 213); > + print_neighbors(list, 256, 213, 256); > printf("\n=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n\n"); > =20 > drmSLDelete(list, 50); --=20 Jan Vesely --=-BJJMuU4LoqCILm7cyWUn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEjGgSoFJq63cCYGKvY+M/tz9IsiAFAlmRDoIACgkQY+M/tz9I siDR4BAAs62mQXvaamVPL94gI7iehcZwcw0U3fnV764SHG68Bz5LGgK4ISeaf5pJ Lz65PrOcsn7d6TNct8Uv9MS3u3EIqangX3hD0IEwGepJ20+CtgTDRbpUatAnjcqw 5pNFgRnEOsQ5qoG3MzycfQCZs8IHIcI/yq77cPo6cmhu6bW9mhQnssFBhuSd0NId 446zeB7FZlWDIEdDzXAvDpNLMkltcHIfsXThlFF8IynmTX45Zv72prVAE1iwoXCN O9Es3L2Kfx6DZaMhTehNb6xPQ6+fIMDTCqq0t7h55NKtUfl84xq/rVvpQnQa2KhO x2SSNJzayZhR0kyinhGRV2P3xyED/5chtxN88m5lx/RnvCv/boTYXDO4bq1H6p6L OWp3R6xXq6JsT57EO4F9P31eXSbu70ySz0tP4OSLx3dCYiO27S6XGIrzY1ZOVO1I XM0M1KGfQDbxiCWJZGg35lEvW9n9pQYZB18b1kPbnIy6Wz76DikTWnmN6g42hgHw 9shcOKI7MA2u8hNbyIHe0+jg8grEp/RA7xdOB7c1/gk8EMLHgWOk4SsuDa2MeBoM +bWIDAhLCZa0Z8Eif7+iR0w+aBcev06uS78JYnUan6fCPETvCOpuWnapDDBNcMsE OgwCnMH7xTlL2h+AT123sHLDRd0tFic8bqnl0/eV/xPM8eZi9KM= =d0o1 -----END PGP SIGNATURE----- --=-BJJMuU4LoqCILm7cyWUn-- --===============0300985249== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0300985249==--