From patchwork Wed Apr 3 16:42:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghavendra Rao Ananta X-Patchwork-Id: 785589 Received: from mail-io1-f74.google.com (mail-io1-f74.google.com [209.85.166.74]) (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 C51401514EC for ; Wed, 3 Apr 2024 16:42:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712162557; cv=none; b=RZo3p/9zQUklef+lox+Zy25MSVDDDRHHkt+KMY3GlvuYWIXZ4qYT6YBpYe/qUvyI6ISs+bOo3j1EE8QNL38rw+NRTkUQI9qO2+ouRk35RsisehiHSRiHcmA5z0dW/RkbU3pubd8zvLhi285p5m+IOLUhkuQaQCkJgTQ3NLa2ivI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712162557; c=relaxed/simple; bh=13pzuYSzeQAEjsqL42hszPIFIbvOLO7/tUFfzFZ7DN4=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=tiMi5eon7VV3KWyqggpdaWkf10qqwvIEBufudyhUzQtgKOKyJQTNZbOdk3FqECmBjF9goFDsjel3kUibOln70oTuRCo/doXqIbyPLqCeTMCii+NEHkkZDQOvPSyOn+iWXCEz3vtUTtpB8V/AF+lcv1p3LU9GigS2b2fJLUfPmlA= 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.74 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-f74.google.com with SMTP id ca18e2360f4ac-7cc61b1d690so2897539f.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=GTTHA4NNek6uE4aytPICxHf7IehjbHj4xTN96BTjwFHm8YttuoUeV4pM3AAlghYqVv TI8wcMQI2L2I0EeArSPbROsCItfqnVVBG4l+Qs3Y4e9guv5a09I807VBTuO/YpfT+CTO D5vdtqkQbxtfVOCtt9QmgMESWjv1F0WuoSxXjAsi5N+Kt/Z4tvOio9rs+PKJZ06mNYgI lQzOZibCRdqPrYWpXxhkpA3nY5alZXg1Xof8AT1dWnOEilD+a9/F/v4PqDUf1ouCYNTz bjWIMFc5dw9tf5nDuLA6lDhRwHyGRo07QpDlfHxyZtwQqTjUF26z/Cmiwo1+RvfdNjAa Bvww== X-Forwarded-Encrypted: i=1; AJvYcCXKqkC5uFukf4Q/oATHXuSPD0V8VB7AvbJyMBtDzk28i9JlSnCpQcJAovDCi227vh3ggRKCCfyTolcwgIi/6/WvgfbfL/nHGp9lI6VQpMyi X-Gm-Message-State: AOJu0YxAdNV9zmeHAjTN6Ey5WxveoajIcV8FfkQ2HH34cueIo4pIghR7 qCUMnl7Jwnf4cNCeFBwCMkeOubScYX6yOHwGe2t7m6NyGB8rzJr7ph6Q9hpjTxWTswryORxctbw nRWqf6Q== 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-kselftest@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 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(-) base-commit: e5cd595e23c1a075359a337c0e5c3a4f2dc28dd1 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);