From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f73.google.com (mail-io1-f73.google.com [209.85.166.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4D1E14A62A for ; Wed, 3 Apr 2024 16:42:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712162558; cv=none; b=dePoCoWCPcOvEjrnxQ+1DVsqSr6YGopy8c6Y3dwL/c53FVsIswhzPDpSi999q777AyoMREfrnG/MmdM9yzUhH9XBgTW7Us9ELZr5RdcWrZSfaA3etCGt/JhZ0pHR+f2BTLCAxUrd0Zt2DaBnCFPs0AN42djYI989LDfj0sQqFH0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712162558; c=relaxed/simple; bh=13pzuYSzeQAEjsqL42hszPIFIbvOLO7/tUFfzFZ7DN4=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=Hqr3UOk2GAzWLw7+MicDVeLXsmrHqfFlc52Lb6g14lB2NyHDwNFaOPl+EhV27rY4JoYB1t6lS/6H6uwDfJ9GcDdA3mWjsi6wDvvx45zagN7M1ms4cyOU8mUDvQ3zXKfkGtn8XGBCYB6vdDIeAvW9adAQyu2HBhERh6FyWZNrYTc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--rananta.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=PIfAWDCk; arc=none smtp.client-ip=209.85.166.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--rananta.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="PIfAWDCk" Received: by mail-io1-f73.google.com with SMTP id ca18e2360f4ac-7cc61b1d690so2897439f.3 for ; Wed, 03 Apr 2024 09:42:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712162555; x=1712767355; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=zL9VryjlYsGlQOxrrXBc4s+acw2W31pFo0ivkt7WDt4=; b=PIfAWDCkfSG47Ye5IlLAlA7E4G3UIrfcHS+DCr5nxEsNYY3gIqXBRUpv7HXKwRe1wI LkU+kUIzFc5ODGyU9dVvmdIPKtuRbBDJ0A79Es/2Eb4AdhaZS/hPiA7/7Dp+Z5VbXllh GCI5CxHNZO9BXpWnjbLoAaWNVxg5XxGeSfiH1fKY8vinS5vkZhmAiI9EiIwqayS8/Ztj 0KkL/khK4IvvNeakhs/5wJjXXA17kqPzHjxVE+VODXDj60M2E4vxUiptH99PIYgCMZqy nM5GqN5zlWl33Hh7mQWO/3N0Emdq3JkTzRmcShNMXtbkVBFjYlTLdOmcGchPbgFtKS+Q 7p/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712162555; x=1712767355; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=zL9VryjlYsGlQOxrrXBc4s+acw2W31pFo0ivkt7WDt4=; b=hhDrTSQsvcH+gb1GG/a6KEuQiQs9E9DtYG7id5o4sEnf9ZenJfBUfq4JyTSN8HoAV4 E+3BN9C7R8FzV9ZLGHCrkFOa4xySPAiN9Y/sTmRhbvT+iYCC3meaLEH9YofZdNqlAdZo NT6ihRGGn5Wbka+Q460NZGAAzOsX0Nqmj5QmVCRIMfQHFjzGr9Q+LrNcWYFUtQ9CU/X7 k638vYSH5hYnE2JJ26SzUMtX7mOM0Y3eQJj3A5/Fd94IBWA8BX8Uzz/gemj32TD9fIdd K0CQjyim3kENPSC0caTv6oY+QzJKza3vlnBJhs01LBmHUs3Wr4bIseRVm7GOKwvqN8TF FUig== X-Forwarded-Encrypted: i=1; AJvYcCUAE7AEIOhleArx/KSyK/SKSuiD+R4nAPBd/iMcpHfDnPAYG3e3+AX3DNbZuxj0EI/Xfbrf2F8uoa6tCLjWhhBysWTbV3E4B/Tf7eBl X-Gm-Message-State: AOJu0YzEUze048oIVRVGjF5go35mJCJg6NFou2dNio+5zodrXtD5aAWp gFKzY9USOdyFtgZNz1Q593I+hntVn7i9pWuTjm9QaUvaLIXaY90DfXJNSXcMPW/AMG17x3vtz1B 3ZK60qA== X-Google-Smtp-Source: AGHT+IF0rO1Bjeb7TUkL6kSTrX663vMZ3XBPI3uHeZiTz2sTccbaBGMG83mBaqMove3qM6FC98OsRNgJym+A X-Received: from rananta-linux.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:20a1]) (user=rananta job=sendgmr) by 2002:a05:6638:8904:b0:47f:1496:13e5 with SMTP id jc4-20020a056638890400b0047f149613e5mr111392jab.4.1712162555133; Wed, 03 Apr 2024 09:42:35 -0700 (PDT) Date: Wed, 3 Apr 2024 16:42:30 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240403164230.1722018-1-rananta@google.com> Subject: [PATCH v2] KVM: selftests: Fix build error due to assert in dirty_log_test From: Raghavendra Rao Ananta To: Sean Christopherson , Sasha Levin Cc: Paolo Bonzini , Shuah Khan , Peter Xu , kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Raghavendra Rao Ananta Content-Type: text/plain; charset="UTF-8" The commit e5ed6c922537 ("KVM: selftests: Fix a semaphore imbalance in the dirty ring logging test") backported the fix from v6.8 to stable v6.1. However, since the patch uses 'TEST_ASSERT_EQ()', which doesn't exist on v6.1, the following build error is seen: dirty_log_test.c:775:2: error: call to undeclared function 'TEST_ASSERT_EQ'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] TEST_ASSERT_EQ(sem_val, 0); ^ 1 error generated. Replace the macro with its equivalent, 'ASSERT_EQ()' to fix the issue. Fixes: e5ed6c922537 ("KVM: selftests: Fix a semaphore imbalance in the dirty ring logging test") Cc: Signed-off-by: Raghavendra Rao Ananta --- tools/testing/selftests/kvm/dirty_log_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/kvm/dirty_log_test.c b/tools/testing/selftests/kvm/dirty_log_test.c index ec40a33c29fd..711b9e4d86aa 100644 --- a/tools/testing/selftests/kvm/dirty_log_test.c +++ b/tools/testing/selftests/kvm/dirty_log_test.c @@ -772,9 +772,9 @@ static void run_test(enum vm_guest_mode mode, void *arg) * verification of all iterations. */ sem_getvalue(&sem_vcpu_stop, &sem_val); - TEST_ASSERT_EQ(sem_val, 0); + ASSERT_EQ(sem_val, 0); sem_getvalue(&sem_vcpu_cont, &sem_val); - TEST_ASSERT_EQ(sem_val, 0); + ASSERT_EQ(sem_val, 0); pthread_create(&vcpu_thread, NULL, vcpu_worker, vcpu); base-commit: e5cd595e23c1a075359a337c0e5c3a4f2dc28dd1 -- 2.44.0.478.gd926399ef9-goog