From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 61CF8370 for ; Tue, 13 Aug 2024 16:34:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723566853; cv=none; b=LYLEkhfn7yKOzqXE+/UQ5/f01WBXTex6aTaJqd2jTG3MdToX+QkIAHDlkPeTDh2mwJS8gXpxTK4SMpwdLV0VnemJZ7mC8nap9w6CkfNEUZt7M7PsjpoYy4nvg8CYTHxFsqduYOOBQ0Mf7bxpRewipxfd+R5BXeIuLudSIgC6lQs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723566853; c=relaxed/simple; bh=s9FhjpgJBV7aZ0bh7A229jvkNpOcRXx9yhDFIcvqw0A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UJRhFq8IMaa2N6tFlcDDWWfCl56OXDqtO/5M5MF3WTNtVTaOptHF61+qmbxKH88iBMYW///7IjyNdj4AtRb4NHENr3BhWRaUydB+XnIlXiW1MbrCtnIF3bWa3KVVuNlM/JZpac0Wnuutr6UdklqSYWAs5SUyU/7NwG44A4ZHAqs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Jj60vpv6; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Jj60vpv6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723566851; 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: in-reply-to:in-reply-to:references:references; bh=Nq8/RpUOFyMdFBwvGw/awyKLLWWIuDz647gTnyiHsrc=; b=Jj60vpv6QBFNEErqYdC9Obvgikb2AKtdv+NfLBKiCwdcewqYIqps4FIUANzYM7sv62WBym 1Se52Elwuf0+SCsZ2+far6igBbNUlz1k+gVZgqeEKtgQqMZNEWhjWsUULgaPnHkGpys5gN AHPp8J3YjoHQapikwJ5KfySODTH72fc= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-310-g2DMM72jOnSloMrjUOyFGg-1; Tue, 13 Aug 2024 12:34:06 -0400 X-MC-Unique: g2DMM72jOnSloMrjUOyFGg-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D605F18EA948; Tue, 13 Aug 2024 16:34:01 +0000 (UTC) Received: from asgard.redhat.com (unknown [10.45.242.18]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8E0D419560AA; Tue, 13 Aug 2024 16:33:51 +0000 (UTC) Date: Tue, 13 Aug 2024 18:33:48 +0200 From: Eugene Syromiatnikov To: Shuah Khan Cc: linux-kselftest@vger.kernel.org, Jaroslav Kysela , Takashi Iwai , Mark Brown , Shuah Khan , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Mathieu Desnoyers , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Artem Savkov Subject: Re: [PATCH v2] selftests: fix relative rpath usage Message-ID: <20240813163348.GA30739@asgard.redhat.com> References: <20240812165650.GA5102@asgard.redhat.com> <3667e585-ecaa-4664-9e6e-75dc9de928e8@linuxfoundation.org> Precedence: bulk X-Mailing-List: linux-kselftest@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: <3667e585-ecaa-4664-9e6e-75dc9de928e8@linuxfoundation.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 On Mon, Aug 12, 2024 at 05:03:45PM -0600, Shuah Khan wrote: > On 8/12/24 10:56, Eugene Syromiatnikov wrote: > >The relative RPATH ("./") supplied to linker options in CFLAGS is resolved > >relative to current working directory and not the executable directory, > >which will lead in incorrect resolution when the test executables are run > >from elsewhere. Changing it to $ORIGIN makes it resolve relative > >to the directory in which the executables reside, which is supposedly > >the desired behaviour. This patch also moves these CFLAGS to lib.mk, > >so the RPATH is provided for all selftest binaries, which is arguably > >a useful default. > > Can you elaborate on the erros you would see if this isn't fixed? I understand > that check-rpaths tool - howebver I would like to know how it manifests and One would be unable to execute the test binaries that require additional locally built dynamic libraries outside the directories in which they reside: [build@builder selftests]$ alsa/mixer-test alsa/mixer-test: error while loading shared libraries: libatest.so: cannot open shared object file: No such file or directory > how would you reproduce this problem while running selftests? This usually doesn't come up in a regular selftests usage so far, as they are usually run via make, and make descends into specific test directories to execute make the respective make targets there, triggering the execution of the specific test bineries.