Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1248777lqb; Thu, 18 Apr 2024 04:51:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUiEE4tNPPZ/x/fY7/PLnOgTpE50zygS8ouxKiBnTGXrlJWNCUa1HMjEcDMGO9lARjEMTTcK9JXy34xDB57lAI6ZkU6bJ9Wy6UsNZ0zcQ== X-Google-Smtp-Source: AGHT+IFUi5tMOV2fH0mYoIhBXRroz3Edzb5+7BL3n9ttAnNcX+upfCrPydsv45Y99GIKWVIzi47S X-Received: by 2002:a05:6808:1490:b0:3c6:f5c8:21b1 with SMTP id e16-20020a056808149000b003c6f5c821b1mr3824413oiw.25.1713441118421; Thu, 18 Apr 2024 04:51:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713441118; cv=pass; d=google.com; s=arc-20160816; b=b0bj1Db+WerxQ0JQ+DjErDANwsIoeN+Ig1aHb4RTVNSGsHUnJOr1OGUfjGwlqzMK+U caw13FW0nDErMSM+HrN4TaUrHyDYqCbeL53ubwk065m1OrM0Zs2tVQhTwHSq+YDd5ohe zjfw4ImQMQuQpl4gdYqWflByXW5daYItCQdogmLaVyQsC2AKEd4lYFu6eboPTuXu3RuR iUkyXIlnXycLCd7PK7v48KOeuaeiltbxBa8uUPZFTG7XNe4eJdjDAQIIw+pcQD6THHNQ wNH2BwKke6yRN2MztEiF1xpWFLKi6ZHKSO9NEEmpQXE8t7vE6Im08Dfs9ZA+sd0wKbR2 EJEQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=J9cK1bdhrbXMDLFscXFJKCL0y+daTydr9s9nmq/6kyY=; fh=Pb256GNsbqwM8deJ19JFTMu78W5rSZbW+V5vsAx3GWs=; b=a9Y6b/0iwnHe6uAg0SxYuhM919S823dDCoIcpMqJJF3p7FsYV0bBbNPyywaFPpBIDh 4ySXeWQSWfEcz0Mfj+n4mzjlgQIK0oiD5m9Da7ZC5/OSDJumxzS7rE83c9Ot7tK14dVP vXETrgjQ5C3RAxqttfJLXxc97HE06w66oGEgtVYVrGjRU1jXoyrceTT3ggqOxYp9vxen bV74NYkfND0OIiJ8kdKbq/0wkqikFKcQhrPqZ4OrkAyhqhqCylASgFA1y6Hw0dVqMWAI rzUA9EUsb5mAoHFpEhOnxhmn78xKIV9+qNmj8GAIGFkVMUH9baS+9OH29k4L0IzHk0k0 NAxQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-150011-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150011-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id a14-20020a63e84e000000b005dbdc9098c6si1270649pgk.445.2024.04.18.04.51.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 04:51:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150011-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-150011-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150011-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 09736284D83 for ; Thu, 18 Apr 2024 11:51:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6398515F41D; Thu, 18 Apr 2024 11:50:57 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 903A015ECD6; Thu, 18 Apr 2024 11:50:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713441056; cv=none; b=VmEp2bL3165keBDed0IQNKipjkcFaoYx00PjuAAAIv/5TV7L4OPPiis6oB9lxBAwU12HJ28YQ1e4F1/va0c54sOA2j4e5sQ3adqCMv4cgGHK3xCPiZOlwB02c92nmaFOSi10QUnHpZptz+Y+qs1CL+uCuPWSMommWjTElXHX/SE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713441056; c=relaxed/simple; bh=iRiAat630poaw1gRyOPsyjy2tdPc/RBRRifnHPmcN/E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FMWACTV5Or2vkObVklfIyWRz5IiPPyv9mHULBzqMWVB2KHx/OcNljOX7dSSNiQ58e/fJEobi0WJ/0ZS9Sb1ZJmMkM8nZYbB6yQWq80uX/sd77K+2T+vecA443tHshPy2umsUrgRgRy1eGPfIBCRFvrXMyC+koskc3r6X7AVCsXE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=fail smtp.mailfrom=kernel.org; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=kernel.org X-CSE-ConnectionGUID: nF0AIfHgS3mPorslAnQQgg== X-CSE-MsgGUID: cBAvAHS8S+i5ApmxoF7nXw== X-IronPort-AV: E=McAfee;i="6600,9927,11047"; a="19589353" X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="19589353" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 04:50:55 -0700 X-CSE-ConnectionGUID: FMRnUkbkQqO57fbuMPTBwQ== X-CSE-MsgGUID: QscAwcbsSYi9UxaYK13N0Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="27590374" Received: from smile.fi.intel.com ([10.237.72.54]) by fmviesa004.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 04:50:53 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rxQHy-00000000JbL-1fNd; Thu, 18 Apr 2024 14:50:50 +0300 Date: Thu, 18 Apr 2024 14:50:50 +0300 From: Andy Shevchenko To: Ivan Orlov Cc: keescook@chromium.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, kunit-dev@googlegroups.com, skhan@linuxfoundation.org Subject: Re: [PATCH v2] string_kunit: Add test cases for str*cmp functions Message-ID: References: <20240417233033.717596-1-ivan.orlov0322@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240417233033.717596-1-ivan.orlov0322@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Thu, Apr 18, 2024 at 12:30:33AM +0100, Ivan Orlov wrote: > Currently, str*cmp functions (strcmp, strncmp, strcasecmp and > strncasecmp) are not covered with tests. Extend the `string_kunit.c` > test by adding the test cases for them. > > This patch adds 8 more test cases: > > 1) strcmp test > 2) strcmp test on long strings (2048 chars) > 3) strncmp test > 4) strncmp test on long strings (2048 chars) > 5) strcasecmp test > 6) strcasecmp test on long strings > 7) strncasecmp test > 8) strncasecmp test on long strings > > These test cases aim at covering as many edge cases as possible, > including the tests on empty strings, situations when the different > symbol is placed at the end of one of the strings, etc. LGTM, Reviewed-by: Andy Shevchenko Thanks! -- With Best Regards, Andy Shevchenko