Message ID | 20180926183709.21293-6-richard.henderson@linaro.org |
---|---|
State | Accepted |
Commit | 321a33f534eb0285f483a2db5f4b47442adadd87 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1071594lji; Wed, 26 Sep 2018 11:43:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV63PAioCa8mVC3SvRCviwU8cp/o55yp/WDq9ZXwWmnqmOP0udfL07wBVYMQysoPTpHkhEUwi X-Received: by 2002:ac8:2672:: with SMTP id v47-v6mr5414235qtv.287.1537987401141; Wed, 26 Sep 2018 11:43:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537987401; cv=none; d=google.com; s=arc-20160816; b=H+/a8+cmQtGKVGHt1MxutESC9bOjCAxJ+AtvLq4jVXx4qzXuF1e0BgPwv/1iq8wJuS axyuCQuJ/lg5mpzQ0O+/8k5JeWq9jf40VN/pb4EWTmaSYT4T/W0zWTJSa2AerjSpQig2 KmCpilU8A4kO73UmxqtZ/sNT2oZXzAOvL8BntCy4cV3YaVPpPxwsmLbdFvjgAaDb5+Ja Us4oGhHlAQms/noj/zxrGkfi6dJ2hC5p5f+xzTurjmNjClapyB8O6SlEX5gkutYsnTMr g2Jo9A1Fx3dnBjwJBhXOw+3kfE7Wiermsn8U9QXTq4sgZag02z1kcNBDRHjGweNVkGpt zU+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=xGHpKrwH+jjwj6RmMlOM/uJwPpjT2p+YT13/rULknRA=; b=K0VwUPzcP0qp1mMXDx8rcW02M4waQf7INQboLSGQ5D5EFp6LfP9H3MbysmGcnBebJR URop8WQ3QILBYnI0XFBNqYfJcoIN7m68FI5mdvs6hYYOFlEk6ZqNcnHmAHqpRnwFp9yL HAST75mk6JaRyPi8A3EaGeYI1cyR7V+EtcWtUR7Al4zR7gZcTz3NbLgqGLN5WmyTNki0 u2m7ROsjD9qgTAFbjTLJp6ERm5Gp/US0jUBmh2pFrQlmGSa/vbP+OeCSFEG735+zLHuP jYl/L1n0t2e5Ab1xAYyRM5S32pSKQl6a6CoAOVtlm/Bm7Po+gOBGUoPPxMhfBGldK/08 tpiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=F6VaH81X; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id g28-v6si1264937qta.395.2018.09.26.11.43.20 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 26 Sep 2018 11:43:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=F6VaH81X; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1g5EmO-0007zf-Kj for patch@linaro.org; Wed, 26 Sep 2018 14:43:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1g5Egn-0001gy-Oo for qemu-devel@nongnu.org; Wed, 26 Sep 2018 14:37:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1g5Egk-0007Ph-KW for qemu-devel@nongnu.org; Wed, 26 Sep 2018 14:37:33 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:46882) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1g5Egk-0007B6-9v for qemu-devel@nongnu.org; Wed, 26 Sep 2018 14:37:30 -0400 Received: by mail-pg1-x529.google.com with SMTP id b129-v6so14389048pga.13 for <qemu-devel@nongnu.org>; Wed, 26 Sep 2018 11:37:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xGHpKrwH+jjwj6RmMlOM/uJwPpjT2p+YT13/rULknRA=; b=F6VaH81XgNFY16uXz36jUD742QRpBOAPuTwPUp27QQoygs65Q5WHnLsV1OmMygQYud ivMFfAXNIs4SHcp8FkLbKdOAog5M+dNcelTZZV9XhJrB71bK/QgGJuS43klpZSPeFQsT +3L/pm4JL4EuOSAwfI6YgGWXUmz0dDTQc3iPg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xGHpKrwH+jjwj6RmMlOM/uJwPpjT2p+YT13/rULknRA=; b=hFin9S0f8aK0UUbsG3qTdRStgLb5mccNYqJWPqu5v4sau3xfZOFL6BBBtPrM7w6Tom pVVe7WTOkSc0GSarGS/B7PnariooamogK93oMUJTz6CuuPSf3RPtHvz38NTphEc+2ed4 U/EI/tyDhl7cOW3nZBujW1zwb7mLTQjSOq/H197jH/xBK6MP/LTteRCzYHdTKAuzcGp4 SKPyPLKkeO+VX7u9L4hw0tm2q/B3KuXiUG7enJg/O5VE4SoB8NHM787/y80mWTqhyqF4 1AsorO53JjbaOmV+ypW2eqex1MPpqnFZX3xkoAhRqBlAhk5GfBCt1QOQKjPmJBJCzXnr TWLQ== X-Gm-Message-State: ABuFfoghPCaY0Ouw+ww3O53UpCZPWy7YsG+KrrcX6FtylLAeqiCNy8tj x3kF5WigqHQoq+ks1pl2OfK7ldqzaB0= X-Received: by 2002:a17:902:4324:: with SMTP id i33-v6mr7154155pld.43.1537987039876; Wed, 26 Sep 2018 11:37:19 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-8-179.tukw.qwest.net. [97.113.8.179]) by smtp.gmail.com with ESMTPSA id b14-v6sm9735952pfc.178.2018.09.26.11.37.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Sep 2018 11:37:18 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Wed, 26 Sep 2018 11:37:01 -0700 Message-Id: <20180926183709.21293-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180926183709.21293-1-richard.henderson@linaro.org> References: <20180926183709.21293-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::529 Subject: [Qemu-devel] [PULL 05/13] test-qht: test deletion of the last entry in a bucket X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: peter.maydell@linaro.org, "Emilio G. Cota" <cota@braap.org> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
tcg-next patch queue
|
expand
|
diff --git a/tests/test-qht.c b/tests/test-qht.c index 05b1d6807a..77666e8c5f 100644 --- a/tests/test-qht.c +++ b/tests/test-qht.c @@ -172,9 +172,20 @@ static void qht_do_test(unsigned int mode, size_t init_entries) qht_init(&ht, is_equal, 0, mode); rm_nonexist(0, 4); + /* + * Test that we successfully delete the last element in a bucket. + * This is a hard-to-reach code path when resizing is on, but without + * resizing we can easily hit it if init_entries <= 1. + * Given that the number of elements per bucket can be 4 or 6 depending on + * the host's pointer size, test the removal of the 4th and 6th elements. + */ insert(0, 4); rm_nonexist(5, 6); - insert(4, 6); + rm(3, 4); + check_n(3); + insert(3, 6); + rm(5, 6); + check_n(5); rm_nonexist(7, 8); iter_rm_mod(1);