public inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH v17 03/10] Add tests on pg_ls_dir before changing it
2+ messages / 2 participants
[nested] [flat]

* [PATCH v17 03/10] Add tests on pg_ls_dir before changing it
@ 2020-03-17 18:16 Justin Pryzby <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Justin Pryzby @ 2020-03-17 18:16 UTC (permalink / raw)

---
 src/test/regress/expected/misc_functions.out | 18 ++++++++++++++++++
 src/test/regress/sql/misc_functions.sql      |  5 +++++
 2 files changed, 23 insertions(+)

diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out
index d3acb98d04..2e87c548eb 100644
--- a/src/test/regress/expected/misc_functions.out
+++ b/src/test/regress/expected/misc_functions.out
@@ -201,6 +201,24 @@ select count(*) > 0 from
  t
 (1 row)
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+ name 
+------
+ .
+(1 row)
+
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+ name 
+------
+(0 rows)
+
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+ pg_ls_dir 
+-----------
+(0 rows)
+
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+ERROR:  could not open directory "does not exist": No such file or directory
 --
 -- Test adding a support function to a subject function
 --
diff --git a/src/test/regress/sql/misc_functions.sql b/src/test/regress/sql/misc_functions.sql
index 094e8f8296..f6857ad177 100644
--- a/src/test/regress/sql/misc_functions.sql
+++ b/src/test/regress/sql/misc_functions.sql
@@ -60,6 +60,11 @@ select count(*) > 0 from
    where spcname = 'pg_default') pts
   join pg_database db on pts.pts = db.oid;
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+
 --
 -- Test adding a support function to a subject function
 --
-- 
2.17.0


--4LFBTxd4L5NLO6ly
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="v17-0004-Add-pg_ls_dir_metadata-to-list-a-dir-with-file-m.patch"



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [PATCH] Add loongarch native checksum implementation.
@ 2023-07-25 08:12 huchangqi <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: huchangqi @ 2023-07-25 08:12 UTC (permalink / raw)
  To: [email protected]; +Cc: John Naylor <[email protected]>; [email protected]; [email protected]


-------------------- Start of forwarded message --------------------
From: huchangqi <[email protected]>
To: YANG Xudong <[email protected]>
Subject: Re: [PATCH] Add loongarch native checksum implementation.
Date: Tue, 25 Jul 2023 15:51:43 +0800

Both cisticola and nuthatch are on the buildfarm now。

cisticola is "old world ABI".
https://buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=cisticola&br=HEAD

nuthatch is "new world ABI".
https://buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=nuthatch&br=HEAD

----------
Best regards,
huchangqi

YANG Xudong <[email protected]> writes:

> On 2023/7/6 15:14, huchangqi wrote:
>> Hi, i have a loongarch machine runing Loongnix-server (based on redhat/centos, it has gcc-8.3 on it), i am trying to test buildfarm on it, when i edit build-farm.conf it seems to need animal and secret to connect the buildfarm server.
>> then i go to  https://buildfarm.postgresql.org/cgi-bin/register-form.pl, and registered the buildfarm  a week ago, but didn't receive any response. so what else i need to do next.
>> 
>> 
>
> Is it possible to provide a build farm instance for new world ABI of 
> loongarch also by loongson? It will be really appreciated.
>
> Thanks!
>
>> 
>>> -----Original Messages-----
>>> From: "YANG Xudong" <[email protected]>
>>> Send time:Wednesday, 07/05/2023 10:15:51
>>> To: "John Naylor" <[email protected]>
>>> Cc: [email protected], [email protected], [email protected]
>>> Subject: Re: [PATCH] Add loongarch native checksum implementation.
>>>
>>> Is there any other comment?
>>>
>>> If the patch looks OK, I would like to update its status to ready for
>>> committer in the commitfest.
>>>
>>> Thanks!
>>>
>>> On 2023/6/16 09:28, YANG Xudong wrote:
>>>> Updated the patch based on the comments.
>>>>
>>>> On 2023/6/15 18:30, John Naylor wrote:
>>>>>
>>>>> On Wed, Jun 14, 2023 at 9:20 AM YANG Xudong <[email protected]
>>>>> <mailto:[email protected]>> wrote:
>>>>>   >
>>>>>   > Attached a new patch with fixes based on the comment below.
>>>>>
>>>>> Note: It's helpful to pass "-v" to git format-patch, to have different
>>>>> versions.
>>>>>
>>>>
>>>> Added v2
>>>>
>>>>>   > > For x86 and Arm, if it fails to link without an -march flag, we
>>>>> allow
>>>>>   > > for a runtime check. The flags "-march=armv8-a+crc" and
>>>>> "-msse4.2" are
>>>>>   > > for instructions not found on all platforms. The patch also
>>>>> checks both
>>>>>   > > ways, and each one results in "Use LoongArch CRC instruction
>>>>>   > > unconditionally". The -march flag here is general, not specific. In
>>>>>   > > other words, if this only runs inside "+elif host_cpu ==
>>>>> 'loongarch64'",
>>>>>   > > why do we need both with -march and without?
>>>>>   > >
>>>>>   >
>>>>>   > Removed the elif branch.
>>>>>
>>>>> Okay, since we've confirmed that no arch flag is necessary, some other
>>>>> places can be simplified:
>>>>>
>>>>> --- a/src/port/Makefile
>>>>> +++ b/src/port/Makefile
>>>>> @@ -98,6 +98,11 @@ pg_crc32c_armv8.o: CFLAGS+=$(CFLAGS_CRC)
>>>>>    pg_crc32c_armv8_shlib.o: CFLAGS+=$(CFLAGS_CRC)
>>>>>    pg_crc32c_armv8_srv.o: CFLAGS+=$(CFLAGS_CRC)
>>>>>
>>>>> +# all versions of pg_crc32c_loongarch.o need CFLAGS_CRC
>>>>> +pg_crc32c_loongarch.o: CFLAGS+=$(CFLAGS_CRC)
>>>>> +pg_crc32c_loongarch_shlib.o: CFLAGS+=$(CFLAGS_CRC)
>>>>> +pg_crc32c_loongarch_srv.o: CFLAGS+=$(CFLAGS_CRC)
>>>>>
>>>>> This was copy-and-pasted from platforms that use a runtime check, so
>>>>> should be unnecessary.
>>>>>
>>>>
>>>> Removed these lines.
>>>>
>>>>> +# If the intrinsics are supported, sets
>>>>> pgac_loongarch_crc32c_intrinsics,
>>>>> +# and CFLAGS_CRC.
>>>>>
>>>>> +# Check if __builtin_loongarch_crcc_* intrinsics can be used
>>>>> +# with the default compiler flags.
>>>>> +# CFLAGS_CRC is set if the extra flag is required.
>>>>>
>>>>> Same here -- it seems we don't need to set CFLAGS_CRC at all. Can you
>>>>> confirm?
>>>>>
>>>>
>>>> We don't need to set CFLAGS_CRC as commented. I have updated the
>>>> configure script to make it align with the logic in meson build script.
>>>>
>>>>>   > > Also, I don't have a Loongarch machine for testing. Could you
>>>>> show that
>>>>>   > > the instructions are found in the binary, maybe using objdump and
>>>>> grep?
>>>>>   > > Or a performance test?
>>>>>   > >
>>>>>   >
>>>>>   > The output of the objdump command `objdump -dS
>>>>>   > ../postgres-build/tmp_install/usr/local/pgsql/bin/postgres  | grep
>>>>> -B 30
>>>>>   > -A 10 crcc` is attached.
>>>>>
>>>>> Thanks for confirming.
>>>>>
>>>>> -- 
>>>>> John Naylor
>>>>> EDB: http://www.enterprisedb.com <http://www.enterprisedb.com;
>>>
>> 
>> 
>> 本邮件及其附件含有龙芯中科的商业秘密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制或散发)本邮件及其附件中的信息。如果您错收本邮件,请您立即电话或邮件通知发件人并删除本邮件。
>> This email and its attachments contain confidential information from Loongson Technology , which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this email in error, please notify the sender by phone or email immediately and delete it.
-------------------- End of forwarded message --------------------







^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-07-25 08:12 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-03-17 18:16 [PATCH v17 03/10] Add tests on pg_ls_dir before changing it Justin Pryzby <[email protected]>
2023-07-25 08:12 Re: [PATCH] Add loongarch native checksum implementation. huchangqi <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox