#include <stdio.h>#include <inttypes.h>#include <string.h>#include <unistd.h>#include <arpa/inet.h>#include <sys/param.h>#include "afpcmd.h"#include "afphelper.h"#include "testhelper.h"Macros | |
| #define | PAG_CORPUS_SMALL 50 |
| #define | PAG_CORPUS_PAGED 250 |
| #define | PAG_PREFIX_530 "paginate530-f-" |
| #define | PAG_PREFIX_531 "paginate531-p-" |
| #define | PAG_DIR_SMALL "pagtest_small" |
| #define | PAG_DIR_PAGED "pagtest_paged" |
| #define | PHRASE_DIR "pagtest_phrase" |
| #define | SCOPE_DIR "pagtest_scope" |
| #define | SCOPE_SUB_IN "scope633-inside" |
| #define | SCOPE_SUB_OUT "scope633-outside" |
| #define | SCOPE_SUB_UML "scope633-u\xCC\x88" "ber" |
| #define | SCOPE_FILE "scope633-file.txt" |
Functions | |
| static int | pag_create_dir_get_did (uint16_t vol, uint32_t parent_did, char *name) |
| Create a directory and return its DID. | |
| static void | pag_log_ret (const char *testname, const char *opop, unsigned int ret) |
| static int | pag_spotlight_open (uint16_t vol, const char *testname) |
| static void | pag_log_create_dir_failure (const char *testname, const char *dirname) |
| static void | pag_log_create_file_failure (const char *testname, const char *filename, unsigned int ret) |
| STATIC void | test547 () |
| STATIC void | test548 () |
| STATIC void | test560 () |
| STATIC void | test561 () |
| STATIC void | test562 () |
| STATIC void | test563 () |
| STATIC void | test565 () |
| static int | phrase_query_count (const char *testname, uint16_t vol, const char *query, const char *scope, uint32_t ctx, int *got) |
| Run one Spotlight query and return the drained result count. | |
| STATIC void | test632 () |
| STATIC void | test633 () |
| STATIC void | test634 () |
| void | FPSpotlightRPC_test () |
| #define PAG_CORPUS_PAGED 250 |
| #define PAG_CORPUS_SMALL 50 |
| #define PAG_DIR_PAGED "pagtest_paged" |
| #define PAG_DIR_SMALL "pagtest_small" |
| #define PAG_PREFIX_530 "paginate530-f-" |
| #define PAG_PREFIX_531 "paginate531-p-" |
| #define PHRASE_DIR "pagtest_phrase" |
| #define SCOPE_DIR "pagtest_scope" |
| #define SCOPE_FILE "scope633-file.txt" |
| #define SCOPE_SUB_IN "scope633-inside" |
| #define SCOPE_SUB_OUT "scope633-outside" |
| #define SCOPE_SUB_UML "scope633-u\xCC\x88" "ber" |
| void FPSpotlightRPC_test | ( | ) |
|
static |
Create a directory and return its DID.
Convention reminder: in the testsuite, FPCreate* / FPOpen* helpers return the new DID (NETWORK byte order, treated as int) on success and 0 on failure — they do NOT return AFP error codes.
AFPCreateDir extracts the new DID from dsi->commands with a straight memcpy (no byte swap). The returned value is therefore the on-the-wire NETWORK-byte-order CNID stored as int. It must be passed straight back to FPCreateFile()/FPOpenDir() without an ntohl() — those helpers will memcpy it onto the next request's wire as-is. Applying ntohl() here would silently corrupt the DID.
|
static |
|
static |
|
static |
|
static |
|
static |
Run one Spotlight query and return the drained result count.
| STATIC void test547 | ( | ) |
| STATIC void test548 | ( | ) |
| STATIC void test560 | ( | ) |
| STATIC void test561 | ( | ) |
| STATIC void test562 | ( | ) |
| STATIC void test563 | ( | ) |
| STATIC void test565 | ( | ) |
| STATIC void test632 | ( | ) |
| STATIC void test633 | ( | ) |
| STATIC void test634 | ( | ) |