Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1399228rwb; Fri, 28 Jul 2023 08:53:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlHCi/I1WjZGwdWo/xUmxlfgDSC0j861IE/usO+xGn8odGRlkDPZS3e0eFUKrvKFKvmxib03 X-Received: by 2002:a05:6a21:6d9a:b0:137:68c3:c86f with SMTP id wl26-20020a056a216d9a00b0013768c3c86fmr2112711pzb.55.1690559635564; Fri, 28 Jul 2023 08:53:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690559635; cv=none; d=google.com; s=arc-20160816; b=jXhHiYWlyvO127GZ07BD38j+9yFVxX/kj2hU/tW3pHLrvRtkhamspwW4RV02hRNYrG C7C89JWaRCKvSUOmHyCyD/QsL1mE2m1ebV1RdN+M1lYhcNZ98PksT96TQr6VarrorUWl imQ3cBhyW6PrVI2vfwswpTEMnRGjotqkzQg40zHCTDglpKahYNqbadwC7bA6YJS2Al7H h6Vbscl5jjctm+rlVV4ZKGDaoiUgDZRybQVOnmLks6lmbAxGG79mRydubaNTQUYQYP8c EebbthXtTlqk3Qp2ggIkcyTwDurEUV3utoZMQqo1D0A6z7f7wYthyP66TMQalU1mCo4Q Y6Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=T8f2jcEWHe85NAwJ+QYf2QWkY01PugbZbbWPEErvXII=; fh=2g54W953bLt6TJKjqJfkacgmtu4/kQ9eMrAq5F84Xdc=; b=DpFNpUUPukYpYgYJ/X1YSxXb8mbKmm+Q6mzzyHaIcaR902FCW0xZL6k77Mqn8ae7ec 3y17QDN03yGrgTpJO3l/QwIorF6t+LWe9+v56J8PwC4zzTCEF6JVLqumR4zQ9ENUPCFT X0h6/bUDdtnaWGJiVtB2QwB7G7M6oMXtZifaW7Opo0JdnMoZbEsHRb1AccMYgZ6LjaiM fcnu0+B+U0W9oyPCHW3jN1GM/JRhoxYaZTvwkZckivWRwlWeZrEd5biLFyhVHoTTcedt /s1JV+8Bv9K+SQxtbtiX1fpwvj1Qz3OzbbzuP4HoL3WD7yBIv2/J8prShkXLWj+ZX412 S+Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HP555RYA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w7-20020a6556c7000000b0056399efdbe8si3054299pgs.847.2023.07.28.08.53.43; Fri, 28 Jul 2023 08:53:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HP555RYA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237119AbjG1Of5 (ORCPT + 99 others); Fri, 28 Jul 2023 10:35:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237116AbjG1Ofz (ORCPT ); Fri, 28 Jul 2023 10:35:55 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0379C3A9B for ; Fri, 28 Jul 2023 07:35:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690554912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T8f2jcEWHe85NAwJ+QYf2QWkY01PugbZbbWPEErvXII=; b=HP555RYAGoMulDbepeE3vfE+fAj9BQhSkYdK5vEzeF4PerbuBcggP9IdLDS+UIBYr18WWs KlSRKYnF+I7prgeRaxlhb67bzyDi3YqntOP4GPNDYkFj540ZhuCM7NXixdMgugmJYyQ0Yi 3W6C6BJPezQZyRDrWPlJ/z8RfGEgtZc= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-67-jhzvxM1eNfKD4Es_Ni7Qdw-1; Fri, 28 Jul 2023 10:35:07 -0400 X-MC-Unique: jhzvxM1eNfKD4Es_Ni7Qdw-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-3fa9a282fffso11827455e9.1 for ; Fri, 28 Jul 2023 07:35:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690554906; x=1691159706; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=T8f2jcEWHe85NAwJ+QYf2QWkY01PugbZbbWPEErvXII=; b=Kze/odMVdrFdGWccQ1MNQZUVX7vJ6RiopygBI/+6M0IXhFsQzIPMnuNGcRoS2P744F tFfy46QRScpEsBD7D/I5YNDtnq8u8RmutqYkK7N5qpcjTCF1DVnVz30qEe5WpgbdQ++v W29rcjtTBcZBIEvoIHHNwqrddC90DBofupBo6VErSwmtJkzJihovfH+7RAfkyiXZ5Ar3 j/lsAEvkyQa9K8MnsOD5oXqyTrNdqyv8jcRmrIXke8Yp8dDRGEYdNYdvRxzAASTZZ9IC 3nsGL9ogp2s87pNjJZC/jmp/LRCWv3NyUn+s2QN2S++1LJ3kMnz/0iFX9llh296ccQJg WYpA== X-Gm-Message-State: ABy/qLYlYHEQ+lPZ7HEuG4JpsALDw2hNGof2Z+GVuly8WgKhJpQuuwLb vl5R4NSVfiCTUT4TDtVhhx0/3DsjB6PFN17UAyKlzf1KeVGw9PcGD1KPdOV9wFX5Hd1ZTXhiIdt JUPxtLOMFFN/at1UvFzhn/rAP X-Received: by 2002:a05:600c:2248:b0:3fb:ffa8:6d78 with SMTP id a8-20020a05600c224800b003fbffa86d78mr1882095wmm.36.1690554906732; Fri, 28 Jul 2023 07:35:06 -0700 (PDT) X-Received: by 2002:a05:600c:2248:b0:3fb:ffa8:6d78 with SMTP id a8-20020a05600c224800b003fbffa86d78mr1882076wmm.36.1690554906382; Fri, 28 Jul 2023 07:35:06 -0700 (PDT) Received: from ?IPV6:2003:cb:c706:6b00:bf49:f14b:380d:f871? (p200300cbc7066b00bf49f14b380df871.dip0.t-ipconnect.de. [2003:cb:c706:6b00:bf49:f14b:380d:f871]) by smtp.gmail.com with ESMTPSA id f2-20020a7bc8c2000000b003fbc9b9699dsm4324357wml.45.2023.07.28.07.35.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Jul 2023 07:35:05 -0700 (PDT) Message-ID: <8e4d9fa7-7550-87a9-ead1-2d2a8691cdab@redhat.com> Date: Fri, 28 Jul 2023 16:35:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 1/2] selftests: mm: ksm: Fix incorrect evaluation of parameter Content-Language: en-US To: Ayush Jain , akpm@linux-foundation.org, shuah@kernel.org, pasha.tatashin@soleen.com, zhansayabagdaulet@gmail.com, tyhicks@linux.microsoft.com, raghavendra.kodsarathimmappa@amd.com Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Narasimhan.V@amd.com, Santosh.Shukla@amd.com References: <20230728060109.4403-1-ayush.jain3@amd.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20230728060109.4403-1-ayush.jain3@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28.07.23 08:01, Ayush Jain wrote: > A missing break in kms_tests leads to kselftest hang when the > parameter -s is used. > In current code flow because of missing break in -s, -t parses > args spilled from -s and as -t accepts only valid values as 0,1 > so any arg in -s >1 or <0, gets in ksm_test failure > > This went undetected since, before the addition of option -t, > the next case -M would immediately break out of the switch > statement but that is no longer the case > > Add the missing break statement. > > ----Before---- > ./ksm_tests -H -s 100 > Invalid merge type > > ----After---- > ./ksm_tests -H -s 100 > Number of normal pages: 0 > Number of huge pages: 50 > Total size: 100 MiB > Total time: 0.401732682 s > Average speed: 248.922 MiB/s > > Fixes: 9e7cb94ca218 ("selftests: vm: add KSM merging time test") I think this actually fixes 07115fcc15b4 ("selftests/mm: add new selftests for KSM") that added the "t" parsing. Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb