From mboxrd@z Thu Jan 1 00:00:00 1970 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-hardening@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