[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 01/39] tests: Change to use g_mkdir()
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v2 01/39] tests: Change to use g_mkdir() |
Date: |
Mon, 26 Sep 2022 09:21:00 +0100 |
User-agent: |
Mutt/2.2.6 (2022-06-05) |
On Fri, Sep 23, 2022 at 08:02:46PM +0200, Thomas Huth wrote:
> On 23/09/2022 03.09, Bin Meng wrote:
> > On Fri, Sep 23, 2022 at 3:32 AM Marc-André Lureau
> > <marcandre.lureau@gmail.com> wrote:
> > >
> > > Hi
> > >
> > > On Tue, Sep 20, 2022 at 1:48 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> > > >
> > > > From: Bin Meng <bin.meng@windriver.com>
> > > >
> > > > Commit 413bebc04603 ("tests: Use g_mkdir_with_parents()") replaces
> > > > the mkdir() call in the test codes with glib's g_mkdir_with_parents(),
> > > > but the exact portable replacement for mkdir() should be g_mkdir().
> > > >
> > > > I probably was misled by the GTK glib doc [1] before, thinking that
> > > > g_mkdir() is not a supported API from glib. But the glib sources do
> > > > not support this statement. It is probably that the GTK documentation
> > > > was not built to include all APIs.
> > > >
> > > > [1] https://docs.gtk.org/glib/?q=mkdir
> > > >
> > > > Fixes: 413bebc04603 ("tests: Use g_mkdir_with_parents()")
> > > > Signed-off-by: Bin Meng <bin.meng@windriver.com>
> > >
> > >
> > > I wouldn't bother anymore, I'd keep mkdir_with_parents for now. YMMV
> > >
> >
> > Yep but some maintainers pointed out in other patches in v1 that
> > g_mkdir() is the strict replacement for mkdir() :)
> >
> > @Thomas Huth Would you share your thoughts?
>
> It's a little bit weird that g_mkdir() does not show up in the glib docs ...
> let's keep g_mkdir_with_parents(), that sounds like the better choice to me.
That is a bug in the new docs generator for GTK. It appears to have
missed out a whole bunch of APIs. It is certainly present in the old
docs from gtk-doc output
https://developer-old.gnome.org/glib/2.64/glib-File-Utilities.html#g-mkdir
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
[PATCH v2 03/39] block: Unify the get_tmp_filename() implementation, Bin Meng, 2022/09/20
[PATCH v2 05/39] tcg: Avoid using hardcoded /tmp, Bin Meng, 2022/09/20
[PATCH v2 04/39] semihosting/arm-compat-semi: Avoid using hardcoded /tmp, Bin Meng, 2022/09/20
[PATCH v2 08/39] block/vvfat: Unify the mkdir() call, Bin Meng, 2022/09/20
[PATCH v2 02/39] tests/qtest: i440fx-test: Rewrite create_blob_file() to be portable, Bin Meng, 2022/09/20