<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/source3/script/tests/test_printing_var_exp.sh, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>s3:script: Fix script usage lines</title>
<updated>2023-09-14T21:35:29+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2023-09-05T04:21:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=74624bd98debfe2d477c99cd470e75cce3d6a1b0'/>
<id>74624bd98debfe2d477c99cd470e75cce3d6a1b0</id>
<content type='text'>
Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>selftests: Make sure print queue is empty before printing_var_exp test ends</title>
<updated>2023-02-20T22:58:44+00:00</updated>
<author>
<name>Samuel Cabrero</name>
<email>scabrero@samba.org</email>
</author>
<published>2023-02-17T16:22:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=5c051eacd425f322995ab53fce74028e44109046'/>
<id>5c051eacd425f322995ab53fce74028e44109046</id>
<content type='text'>
Although "lpq cache time" is 0 in the test environment the
"print_queue_length()" function can still return cached results. This is
because the print_queue_length() function calls print_queue_update(),
which just sends MSG_PRINTER_UPDATE to the samba-bgqd daemon and returns
without waiting for the daemon to update it.

This behavior causes problems in the selftests between
samba3.blackbox.printing_var_exp and samba3.rpc.spoolss.printserver
because when the later enumerates the printers at different levels and
compares the results the number of jobs can differ depending if samba-bgqd
updates the cache in between print_queue_update() and
get_queue_status() in the print_queue_length() function:

  test: samba3.rpc.spoolss.printserver.printserver.enum_printers(nt4_dc)
  time: 2023-02-17 13:07:34.043842Z
  Testing EnumPrinters level 0
  Testing EnumPrinters level 1
  Testing EnumPrinters level 2
  Checking EnumPrinters level 0 printer print_var_exp (ref print_var_exp)
  time: 2023-02-17 13:07:34.285992Z
  failure: samba3.rpc.spoolss.printserver.printserver.enum_printers(nt4_dc) [
  Exception: Exception: ../../source4/torture/rpc/spoolss.c:1132: cur-&gt;info0.cjobs was 1 (0x1), expected 0 (0x0): invalid value

To fix it, make sure the queue is empty before printing_var_exp test
ends.

Signed-off-by: Samuel Cabrero &lt;scabrero@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Andrew Bartlett &lt;abartlet@samba.org&gt;
Autobuild-Date(master): Mon Feb 20 22:58:44 UTC 2023 on atb-devel-224
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Although "lpq cache time" is 0 in the test environment the
"print_queue_length()" function can still return cached results. This is
because the print_queue_length() function calls print_queue_update(),
which just sends MSG_PRINTER_UPDATE to the samba-bgqd daemon and returns
without waiting for the daemon to update it.

This behavior causes problems in the selftests between
samba3.blackbox.printing_var_exp and samba3.rpc.spoolss.printserver
because when the later enumerates the printers at different levels and
compares the results the number of jobs can differ depending if samba-bgqd
updates the cache in between print_queue_update() and
get_queue_status() in the print_queue_length() function:

  test: samba3.rpc.spoolss.printserver.printserver.enum_printers(nt4_dc)
  time: 2023-02-17 13:07:34.043842Z
  Testing EnumPrinters level 0
  Testing EnumPrinters level 1
  Testing EnumPrinters level 2
  Checking EnumPrinters level 0 printer print_var_exp (ref print_var_exp)
  time: 2023-02-17 13:07:34.285992Z
  failure: samba3.rpc.spoolss.printserver.printserver.enum_printers(nt4_dc) [
  Exception: Exception: ../../source4/torture/rpc/spoolss.c:1132: cur-&gt;info0.cjobs was 1 (0x1), expected 0 (0x0): invalid value

To fix it, make sure the queue is empty before printing_var_exp test
ends.

Signed-off-by: Samuel Cabrero &lt;scabrero@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Andrew Bartlett &lt;abartlet@samba.org&gt;
Autobuild-Date(master): Mon Feb 20 22:58:44 UTC 2023 on atb-devel-224
</pre>
</div>
</content>
</entry>
<entry>
<title>s3:tests: Reformat test_printing_var_exp.sh</title>
<updated>2022-06-08T13:14:47+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2022-04-22T13:34:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=07875d856969847d017e40fcefc123188c9838b7'/>
<id>07875d856969847d017e40fcefc123188c9838b7</id>
<content type='text'>
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Guenther Deschner &lt;gd@samba.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Guenther Deschner &lt;gd@samba.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>s3: tests: Change logfile for printing expansion tests.</title>
<updated>2021-03-18T02:57:08+00:00</updated>
<author>
<name>Jeremy Allison</name>
<email>jra@samba.org</email>
</author>
<published>2021-03-17T22:44:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=12b8dbd0bbd7ab3fef8a7e31346679bc24ea78d2'/>
<id>12b8dbd0bbd7ab3fef8a7e31346679bc24ea78d2</id>
<content type='text'>
logfile=/tmp/$USER_printing_var_exp.log -&gt; logfile="${SELFTEST_TMPDIR}/${USER}_printing_var_exp.log"

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;

Autobuild-User(master): Stefan Metzmacher &lt;metze@samba.org&gt;
Autobuild-Date(master): Thu Mar 18 02:57:08 UTC 2021 on sn-devel-184
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
logfile=/tmp/$USER_printing_var_exp.log -&gt; logfile="${SELFTEST_TMPDIR}/${USER}_printing_var_exp.log"

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;

Autobuild-User(master): Stefan Metzmacher &lt;metze@samba.org&gt;
Autobuild-Date(master): Thu Mar 18 02:57:08 UTC 2021 on sn-devel-184
</pre>
</div>
</content>
</entry>
<entry>
<title>selftest: fix cleanup of test_printing_var_exp.sh</title>
<updated>2021-03-16T22:08:10+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2021-03-16T13:12:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=78208c62c154545fc45d87bfce24c5fffd1e33d9'/>
<id>78208c62c154545fc45d87bfce24c5fffd1e33d9</id>
<content type='text'>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14668

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;

Autobuild-User(master): Jeremy Allison &lt;jra@samba.org&gt;
Autobuild-Date(master): Tue Mar 16 22:08:10 UTC 2021 on sn-devel-184
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14668

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;

Autobuild-User(master): Jeremy Allison &lt;jra@samba.org&gt;
Autobuild-Date(master): Tue Mar 16 22:08:10 UTC 2021 on sn-devel-184
</pre>
</div>
</content>
</entry>
<entry>
<title>selftest: add a test for %U variable expansion in spoolssd</title>
<updated>2021-03-11T23:43:32+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2021-03-11T13:46:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=7662a77c4cb473c431386c9b8014e846bc5e5882'/>
<id>7662a77c4cb473c431386c9b8014e846bc5e5882</id>
<content type='text'>
This targets the nt4_dc testenv which luckily already runs with spoolssd
enabled.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14668
MR: https://gitlab.com/samba-team/samba/-/merge_requests/1834

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Björn Baumbach &lt;bb@sernet.de&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This targets the nt4_dc testenv which luckily already runs with spoolssd
enabled.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14668
MR: https://gitlab.com/samba-team/samba/-/merge_requests/1834

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Björn Baumbach &lt;bb@sernet.de&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
