Re: [PATCH nft] tests: py: correct the py utils path in the source tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 3, 2025 at 10:26 PM Phil Sutter <phil@xxxxxx> wrote:
>
> Hi,
>
> On Thu, Jul 03, 2025 at 04:04:47PM +0200, Pablo Neira Ayuso wrote:
> > What does it break here? Provide more info.
> >
> > On Thu, Jul 03, 2025 at 01:58:36PM +0000, Zhongqiu Duan wrote:
> > > Fixes: ce443afc2145 ("py: move package source into src directory")
> > > Signed-off-by: Zhongqiu Duan <dzq.aishenghu0@xxxxxxxxx>
> > > ---
> > >  tests/py/nft-test.py | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py
> > > index c7e55b0c3241..984f2b937a07 100755
> > > --- a/tests/py/nft-test.py
> > > +++ b/tests/py/nft-test.py
> > > @@ -23,7 +23,7 @@ import traceback
> > >  import tempfile
> > >
> > >  TESTS_PATH = os.path.dirname(os.path.abspath(__file__))
> > > -sys.path.insert(0, os.path.join(TESTS_PATH, '../../py/'))
> > > +sys.path.insert(0, os.path.join(TESTS_PATH, '../../py/src'))
> > >  os.environ['TZ'] = 'UTC-2'
> > >
> > >  from nftables import Nftables
>
> This is a needed follow-up of commit ce443afc21455 ("py: move
> package source into src directory") from 2023. Since that change,
> nft-test.py started using the host's nftables.py instead of the local
> one. But since nft-test.py passes the local src/.libs/libnftables.so.1
> as parameter when instantiating the Nftables class, we did nevertheless
> use the local libnftables.
>
> Duan Zhongqiu, could you please point out that it re-enables nft-test.py
> to load the right nftables.py module in the description? Also, please
> add:
>
> Fixes: ce443afc21455 ("py: move package source into src directory")
> Reviewed-by: Phil Sutter <phil@xxxxxx>
>

Hi Phil,

Thanks for the detailed description.
I'll use this information to post v2 later.

Best regards,
Zhongqiu

> Thanks, Phil





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux