From patchwork Tue Jun 9 16:25:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 187681 Delivered-To: patch@linaro.org Received: by 2002:a54:30ca:0:0:0:0:0 with SMTP id e10csp565490ecs; Tue, 9 Jun 2020 09:32:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtKn/srlOjRftHlKaAz01KhWmODLsdyMuuAZvJ/Tp7UyalHC83v7qJaOiJEBtxlB/gQOby X-Received: by 2002:a25:15c8:: with SMTP id 191mr8158130ybv.31.1591720350694; Tue, 09 Jun 2020 09:32:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591720350; cv=none; d=google.com; s=arc-20160816; b=f1Y3sSkg124PNPtR7dDovSqfWXVWhKBVZvRmLCWrF/zt9hdE956ZcwzLVpFr1E3jz5 F1WiWeGLFZfOerxB0XZBQ2+PZ/CEIOJ9Zoc/+eKrIK0qXyax/V915o2RYb6v924va4ID EFB5qU75x4fw1dh1xgEol/92u5WZ8PrRDVtLngsqTIO6xUsoQfs0fw56fM1n9GSlfpDY TWuciCVv5NBxkb1cvktbh6Xh/o+xMKF/N3nWMt44UX0zKO8IQ/SJYXMRfe6AF8DhlZaH lVkfDeQDRQGWi43U4Im1WXKko/MU5Q6EatO7fej2ROi0k1NKdCm/clamtROT24YmZch3 ae2w== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=hsQjYBDuR7uMW5e0uYusrSNyQMrEa5twml8sjwRrMW8=; b=h2tMjRBGRAEX9HX55ZzD5+df1rmGIgF8qwwhgzISgXBrVpzPBTRUzj6j/RIQx8dIz4 ICb7J5YbhbdqU7M42AoNtKHyMrg7YFUxWbh2+NWwUVTNZTpHNY/DWLU9TakfayPHlsju 1730irQBGHMzskgaSAzC+kk57gVmintWxe/gz//PkKeeHW2hJj2Ix2e9vALnCk+IZKDw v+7tTtimUzdjzuctnsFY2pB5mw4+xiC3cJg15SXyRxXeCovE7s4Znb5Hcj+1bv5soM1V swV9SL/et3KXatsSm8DXsAvV5tzI/Z4PvwKlH/l0gEHZsCYuh2zLcmS7IoFYtGSN15AH 8AUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dFCKCDTm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e1si2793672ybp.19.2020.06.09.09.32.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Jun 2020 09:32:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dFCKCDTm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihAr-0001tH-KX for patch@linaro.org; Tue, 09 Jun 2020 12:32:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih3u-0000FP-11 for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:25:18 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:43400) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih3t-0000UZ-0W for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:25:17 -0400 Received: by mail-pf1-x430.google.com with SMTP id 23so9395783pfw.10 for ; Tue, 09 Jun 2020 09:25:16 -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=hsQjYBDuR7uMW5e0uYusrSNyQMrEa5twml8sjwRrMW8=; b=dFCKCDTm8UMbyZA0Ej7XhjyhSNQQsDQ6n3IpD3GsbgIQwjbpsV6V7f8YVdxsYKY35H xMAcGZjMiXhpspl6tpQyPEcEXcsx8egp4LtW4wUkrc2M0v/YPWwObJ85yKCnX5+1fcmH U1ZKqsGPcosaNE1SdKNirZemqudhMy2UtsQtNJ9UK59hzlqfKcqzzvhMtGd9OfpR5Kz/ l7WNNC6ejp25v+tXJcnM+4u7VNP2R/bSXCi3DfMDgtSRKVpmchfOzYlGejDBRNOxSqNt bfslRxa2AqMEBRSKlJRdJ0v7wK4DkIzfaFYDP2dX2xkf0Hu/AYRn/vupbZKcoHBV6C2C rq9Q== 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=hsQjYBDuR7uMW5e0uYusrSNyQMrEa5twml8sjwRrMW8=; b=Yc+F3W0ekdjLT5ysadN4/Ljoaa4szLUdHVHdlG9oLcWZL5Kj1jbrdmOvUHLXM9xXSR k92afFF9/inSw54Ty6Ya5ukFLdYPLPJzHsB2NlSFsz3TgbLzKQBaXFNxnwTbPnGGujD0 qCH1619gyvxsQzLtQL+4XDMfM1FsnsxQXidxt5/aLQw8OUb1FfOM4cLUBj1juhPhrdyx F4wiDgOTUYvYK/su0qedzGREuvRw8SsT1/8hXFUOzeB14Zl+rK2U+sxRCiaZ9GvPrIVa jKpBy9pekhEpWCTu9lKjX60u7vzRl101Z97l0OOHv7HTL/cWdcABzXfCnc2dmYjqd4cK k3dQ== X-Gm-Message-State: AOAM531z5C4eaxMRVW+Wu2IIrIoo5EPaDE1sdmqA8VZ/jJ8ipYlphar4 uAMe7fxllmCLeIYEuibGPp2FxGxN88I= X-Received: by 2002:a62:5c03:: with SMTP id q3mr4823594pfb.58.1591719915179; Tue, 09 Jun 2020 09:25:15 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id s188sm7580101pfb.118.2020.06.09.09.25.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 09:25:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 7/9] tests/decode: Test non-overlapping groups Date: Tue, 9 Jun 2020 09:25:02 -0700 Message-Id: <20200609162504.780080-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200609162504.780080-1-richard.henderson@linaro.org> References: <20200609162504.780080-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x430.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tests/decode/err_pattern_group_nest1.decode | 14 ++++++++++++++ tests/decode/err_pattern_group_nest2.decode | 6 ++++++ tests/decode/err_pattern_group_nest3.decode | 14 ++++++++++++++ tests/decode/succ_pattern_group_nest3.decode | 11 +++++++++++ 4 files changed, 45 insertions(+) create mode 100644 tests/decode/err_pattern_group_nest1.decode create mode 100644 tests/decode/err_pattern_group_nest2.decode create mode 100644 tests/decode/err_pattern_group_nest3.decode create mode 100644 tests/decode/succ_pattern_group_nest3.decode -- 2.25.1 diff --git a/tests/decode/err_pattern_group_nest1.decode b/tests/decode/err_pattern_group_nest1.decode new file mode 100644 index 0000000000..7d09891a1c --- /dev/null +++ b/tests/decode/err_pattern_group_nest1.decode @@ -0,0 +1,14 @@ +# This work is licensed under the terms of the GNU LGPL, version 2 or later. +# See the COPYING.LIB file in the top-level directory. + +%sub1 0:8 +%sub2 8:8 + +# Make sure braces are matched +{ + top 00000000 00000000 00000000 00000000 + [ + sub1 00000000 00000000 00000000 ........ %sub1 + sub2 00000000 00000000 ........ ........ %sub1 %sub2 + } +} diff --git a/tests/decode/err_pattern_group_nest2.decode b/tests/decode/err_pattern_group_nest2.decode new file mode 100644 index 0000000000..c172239e9b --- /dev/null +++ b/tests/decode/err_pattern_group_nest2.decode @@ -0,0 +1,6 @@ +# This work is licensed under the terms of the GNU LGPL, version 2 or later. +# See the COPYING.LIB file in the top-level directory. + +# Make sure braces are matched +{ + [ diff --git a/tests/decode/err_pattern_group_nest3.decode b/tests/decode/err_pattern_group_nest3.decode new file mode 100644 index 0000000000..b085d01410 --- /dev/null +++ b/tests/decode/err_pattern_group_nest3.decode @@ -0,0 +1,14 @@ +# This work is licensed under the terms of the GNU LGPL, version 2 or later. +# See the COPYING.LIB file in the top-level directory. + +%sub1 0:8 +%sub2 8:8 + +# The exclusive group should error for overlap. +{ + top 00000000 00000000 00000000 00000000 + [ + sub1 00000000 00000000 00000000 ........ %sub1 + sub2 00000000 00000000 ........ ........ %sub1 %sub2 + ] +} diff --git a/tests/decode/succ_pattern_group_nest3.decode b/tests/decode/succ_pattern_group_nest3.decode new file mode 100644 index 0000000000..156249f090 --- /dev/null +++ b/tests/decode/succ_pattern_group_nest3.decode @@ -0,0 +1,11 @@ +# This work is licensed under the terms of the GNU LGPL, version 2 or later. +# See the COPYING.LIB file in the top-level directory. + +{ + [ + sub1 00000000 a:8 b:8 c:8 + sub2 00000001 a:8 b:8 c:8 + sub3 00000010 a:8 b:8 c:8 + ] + sub4 000000 d:2 a:8 b:8 c:8 +}